|
IDEA
|
This will be implemented in Pro 3.4. We added a lowerBound property to the GraduatedColorsRenderer, GraduatedSymbolsRenderer and the RasterClassifyColorizer classes. The upperBound property already exists on the ClassBreak class. We also modified the behavior so if you want to show values out of range (using Python CIM Access), we automatically generate a default symbol so you don't need to test for and and potentially build it yourself. Here is a Pro 3.4 code snippet: #New Pro 3.4 lowerBound property and behavior to show values out of range
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('LowerBoundResult')[0]
l = m.listLayers()[0]
if hasattr(l.symbology, 'renderer'):
if l.symbology.renderer.type == 'GraduatedColorsRenderer':
sym = l.symbology
sym.renderer.lowerBound = 5 #3.4 lowerBound set on Renderer
sym.renderer.classBreaks[-1].upperBound = 96 #upperBound set on upper ClassBreak
l.symbology = sym
#Show values out of range using Python CIM Access
l_cim = l.getDefinition('V3')
l_cim.renderer.useDefaultSymbol = True #3.4 auto creates if not present
l_cim.renderer.defaultLabel = "Out of range"
l.setDefinition(l_cim)
... View more
06-13-2024
09:03 AM
|
0
|
0
|
3551
|
|
IDEA
|
Hello @AR_GISNinja , Have you looked at: ArcGISProject.copyItem() https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm You can easily iterate over however many times you want to duplicate a layout and give each one a unique name. Jeff - arcpy.mp and Layout teams
... View more
05-31-2024
07:36 AM
|
0
|
0
|
3663
|
|
IDEA
|
This is functionality we would like to provide in the arcpy.mp API but need to overcome a few technical hurdles.
... View more
04-16-2024
09:01 AM
|
0
|
0
|
2972
|
|
IDEA
|
@FredSpataro there is an ArcGISProject.homeFolder property. In fact when trying to rebuild a project using the techniques above by importing into a blank project, there are many other items to consider. ArcGISProject.databases / updateDatabases ArcGISProject.defaultGeodatabase ArcGISProject.defaultToolbox ArcGISProject.folderConnections / updateFolderConnections ArcGISProjec.homeFolder ArcGISProject.styles / updateStyles (Pro 3.3) ArcGISProject.toolboxes / updateToolboxes (Pro 3.3) ArcGISProject.updateConnectionProperties We are considering creating New Project but there are some technical hurdles we need to resolve. Jeff - arcpy.mp team
... View more
04-16-2024
08:59 AM
|
0
|
0
|
2974
|
|
IDEA
|
@FourCornersMapping the importDocument method can be found under the ArcGISProject help topic: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm This is not a replacement for your idea, it is a possible workaround for now. Python is great at automation. If you are not familiar with using Python for automation, I understand. The logic will need to be extended further if you want to set {reuse_existing_maps=False} because the object returned is a layout (for import PAGX) so you would need to know how to find the additiona, newly added maps that are also imported and then rename them accordingly. If there is a way to predict the names of the imported maps, then you could reference them and rename them using arcpy.mp. Here is an introductory help topic: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/introduction-to-arcpy-mp.htm Jeff m = p.listMaps('imported map name')[0]
m.name = "New Name"
... View more
04-16-2024
08:48 AM
|
0
|
0
|
1952
|
|
IDEA
|
Hello @FourCornersMapping, I can't speak to doing this in the User Interface but this might be automated using Python. For example, p = arcpy.mp.ArcGISProject('current')
newLyt = p.importDocument(r"C:\temp\Layout.pagx", True, True)
newLyt.name = "New Layout" This technique only allows you to rename one object at a time. In the above example, I'm using reuse existing maps = True so if the map already exists, it doesn't get recreated as a project item. The importDocument function can also be used to import mapx and many other file types. Jeff - arcpy.mp and Layout teams
... View more
04-12-2024
09:50 AM
|
0
|
0
|
2031
|
|
IDEA
|
With Pro 3.3, we added applyStyle(style_Item) to all Layout Elements that can be created using styles. This allows you to apply a style to an existing element in a layout. This does NOT include borders, shadows, etc because those properties are not persisted in a style BUT Python CIM access can be used to set these properties. Thanks, Jeff - arcpy.mp and Layout SDK teams
... View more
04-10-2024
11:38 AM
|
0
|
0
|
1735
|
|
IDEA
|
This will be available with Pro 3.3. Layer.createLabelClass(name, expression, {sql_query}, {labelclass_language}) Jeff - arcpy.mp and Layout SDK teams
... View more
04-10-2024
11:32 AM
|
0
|
0
|
2216
|
|
IDEA
|
This will be made available in Pro 3.3. The following members were added to the API: Layer.pageQuery - r/o Layer.setPageQuery({field_name}, {match}) Jeff - arcpy.mp and Layout SDK teams
... View more
04-10-2024
11:30 AM
|
0
|
0
|
1856
|
|
IDEA
|
@ted At Pro 3.3 we added createTableFrameElement and a new TableFrameElement class. I hope this helps with your requirements for "adding a table to a layout". Jeff - arcpy mp and Layout SDK teams
... View more
04-10-2024
11:24 AM
|
0
|
0
|
1983
|
|
IDEA
|
@-_- can you please explain how you are importing? I added the last two lines to the sample code I originally made available to see if writing to LYRX was losing its value. For me, its working as expected. #In this example, the first class break range is "62127 - 824344"
#The minimumBreak value is changed to "60000" via Python CIM Access
#BUT ... the label also needs to be updated to "60000 - 824344
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('State_Polygons')[0]
#Update mimimumBreak value via Python CIM Access
if hasattr(l.symbology, 'renderer'):
if l.symbology.renderer.type == 'GraduatedColorsRenderer':
l_cim = l.getDefinition('V3')
l_cim.renderer.minimumBreak = 60000
l.setDefinition(l_cim)
#Update the label to match the new value is seen via Histogram tab
sym = l.symbology
cb1 = sym.renderer.classBreaks[0]
cb1Lbl = cb1.label
update = cb1Lbl.replace(cb1Lbl.split('-')[0], str(l_cim.renderer.minimumBreak) + ' ' )
cb1.label = update
l.symbology = sym
#Test if values are persisted when saving to a LYRX
l.saveACopy(r'c:\Temp\MinValue.lyrx')
m.addDataFromPath(r'c:\Temp\MinValue.lyrx') #Min value is persisted Then I ran this as another way to test persistence. #Test values can be applied to other layers.
l1 = m.listLayers('Original')[0] #Made a copy prior to running script above
l2 = m.listLayers('State_Polygons')[0]
l1.symbology = l2.symbology Is it possible it is layer type or data specific? Jeff
... View more
04-04-2024
02:50 PM
|
0
|
0
|
3830
|
|
IDEA
|
Thank you for your feedback, @-_- This can be accomplished via Python CIM access: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm In addition to changing the CIM minimumBreak value, you also need to change the label for the first class break to include your modified value. Here is a code snippet: #In this example, the first class break range is "62127 - 824344"
#The minimumBreak value is changed to "60000" via Python CIM Access
#BUT ... the label also needs to be updated to "60000 - 824344
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('State_Polygons')[0]
#Update mimimumBreak value via Python CIM Access
if hasattr(l.symbology, 'renderer'):
if l.symbology.renderer.type == 'GraduatedColorsRenderer':
l_cim = l.getDefinition('V3')
l_cim.renderer.minimumBreak = 60000
l.setDefinition(l_cim)
#Update the label to match the new value is seen via Histogram tab
sym = l.symbology
cb1 = sym.renderer.classBreaks[0]
cb1Lbl = cb1.label
update = cb1Lbl.replace(cb1Lbl.split('-')[0], str(l_cim.renderer.minimumBreak) + ' ' )
cb1.label = update
l.symbology = sym Jeff - Layout (SDK) and arcpy.mp teams
... View more
03-27-2024
04:57 PM
|
0
|
0
|
3908
|
|
IDEA
|
This is planned for ArcGIS Pro 3.3. Jeff - Layout SDK and arcpy.mp teams
... View more
03-01-2024
07:40 AM
|
0
|
0
|
1535
|
|
IDEA
|
@sadlkjiouasdf try ArcGISProject.deleteItem(project_item) https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm Jeff - Layout SDK and arcpy.mp teams
... View more
02-26-2024
02:38 PM
|
0
|
0
|
2971
|
|
IDEA
|
This will be introduced in Pro 3.3. Layout.createTableFrameElement(geometry, {mapframe}, {table}, {fields}, {style_item}, {name}) There will also be a TableFrame class Jeff - Layout and arcpy.mp teams.
... View more
02-26-2024
12:28 PM
|
0
|
0
|
1667
|
| 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 |
2 weeks ago
|