|
POST
|
Easiest way is to select all features you want within your map extent and zoom to selected.
... View more
05-16-2012
07:01 AM
|
0
|
0
|
1499
|
|
POST
|
Try doing a sample of each projection you want in ArcMap and it will give you a list of valid transformations. Then after you run it you can use the copy as python snippet as base to put in to each if case of your code.
... View more
05-16-2012
06:36 AM
|
0
|
0
|
988
|
|
POST
|
You cannot project an undefined coordinate system without defining the input coordinate system.
... View more
05-16-2012
06:22 AM
|
0
|
0
|
988
|
|
POST
|
What is your input coordinate system? You probably have to define a transformation.
... View more
05-16-2012
05:56 AM
|
0
|
0
|
988
|
|
POST
|
Or, if you have to do it a lot, why not function? def printline(message):
"""printline(message)
message(string):
The message to be printed
"""
print message
arcpy.AddMessage(message)
printline("Hello World!")
... View more
05-16-2012
05:50 AM
|
0
|
0
|
3276
|
|
POST
|
so it works the first time but fails to change the text when you run the same code a second time: var_text = "1200"
>>> element_name = "map_ID"
>>> for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", element_name):
... if elm.name == element_name:
... elm.Text = (var_text)
first time no problem at all, second time I just change var_text to some other thing "1201" for instance and it doesn't update the text. Any ideas? Edit: More info, if I double click on text and then exit properties, then run the script again with a different # for var_text it works. This defeats the purpose of the script though (automate the maps) so hoping to find a way around it Try this. The line elm.Text won't work. Capitalization is important, as is indenting. Though in this case, the indentation you used was fine.
for elm in arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT",element_name):
elm.text = var_text
... View more
05-16-2012
05:24 AM
|
0
|
0
|
3385
|
|
POST
|
Can you not just save it as a feature class and upload to SDE after processing?
... View more
05-15-2012
08:28 AM
|
0
|
0
|
1060
|
|
POST
|
Here's what I do.
var_text = "Some title/number etc"
element_name = "ID"
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", element_name):
if elm.name == element_name:
elm.text = (var_text)
... View more
05-15-2012
05:14 AM
|
0
|
0
|
3385
|
|
POST
|
I use dataframe.extent = lyr.getExtent(True) i don't know how much faster it really is though.
... View more
05-14-2012
02:25 PM
|
0
|
0
|
605
|
|
POST
|
Do your lines have a common ID that links each vertex to a particular line? You could try creating a point feature class with the make XY event layer tool and then using Points to Line.
... View more
05-14-2012
08:49 AM
|
0
|
0
|
1946
|
|
POST
|
This looks like the problem here. mxd = arcpy.mapping.MapDocument(ws + m) This would output this "X:\DATA\07_Reporting\MapDocuments\UTC_Factsheet_ANCsyour_mxd.mxd" You'd want something like mxd = arcpy.mapping.MapDocument(os.path.join(ws,m))
... View more
05-14-2012
07:34 AM
|
0
|
0
|
2715
|
|
POST
|
I am using QGIS. So why would you come here looking for answers?
... View more
05-14-2012
06:45 AM
|
0
|
0
|
518
|
|
POST
|
Are you getting an error on your toolbox import or when you try to execute tools from the toolbox?
... View more
05-14-2012
06:08 AM
|
0
|
0
|
1155
|
|
POST
|
Thanks! That at least create a outCS but still I can't project cause I get this error "Runtime error <class 'arcgisscripting.ExecuteError'>: Undefined geographic transformation. " while on the hel guide says that transformation is an option parameter.... Post your line of code that is failing. And the transformation parameter is not optional in a lot of cases.
... View more
05-14-2012
05:52 AM
|
0
|
0
|
1678
|
| 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
|