|
POST
|
You need to create a text element that you want as your title, and you need to name it whatever you want to reference in the "element_title" parameter. You can read the help doc to get all the information you need. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000003w000000
... View more
06-12-2012
06:23 AM
|
0
|
0
|
2145
|
|
POST
|
Hi there, I just ran this script and it worked great for what I required; However, it wasn't perfect. I did get square buffers around the coordinates I supplied but the buffer distance wasn't accurate. I entered "375" for bufDist to create a 750m x 750m rectangle but the output created a 739m x 739m rectangle instead. An equal difference of 10.5m in each direction. Do you have any suggestions as to what happened?? Thanks! p.s. the script is fantastic, I just don't understand Python all that well to troubleshoot! What projection are you working in? Are you working in different projections that might have an erroneous transformation?
... View more
06-12-2012
05:46 AM
|
0
|
0
|
2351
|
|
POST
|
You have an invalid pathname. Needs to be r"C:\Users\Burleigh Lab\Desktop\2050Maps\trial13.shp"
... View more
06-11-2012
01:11 PM
|
0
|
0
|
1640
|
|
POST
|
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "element_title"):
if elm.name == "element_title":
elm.text = ("Some text")
... View more
06-11-2012
12:00 PM
|
0
|
0
|
2145
|
|
POST
|
You can only do selections on layers, not feature classes. Also, this is the syntax. SelectLayerByLocation_management (in_layer, {overlap_type}, {select_features}, {search_distance}, {selection_type})
... View more
06-11-2012
11:54 AM
|
0
|
0
|
2801
|
|
POST
|
If you have ArcGIS 10.x you can simply do a select by location based on subdivisions that have storm sewers, and then do a switch selection.
... View more
06-07-2012
11:54 AM
|
0
|
0
|
788
|
|
POST
|
I think where you have strings like "tableName_tmp1.shp" You want to use tableName_tmp1
... View more
06-07-2012
09:55 AM
|
0
|
0
|
1771
|
|
POST
|
To get the mxd path. mxd = arcpy.mapping.MapDocument("current") mxd_path = mxd.filePath
... View more
06-07-2012
08:04 AM
|
0
|
0
|
1823
|
|
POST
|
That sounds like you are trying to do a Split If you need more control than that, this should work. Assumes BoomNumber is a numeric value. import arcpy from arcpy import env env.workspace = "D:\\Lee\\IrrigationProject" In = "boombuffer.shp" Out = "D:\\Lee\\IrrigationProject\\IrrigationModel\\BoomBuffers\\Boom" boom_list = [] boom = None field_name = "BoomNumber" delim_field_name = arcpy.AddFieldDelimiters(env.workspace,field_name) # Creates and runs cursor to add all unique values to a list s_curs = arcpy.SearchCursor(In) for s_row in s_curs: add_val = s_row.getValue(field_name) if add_val not in boom_list: boom_list.append(add_val) # Loops through list of unique boom values and export each one to a new shapefile for boom in boom_list: arcpy.Select_analysis(In, Out + str(boom) + ".shp", "{0} = {1}".format(delim_field_name,boom)
... View more
06-07-2012
07:17 AM
|
0
|
0
|
1013
|
|
POST
|
You have a bunch of brackets missing (or extra), that's probably the reason for the interpreter not being able to untabify properly. Also, all your .shp files need to be in string quotes. Eg. tableName_e.shp > "tableName_e.shp"
... View more
06-07-2012
06:13 AM
|
0
|
0
|
1771
|
|
POST
|
Something like this should work. variable = "Boom"
field_name = "BoomNumber"
delim_field_name = arcpy.AddFieldDelimiters(env.workspace,field_name)
arcpy.Select_analysis(In, Out + str(Boom) + ".shp", "{0} = '{1}'".format(delim_field_name,variable) Or maybe I didn't understand what you are trying to do. Is Boom your attribute or your variable you want to pass?
... View more
06-06-2012
02:36 PM
|
0
|
0
|
1013
|
|
POST
|
Try this. This assumes the dID is a numeric value, otherwise you need to add quotes. delim_DestMFld = arcpy.AddFieldDelimiters(DestFC,DestMFld) DRows = arcpy.UpdateCursor(DestFC, "{0} = {1}".format(delim_DestMFld,dID))
... View more
06-06-2012
01:55 PM
|
0
|
0
|
2886
|
|
POST
|
Thanks everyone. I have an additional question, but not related terms. For the code in this script it renames a legend element on the map. My question is what purpose does the [0] serve in making the code work/ what purpose does it serve? Please see image below for a clear picture of the issue. [ATTACH=CONFIG]14995[/ATTACH] The [0] assigns the first index value to the variable. Without that index reference there it returns a list instead of a single object.
... View more
06-06-2012
01:03 PM
|
0
|
0
|
5176
|
|
POST
|
I believe you can execute a python script through a .NET button using ArcObjects. Don't ask me how though, and I don't think it is really supported by Esri. Similar discussion here recently. http://forums.arcgis.com/threads/58207-ArcPy-and-Tkinter
... View more
06-06-2012
12:19 PM
|
0
|
0
|
2766
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|