-
ArcPy/CIM Symbology Automation Support for Utility Network Subtype Layers
Currently, when working with heavily managed Utility Network (UN) datasets, enterprise administrators cannot scale or automate map production using Python scripts. Subtype Group Layer sublayers isolate their rendering pipeline from the standard ArcPy/CIM environment. When attempting to programmatic change symbols on a…
-
arcpy.mp Map and Layout isOpen
For arcpy.mp Maps arcpy.mp.ArcGISProject("CURRENT").listMaps() and Layouts arcpy.mp.ArcGISProject("CURRENT").listLayouts() add an isOpen boolean property. Use case: layout = arcpy.mp.ArcGISProject("CURRENT").listLayouts('My Layout')[0] if not layout.isOpen: layout.openView() Without this, if the user runs the script…
-
Add ability to check if specified features are visible in current map frame extent
I am working on a script that iterates through a grid feature class, zooms/pans to the next square of the grid and outputs a PDF, compiling them all into one PDF to be printed into an atlas booklet. This is an internal script that has been rewritten many times to accommodate different uses for different departments and…
-
arcpy.mp support for Thematic Map Series
Currently, arcpy.mp supports Spatial Map Series (MapSeries class) and Bookmark Map Series (BookmarkMapSeries class) but the third and final type of map series, Thematic Map Series, is not supported. For a layout that contains a Thematic Map Series, the Layout.mapSeries property returns None, as if the layout had no map…
-
Context Manager for arcpy.mp.ArcGISProject()
Add Python context manager to arcpy.mp.ArcGISProject() to properly handle the setup and cleanup of the project file and resources, ensuring that they are properly managed, even if exceptions occur. I have encountered and read about aprx locks due to Python scripts even when project object is deleted and no exceptions…
-
Better CIM Type Hinting
The CIM module is incredibly powerful, but navigating the objects in it is a pain whenever you go more than one level deep. To fix this you can pretty simply just add the stored object type string as a hint in all files. The result is a developer experience like this: As opposed to one where objects not immediately in the…
-
Set the Extent of a MapView Object
The ArcPy Camera object, utilized by both MapView and MapFrame objects, is currently broken for usage within a MapView. This flaw is acknowledged in the documentation for Camera.setExtent(): "Sets the Extent for a map frame in a layout." A camera object obtained from MapView.defaultCamera can have setExtent() called on it,…
-
Add typing stubs to mp module
Currently the only type that has an interface in the mp module is `ArcGISProject`. This causes tons of headaches when working with any other mapping classes as Pylance has no idea what any of the types in the module are. This has already been done for a lot of da module objects (*Cursor, Editor, etc.), but for some reason…
-
Layout Refresh method for arcpy.mp
Currently there is no way to "refresh" a standard Layout object using the mp module. You can however refresh a mapseries. import arcpy.mp as mp # Current behavior for mapseries project = mp.ArcGISProject("CURRENT") layout = project.listLayouts()[0] layout.mapSeries.refresh() # Desired behavior for layouts project =…
-
Setting the lower limit of graduated color symbols in Python
I can't find a way to do this so I'll post it as an idea. When setting graduated color symbols, the upper and lower limits are first set by natural classification. At this time, the minimum value is set to the minimum value of the lowest range, but although there was a way to rewrite this in Python in ArcMap, it is no…
-
Provide map surround type of Table Frame
Please provide a Table Frame type that can be used with createmappSurroundElement method of the Layout Class. Currently the only supported types are Legent, North Arrow, and Scale Bar. Besides cloning a CIM object there doesn't appear to be a procedure for creating a Table Frame in arcpy.
-
Expose Blend Modes to Arcpy.mp Module
It's entirely possible this exists, and I just haven't been able to find it, but given blend modes themselves seem pretty new, I'm going to hazard a guess it doesn't exist, yet. Problem/Use Case: I'm currently building a tool that automatically pulls selected as-built & design drawings for an area into the active map. In…
-
ArcGISProject.activeView: Return table, etc. views.
So, a colleague of mine recently ran into an issue where a tool was failing in updateParameters() because on a particular line, the list index was out of range. Is the code in question (Error caused by line 3 in this snippet): aprx = arcpy.mp.ArcGISProject('current') mv = aprx.activeView if str(mv).split('…
-
A new ArcPy method to close a single map view
I build automation tools for my team. Most of them are written in python and some are written using ArcPy. I have a tool that does many things, but one of them is to create a map called "MyMap" if it doesn't exist or to close "MyMap" if it exist and is open, add some data to "MyMap" and open/reopen it for the user.…
-
open/activate map with arcpy
A simple yet powerful method in ArcPy is missing: opening/activating an existing map. It is possible to add a new map (newMap = aprx.createMap("Map")) and it is also possible to get the (last) active maps (aprx = arcpy.mp.ArcGISProject("current") //active_map = aprx.activeMap). What's missing is a method to not only…
-
Add enable/disable edit/selection method to Layer Class
In Pro, I can enable/disable editing/selection of specific layers via the List by Editing tab and the List by Selection tab. I would like to be able to be able to do the same using arcpy. Example use case: I have a map with specific layers that I want to protect the source data from being inadvertently modified during an…
-
Export Symbology as Python
I'd like the ability to export the symbology of a layer in the ArcGIS Pro canvas as a python snippet. When I'm writing a script tool that performs some loading and symbology of layers, I sometimes have to run the script over and over again to ensure that the symbology is what I want. It would be really cool if I were able…
-
Open map or layout window using arcpy
Using arcpy in a Geoprocessing script, I can import a map or layout into the project. However I can't make it 'open' as a new window. It would be really good if this was possible.
-
Improved documentation for updateConnectionProperties(): workspace_factory
Please see this post for more details. For context, I've been trying to write some code to mass-replace data sources. However, Pro's only way to do this, updateConnectionProperties(), requires you to know not just the file path, but what type of file and workspace it belongs to. * This would be fine except there's no…
-
Tips for ArcGIS Pro?
Hi! I’m working with ArcGIS Pro for the very first time. I’m well-acquainted with ArcMap as I’ve been using it for two years, but I know nothing about ArcGIS Pro. Does anyone have tips for using ArcGIS Pro or know of any good Youtube channels/forums I can reference if I get stuck? I’m a bit overwhelmed by the huge…
-
Vary symbology by rotation using ArcPy
Edited When creating feature layers using ArcPy: There doesn’t seem to be a way to Vary symbology by rotation using ArcPy. Could that functionality be added? Related: ArcPy script to convert layer to individual feature layers for each symbology class…
-
Python to change the paper size of a layout
I'm new to Python but would like to create a script that makes it easy for me to change the paper size of a layout. As of today I have 10 different layouts to choose between (5 different sizes+2 different orientations). This means that I need to update 10 different layout templates every time they need to change. I rather…
-
Get list of maps referenced in layout
I would like to be able to identify map(s) referenced by a layout. I have a workflow where I will be importing one or more mxd documents into a Pro project. I would like to manipulate map layers (datasources, layer names, symbol properties, etc) for maps that are referenced by a specific layout. Note: In my workflow a map…
-
Convert a map series to individual layouts
The map series is useful if all layout details are essentially the same. If you need to annotate pages differently in a substantial fashion, a map series is overly restrictive. If it were possible to export/convert a map series into individual maps and layouts, it would allow the user to do the majority of the work in the…
-
Refresh field Descriptions from Datasource function
The idea is to have a function in Pro / Python to refresh the field descriptions for a layer. Function on a layer: Refresh fields from datasource, this loads all fields from the datasource and replaces the current custom fields description. The use-case: I need to change the datasource of a layer and I want to refresh the…