|
POST
|
Clone() is a method on the text element or graphic element classes. Check out the second example on the graphic element class. It builds a dynamic table by cloning graphic lines and text. http://resources.arcgis.com/en/help/main/10.1/#/GraphicElement/00s300000040000000/ Jeff
... View more
05-10-2013
07:24 AM
|
0
|
0
|
3278
|
|
POST
|
I thought one possibility was how the layer file was created: from an MXD with or without relative paths. I tested changeing data sources on group layers both ways and it is working for me.
import arcpy
fullLyr = arcpy.mapping.Layer(r"C:\Temp\FullPath.lyr")
lyrs = arcpy.mapping.ListLayers(lyr1)
for lyr in lyrs:
if lyr.supports("DATASOURCE"):
lyr.findAndReplaceWorkspacePath(r"C:\Temp", r"C:\Active\ArcPY\ScrumWorks\Data")
fullLyr.saveACopy(r"C:\Temp\FullPath2.lyr")
relLyr = arcpy.mapping.Layer(r"C:\Temp\RelPath.lyr")
lyrs = arcpy.mapping.ListLayers(lyr2)
for lyr in lyrs:
if lyr.supports("DATASOURCE"):
lyr.findAndReplaceWorkspacePath(r"C:\Temp", r"C:\Active\ArcPY\ScrumWorks\Data")
relLyr.saveACopy(r"C:\Temp\RelPath2.lyr")
Jeff
... View more
05-09-2013
10:25 AM
|
0
|
0
|
3050
|
|
POST
|
At 10.1 we added graphic element and text element cloning. If you have a pre-authored text element in your layout, then you can clone it an place it as many times as you need. Jeff
... View more
05-09-2013
08:41 AM
|
0
|
0
|
4231
|
|
POST
|
At 10.1, text and graphic elements can be cloned. So you can author a single element with the font, color, etc and clone when needed elsewhere. Arcpy does not allow you to change text color, font and many other properties directly although you can do it by setting the text string to include tags. Jeff
... View more
05-09-2013
07:15 AM
|
0
|
0
|
3278
|
|
POST
|
This can be done and is best done with arcpy.mapping. You can have two DDP enabled MXDs, one for each side but ultimately you will need arcpy.mapping to merge the pages into the order you needed them. There is an arcpy.mapping sample in the help that demonstrates this with "facing pages". http://resources.arcgis.com/en/help/main/10.1/#/Creating_a_map_book_with_facing_pages/00s90000002p000000/ Jeff
... View more
05-03-2013
06:30 AM
|
0
|
0
|
1325
|
|
POST
|
I can't reproduce either but that doesn't mean there isn't an issue. I need to know more about your system environment. Please answer the following: Are you using an English OS ? If not, please specify. Are you using an English ArcGIS Desktop or a localized ArcGIS Desktop to reproduce the issue? Please provides your workflow. Thanks, Jeff
... View more
05-01-2013
10:22 AM
|
0
|
0
|
1615
|
|
POST
|
I don't have experience with unicode but these discussions do exist: http://forums.arcgis.com/threads/7924-æøå-and-python?highlight=unicode http://forums.arcgis.com/threads/68291-Python-window-encoding-problem-special-characters?highlight=unicode http://forums.arcgis.com/threads/17284-Unicode-problems!!!?highlight=unicode http://forums.arcgis.com/threads/49133-Change-text-to-Unicode?highlight=unicode http://forums.arcgis.com/threads/32165-Field-calculator-VBA-UTF-8-characters?highlight=unicode Jeff
... View more
04-23-2013
08:15 AM
|
0
|
0
|
1156
|
|
POST
|
There is not a way to create symbols using arcpy. Jeff
... View more
04-18-2013
09:00 AM
|
0
|
0
|
615
|
|
POST
|
Can you send me a map package and your script to [email protected]. Jeff
... View more
04-17-2013
07:20 AM
|
0
|
0
|
3745
|
|
POST
|
If you are referencing the MXD via path (e.g., r"C:\Temp\mymap.mxd") and then making changes, you must save your changes at the end of the script. Use mxd.save() or mxd.saveACopy(path). This script probably works if you replace the MXD path with the keyword "current". I can see that you have refresh functions at the end. The refresh functions are needed if using current but don't help if working against an MXD on disk. Jeff
... View more
04-16-2013
07:50 AM
|
0
|
0
|
3745
|
|
POST
|
Arcpy.mapping parameters can't be skipped with empty quotes. In Python, if you want to skip parameters, you must call out the parameter name and set it appropriately. Once you do that, all subsequent parameters must be set the same way. Jeff
... View more
04-12-2013
07:22 AM
|
0
|
0
|
1727
|
|
POST
|
You are correct, DDP can't be used for this scenario because DDP will change extents for each feature in the index layer. This can be done using arcpy.mapping. You can't change the symbology for the individual symbols but what you can do is author an MXD with the appropriate symbology and also set the selection symbol. Then iterate through the features by performing an arcpy.SelectLayerByAttribute_management on each feature to highlight it. Jeff
... View more
04-10-2013
06:32 AM
|
0
|
0
|
528
|
|
POST
|
elmWidth = 2.5 should be elm.elementWidth = 2.4 Jeff
... View more
03-28-2013
12:26 PM
|
0
|
0
|
904
|
|
POST
|
It may even be possible with arcpy.mapping along with Python Addins (for trapping events). Check out the following topic: http://resources.arcgis.com/en/help/main/10.1/#/StyleItem/00s30000006z000000/ Jeff
... View more
03-28-2013
08:11 AM
|
0
|
0
|
1827
|
|
POST
|
I changed two things. First, it looks odd to see you using arcpy and arcgisscripting(9.3) so I changed the first few lines to:
import arcpy, os, sys, string
scriptVar = arcpy.GetParameterAsText(0)
Second, I think the issue is your double forward quotes and single forward quote at the end of the string. Try changing: arcpy.mapping.ExportToJPEG(mxd, r"H://Desktop/map_export/" + outfile ... to arcpy.mapping.ExportToJPEG(mxd, "H:\\Desktop\\map_export\\" + outfile ... In Python you can have: r"C:\Temp\file" or "C:\\Temp\\file" or "C:/Temp/file I also found single slashes at the very end of a quote don't work all the time. Jeff
... View more
03-22-2013
06:24 AM
|
0
|
0
|
1257
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-05-2025 11:20 AM | |
| 3 | 06-05-2025 09:21 AM | |
| 1 | 05-14-2025 01:19 PM | |
| 2 | 04-24-2025 07:54 AM | |
| 1 | 03-15-2025 07:19 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-23-2026
10:29 AM
|