|
POST
|
See A Quick Tour of Creating Script Tools (10.0 doc, but applies to 9.3 as well) For 9.3, see An Overview Of Script Tools
... View more
01-18-2011
11:31 AM
|
0
|
0
|
2931
|
|
POST
|
There's the Save To Layer File tool. To select features based on location, use the Select Layer By Location tool I'm pretty sure you'll find everything you need in the Layers and Table Views toolset.
... View more
01-10-2011
02:34 PM
|
0
|
0
|
2843
|
|
POST
|
Ha! If I had a dollar for every typo and wrong path Ive had I could hire a programmer to do this stuff for me. And I'd be retired, living in luxury in some tropical isle, drinking Pina Coloda's a boring everyone with how the Intersect tool works...
... View more
11-19-2010
12:54 PM
|
0
|
0
|
1524
|
|
POST
|
At 10.0, there is a new tool, Convert Coordinate Notation, that does some interesting coordinate transformations. It (probably) won't directly solve your exact problem, but I wanted to mention it for anyone stumbling upon this tread.
... View more
11-19-2010
12:42 PM
|
0
|
0
|
3051
|
|
POST
|
Your 1st parameter is a Table View Your 2nd parameter is a Field, Obtained From is set to the first parameter These first two parameters are required inputs Your 3rd parameter is a String and is a derived output. Obtained From is blank
... View more
11-11-2010
07:30 AM
|
0
|
0
|
1405
|
|
POST
|
What this tool does is output the value of a specific field in the first row of a table (or feature class). The workflow is that the user selects a single row in a table (the row with your vehicle characteristics, I guess). The script reads this row and outputs a value (an oval in ModelBuilder). You then use this value in downstream processes. So the script doesn't execute anything -- it just outputs a value that you use in ModelBuilder. Take a look at the discussion in this topic: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00400000001m000000.htm Scroll down until you find the discussion of Get Field Value. It shows an example model using Get Field Value and in-line variable substitution. (The script tool I suggested does the same thing as Get Field Value). This is 10.0 documentation, but it would work exactly the same way in 9.3
... View more
11-09-2010
09:10 AM
|
0
|
0
|
1405
|
|
POST
|
If you're using 10.0, there is a Model-Only tool you can use called Get Field Value. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Get_Field_Value/004000000006000000/ You can only use Get Field Value in ModelBuilder. It is accessed from the ModeBuilder menu (Insert > Model Only Tools). See http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Accessing_Model_Only_tools/002w00000066000000/ Get Field Value was introduced at 10.0. If you don't have 10.0, you'll have to write a script tool. I thought I had this implemented and could attach the script, but unfortunately I can't find it. The logic is fairly simple... The script takes two arguments, a table and a field. A cursor is opened on the input table and the value of the field is retrieved from the first record of the input table. The value is output as the third parameter (i.e., SetParameterAsText(2) ). Here's the basic (untested) code: import arcgisscripting
gp = arcgisscripting.create(9.3)
intable = gp.GetParameterAsText(0)
infield = gp.GetParametersAsText(1)
# open cursor
rows = gp.searchcursor(intable)
row = rows.next()
fval = row.GetValue(infield)
gp.SetParameterAsText(2, str(fval))
For more help on creating script tools, start here: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_creating_script_tools
... View more
11-09-2010
08:29 AM
|
0
|
0
|
1405
|
|
POST
|
The Clip tool honors the Extent environment setting. Using the connect tool in MB, connect the shapefile to the Clip tool. When connecting, a pop-up dialog appears and you can select "Environment > Extent". When the tool runs, only those cells w/in the extent of the shapefile are used. See http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Output_Extent/001w00000009000000/ for more info.
... View more
11-05-2010
11:28 AM
|
0
|
0
|
387
|
|
POST
|
A shot in the dark here -- do your input field values have <Null> values, empty text strings, or text strings with illegal characters? It could be Pivot Table is trying to create a field name on the output table using these nonsensical values. Typically, this case yields another error (99999 I think), but it might also yield 210. This is something we've fixed in 10.0 Service Pack 1 (made it more informative anyway), due out any day.
... View more
11-04-2010
03:54 PM
|
0
|
0
|
1090
|
|
POST
|
There's a blog about this: http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2009/03/06/Tips-and-tricks-_2D00_-accessing-feature-shape-in-Calculate-Field.aspx
... View more
11-03-2010
11:03 AM
|
0
|
0
|
1684
|
|
POST
|
Coming late to this post... one thing that stands out is this code: # Define the Site Location Feature Class
siteloc = gp.GetParameterAsText[0] It should be: siteloc = gp.GetParameterAsText(0) (Note use of parentheses as opposed to brackets. I suspect you've found this out...)
... View more
10-26-2010
09:26 AM
|
0
|
0
|
838
|
|
POST
|
Describe the workspace - the returned describe object has a list of domains. See http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Workspace_properties
... View more
10-26-2010
09:18 AM
|
0
|
0
|
1408
|
|
POST
|
I, too, have a hard time figuring out the correct scripting syntax for things like Calculate Field. The foolproof way is to execute the tool using its dialog then open the Results window (10.0) or the Results tab (9.3), right-click the result and click "Copy as Python snippet". This copies the code snippet to the clipboard and you can then paste it into your script. Executing the tool to get the code snippet sort of defeats the purpose of writing a script (you just executed the tool in order to figure out how to execute the tool). So I usually execute the tool on a toy dataset in order to get the snippet.
... View more
10-04-2010
10:26 AM
|
0
|
0
|
743
|
|
POST
|
When you create the script tool, set your field parameter "Obtained From" property to the feature class. See the section on "Obtained From" in http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Setting_script_tool_parameters
... View more
10-04-2010
09:44 AM
|
0
|
0
|
747
|
|
POST
|
This is a mystery -- Get Count (using the mechanics that Chris showed) should be WAY faster than cycling through the records with a cursor. There's something about your data or process that we're missing -- any other clues (besides # of records, like Chris asks?)
... View more
09-07-2010
08:41 PM
|
0
|
0
|
3294
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-30-2013 04:37 PM | |
| 1 | 03-27-2013 10:03 AM | |
| 2 | 11-15-2013 12:33 PM | |
| 1 | 04-30-2013 11:26 AM | |
| 1 | 07-26-2011 08:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|