|
IDEA
|
I realize this is really old so I'm going to close it. This is something we can't address with Python in ArcGIS Pro since Addins are not supported. A tool like this could be built using the .Net SDK. Jeff - Layout and arcpy.mp teams
... View more
09-30-2022
02:27 PM
|
0
|
0
|
437
|
|
IDEA
|
This is something we plan to implement. Hopefully for ArcGIS Pro 3.1 Jeff - Layout and arcpy.mp teams
... View more
09-30-2022
02:23 PM
|
0
|
0
|
2333
|
|
IDEA
|
Hello Bob, I know this is an old post and you may have discovered the solution by now. arcpy.mp Map.exportToMAPX() has been available for a while now. We don't have API calls to update the internals of a MAPX or PAGX but you can use ArcGISProject.importDocument(), make the changes using the API and then export back to the same MAPX or PAGX. I hope this helps, Jeff - layout and arcpy.mp teams
... View more
09-30-2022
01:52 PM
|
0
|
0
|
724
|
|
IDEA
|
This is planned for Pro 3.1. We have a new ArcGISProject.createMap() function. Jeff - Layout and arcpy.mp teams
... View more
09-26-2022
09:47 AM
|
0
|
0
|
2955
|
|
IDEA
|
This is something we definitely want to address but it will take time. Arcpy.mp has definitely grown beyond the capabilities of arcpy.mapping (for ArcMap). At 3.1 we are adding some content management operations like ArcGISProject.createMap(), ArcGISProject.deleteItem() / ArcGISProject.copyItem() - for maps, layouts, and reports, and ArcGISProject.updateFolderConnections(). We didn't add createLayout because there is no point in creating a layout when we also can't create all the possible layout elements. It will come in time. At least with Pro 3.1 you'll be able to copy and existing layout and make modifications. Currently, you can also export a layout to PAGX and import it to essentially make a copy. Jeff - Layout and arcpy.mp teams
... View more
09-26-2022
09:45 AM
|
0
|
0
|
3935
|
|
IDEA
|
There are no plans to implement a toolbox tool to generate bookmarks from features BUT we do plan on expanding the arcpy.mp API to allow you to create and update bookmarks using Python. Will this be an acceptable alternative? Caution - I would be concerned with creating bookmarks from feature extents if there are a large number of features, 100's, 1000's or even more. Our goal is to implement a near term arcpy.mp alternative (currenting planning for Pro 3.2)
... View more
09-26-2022
09:35 AM
|
0
|
0
|
2178
|
|
IDEA
|
This is something we want to address near term. The current plan is for Pro 3.2.
... View more
09-26-2022
09:31 AM
|
0
|
0
|
3976
|
|
IDEA
|
Setting the page size in arcpy.mapping (for ArcMap layouts) will not be implemented. It is implemented as part of arcpy.mp in ArcGIS Pro. The Layout Object has a pageUnits, pageHeight, and pageWidth properties. https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layout-class.htm Jeff - Layout and arcpy.mp teams
... View more
09-26-2022
09:27 AM
|
0
|
0
|
785
|
|
IDEA
|
Arcpy.mp provides the ability to change pages sizes as well as element sizes. Trying to automate the resizing of elements to match 10 possible configurations, including orientation, would NOT be a simple script. The application recently provided new resizing options (see graphic below) that will attempt to resize elements based on a newly chosen page size but the result almost always requires some fine tuning to get everything aligned just the way you would want it. It would only work perfectly if the aspect ratios for all elements are the same. I think the best way to tackle this solution using Python would be to follow the techniques used in this downloadable sample: https://www.arcgis.com/home/item.html?id=82b99b5593e54e57b740e3898fb14c5f It persists all the layout elements, sizes, and positions in a database table. The script reads the table and recreates the layout based on the information in the table. The script/table could easily be modified to include layout size. There is a detailed README in the sample that will provide more detail.
... View more
09-26-2022
08:00 AM
|
0
|
0
|
2121
|
|
IDEA
|
This can be accomplished using arcpy.mp. A sample was provided.
... View more
09-19-2022
09:46 AM
|
0
|
0
|
2081
|
|
IDEA
|
Hello Macbeer, This could be accomplished by iterating through the MapFrames on a layout. Once you have a MapFrame, then you can get to its associated Map. And then you can get to the layers. Here is a snippet: p = arcpy.mp.ArcGISProject('current') for lyt in p.listLayouts(): for mf in lyt.listElements('MapFrame_Element'): m = mf.map print(f"Layout: {lyt.name}, MapFrame: {mf.name}, Map: {m.name}") Here is a screenshot that includes the indents: Jeff - Layout and arcpy.mp teams
... View more
09-19-2022
09:03 AM
|
0
|
0
|
2093
|
|
POST
|
Interesting, the variable inside the quotes works for me. And correct, if the map is already open and not active, zooming won't. We can't identify specific map view by name because a map could have 3 map views, each with different extents. That is why we developed OpenView(). You can either change the default camera extent before opening a view OR use the navigation functions after opening a view. Jeff - Layout and arcpy.mp teams
... View more
09-13-2022
11:00 AM
|
0
|
0
|
3573
|
|
IDEA
|
Teresa, I understand that you may not be familiar with Python map automation. Our APIs are designed to help customers extend the capabilities of the UI while avoiding overloading the UI with options. But that is not to say we won't consider improving the export options in the UI. The script could be modified to iterate through each unique "group" value and do the same export without having to hard code the values in the script. I kept it very simple so you could see the logic vs the interface. Jeff - Layout and arcpy.mp teams
... View more
09-13-2022
09:12 AM
|
0
|
0
|
8618
|
|
POST
|
Here is a snippet of code that works in the application using the current keyword. I'm using a point FC in the first map and using the linkID to zoom to another layer in the second map using the ID. p = arcpy.mp.ArcGISProject('current') m1 = p.listMaps('Map')[0] m2 = p.listMaps('Map1')[0] #M1/layer1 - point FC assuming 1 feature is selected lyr1 = m1.listLayers('PointFC')[0] cursor = arcpy.SearchCursor(lyr1) for row in cursor: linkID = row.getValue("LinkID") print(linkID) #M2/layer2 - zoom to polygon feature lyr2 = m2.listLayers('PolygonFC')[0] lyr2.definitionQuery = "LinkID = linkID" view = m2.openView() view.camera.setExtent(view.getLayerExtent(lyr2, True))
... View more
09-12-2022
07:51 PM
|
1
|
0
|
3585
|
|
IDEA
|
Have you considered Python Map Automation? Groups are based on a field in the index layer. You can simply query for each group to create a selection set and use the selected export option. Here is a snippet of code for the above project: import arcpy, os, sys
p = arcpy.mp.ArcGISProject("CURRENT")
l = p.listLayouts('Layout')[0]
if not l.mapSeries is None:
ms = l.mapSeries
if ms.enabled:
ms = l.mapSeries
indexLyr = ms.indexLayer
#AFC-EAST
arcpy.management.SelectLayerByAttribute(indexLyr, "NEW_SELECTION", "TeamInfo.Conf_Div = 'AFC-EAST'")
ms.exportToPDF(r"C:\Temp\AFC_EAST.pdf", "SELECTED")
#AFC-NORTH
arcpy.management.SelectLayerByAttribute(indexLyr, "NEW_SELECTION", "TeamInfo.Conf_Div = 'AFC-NORTH'")
ms.exportToPDF(r"C:\Temp\AFC_NORTH.pdf", "SELECTED")
... View more
09-12-2022
07:16 PM
|
0
|
0
|
8633
|
| 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 |
3 weeks ago
|