POST
|
nevermind, someone at Stack answered my question! http://gis.stackexchange.com/questions/44008/field-calculator-vb-script-codeblock-if-statement-syntax-is-wrong Thanks all! (fyi here is the correct one) Dim Output If [New_Pipe_S] = 0 Then Output = [DIAMETER] Else Output = [New_Pipe_S] End If Final_Dia = Output
... View more
12-14-2012
08:32 AM
|
0
|
0
|
430
|
POST
|
I tried that and it didn't work either, same general error 99999. All 3 fields were originally formated as Long and Short Integers in ArcMap. It's stored in a shapefile and I don't have the ArcMap spatial anaylist license, if that makes a difference :(? Any other thoughts? Much appreciated!!
... View more
12-14-2012
08:09 AM
|
0
|
0
|
430
|
POST
|
I get a general error for this simple code: dim [DIAMETER_1] as number dim [New_Pipe_S] as number dim X as number if [New_Pipe_S] = 0 then X = [DIAMETER_1] else X = [New_Pipe_S] end if Final_Dia = X [ATTACH=CONFIG]19945[/ATTACH]
... View more
12-14-2012
07:38 AM
|
0
|
4
|
871
|
POST
|
I have the same problem. A trick I use to get around this is this: Use "invisible" labels. 1. Pick the layer whose symbols you don't want covered up 2. Enable labels for that layer, make label weight "HIGH". Make the text of the label invisible, aka "no colour". Make the label at the CENTER of the point or line. Play around with the settings and label fields to something that basically covers your symbol. 3. For the other labels, set label weight "medium" or "low". At times i've had to make a complete dummy layer just for the purpose of squashing those pesky unwanted labels. Hope this helps!
... View more
10-24-2012
09:22 AM
|
1
|
1
|
1253
|
POST
|
(the script was straight from the ESRI python tutorial) >>> #Buffer the roads feature class for each distance in the distance list ... import arcpy ... arcpy.env.workspace = r"C:\PETER PENG\ppTests.gdb" ... fc = "TestApr17" ... distanceList= ["100 meters", "200 meters", "400 meters"] ... #loop thru ea distance in the distanceList ... for dist in distanceList: ... outName = fc+"_"+dist ... arcpy.Buffer_analysis(fc, outName, dist) ... print "Finished buffering" ... Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000210: Cannot create output C:\PETER PENG\ppTests.gdb\TestApr17_100 meters Failed to execute (Buffer). >>> - Tried the non-python method: Buffer tool in toolbox, worked! - Tried different file path names, taking away "_". Does Python not accept " "(space)? I thought raw data was fine? - Message Log attached - Have no idea how to get this simple script to work, any help appreciated!
... View more
04-17-2012
09:11 AM
|
0
|
3
|
620
|
POST
|
Purpose: I have 1 field in a large table with numbers in mm, want to show in m. Want to use python to multiply by 1000. Want to use the Python Field Calculator for this. Code: def func( height ): return (height*1000) HEIGHT_MM= func(!HEIGHT_MM) Result: the code succeeds (no syntax errors), but nothing happens to the numbers in my field!
... View more
04-10-2012
11:10 AM
|
0
|
2
|
520
|
Title | Kudos | Posted |
---|---|---|
1 | 10-24-2012 09:22 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|