|
IDEA
|
This was implemented in ArcGIS Pro 3.7. arcpy.mp.CreateArcGISProject(project_path, project_name, {create_parent_folder}, {home_folder}, {default_database}, {default_toolbox}) CreateArcGISProject | ArcGIS Pro documentation Jeff - arcpy.mp team
... View more
a week ago
|
0
|
0
|
66
|
|
IDEA
|
This was implemented in ArcGIS Pro 3.7. An optional wildcard parameter was added to the ArcGISProject.closeViews method. ArcGISProject | ArcGIS Pro documentation Jeff - arcpy.mp team
... View more
a week ago
|
0
|
0
|
60
|
|
POST
|
@RoshanPalikhe1 , have you tried using Layer.pasteProperties? It was made available with Pro 3.4. Layer—ArcGIS Pro | Documentation The following example will reference the symbology properties of a source layer in a layer file (see Note below) and apply those properties to the layer of interest. You can paste all layer properties or choose specific layer properties to paste. With the arcpy.mp method, you can provide a list of different properties in case you don't want all but want multiple properties. In the example below two properties are being pasted. It works similarly to the UI context options and includes the same limits (e.g., geometries must match). p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Yosemite National Park')[0]
lyr = m.listLayers('Campgrounds')[0]
lyrFile = arcpy.mp.LayerFile(r"C:\Projects\ProjectData\LYRXs\Campgrounds.lyrx")
sourceLyr = lyrFile.listLayers('Campgrounds')[0]
lyr.pasteProperties(sourceLyr, ['SYMBOLOGY', 'VISIBILITY_RANGE']) NOTE: the source layer is not limited to coming from a layer file, it can be a layer in a map in the same project, or different projects, etc. Jeff - arcpy.mp team
... View more
04-24-2026
02:27 PM
|
0
|
0
|
840
|
|
IDEA
|
This is a very old ArcMap idea that is being closed because these capabilities will not be added to ArcMap and were added at ArcGIS Pro 3.4. ArcGISProject—ArcGIS Pro | Documentation Has: createGraphicElement(), createGroupElement, createLayout, createPictureElement, createPredefinedGraphicElements, and createTextElements. Layout—ArcGIS Pro | Documentation Has: createMapFrame(), createMapSurroundElement(), createTableFrameElement() Jeff - arcpy.mp Team
... View more
03-09-2026
12:05 PM
|
0
|
0
|
206
|
|
IDEA
|
Closing this ArcMap issue. There is a solution in ArcGIS Pro. We made great improvements in Pro concerning definition queries (DQs). Pro layers now support multiple DQs and our API allows you to not only change a DQ (like ArcMap could), but also add multiple DQs and set the active DQ. Much of this is mentioned in the help via the following Layer members Layer.definitionQuery - in ArcMap and Pro Layer.listDefinitionQueries ({wildcard}) - new in Pro Layer.updateDefinitionQueries (definitionQueries) - new in Pro Layer—ArcGIS Pro | Documentation NOTE - Pro does NOT have an UpdateLayer. Our model has changed quite a bit. There is a similar, but different method in Pro: Layer.pasteProperties (which has an option to paste all properties or limited collections, including DQs). The list of options is in the Layer help link above. I hope this helps, Jeff
... View more
03-09-2026
10:12 AM
|
0
|
0
|
229
|
|
IDEA
|
@Pukawai The original author of this idea was happy with the solution so we marked it accordingly. We also have ArcGISProject.closeViews() so you can close your views, then open the specific view using openView(). OpenView will automatically activate the view. We have NO way of referencing existing views because individual instances are not uniquely named. Closing views and (re)opening ensures you get the active view you want. At 3.7 we enhanced closeViews() to include a wildcard parameter so rather than closing all map views, for example, you can close views that only reference a specific map. See: arcpy.mp Map and Layout isOpen - Esri Community The major focus of arcpy.mp is for ArcGIS Project automation, not application development. There are many scenarios where the .Net SDK is a better solution for application development. I hope this helps, Jeff - arcpy.mp team
... View more
03-06-2026
03:26 PM
|
0
|
0
|
692
|
|
IDEA
|
This is a very old idea and is available in both ArcMap and Pro. ArcMap and Pro, the older style ExportToXXX methods have a property called {clip_to_elements} For example, the Layout class: Layout—ArcGIS Pro | Documentation In Pro we have a newer style export format objects, and a similar property called clipToElements is available to the export format when exporting a layout. For example, PDFFormat: PDFFormat—ArcGIS Pro | Documentation Jeff - arcpy.mp team
... View more
03-06-2026
12:57 PM
|
0
|
0
|
222
|
|
IDEA
|
This should have been closed, at least for those that are using ArcGIS Pro. The arcpy.mp API offers a number of ways of creating and managing labelClasses. LabelClass—ArcGIS Pro | Documentation Properties not directly exposed can be modified via Python CIM Access. Jeff - arcpy.mp team
... View more
03-06-2026
12:46 PM
|
0
|
0
|
682
|
|
IDEA
|
This is being planned for the 3.8 release. Jeff - arcpy.mp team
... View more
03-06-2026
12:39 PM
|
0
|
0
|
561
|
|
IDEA
|
This is planned for the upcoming 3.7 release. The function is ... arcpy.mp.CreateArcGISProject(project_path, project_name, {create_parent_folder}, {home_folder}, {default_database}, {default_toolbox})
... View more
03-06-2026
11:22 AM
|
0
|
0
|
417
|
|
DOC
|
@MarcoBoeringa I jumped on this as soon as it was brought to my attention. I didn't try the other blocks of code but they were using variables and settings that had missing context, therefore, I focused on your comment concerning the use of a dict to set label class CIM properties. Testing layer files is easy enough and I will try that but your comment "there is a *lot* more going on" could be the missing pieces. We can't debug until we can reproduce the issue.
... View more
12-04-2025
06:52 AM
|
0
|
0
|
15115
|
|
DOC
|
@MarcoBoeringa I did the best I could to simulate your scenario without having your data or complete scripts. I can NOT reproduce. Everything works on the background or foreground threads. I can talk with the labeling team to see if the smoking gun you suggest could have been caused by changes made during 3.6 development. Here is the script ran from a script tool. It ran against a single polygon feature layer with 10 label classes. I only set the priorities for half of them and set the other half using an incremented value. import arcpy
if __name__ == "__main__":
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('States_WithRegions')[0]
l_cim = l.getDefinition('V3')
labelPriorityByLayerDict = {'New England' : 1, 'Pacific': 2, 'Mountain' : 3, 'South Atlantic' : 4, 'West North Central' :5}
i = 6
for cimLabelClass in l_cim.labelClasses:
if type(cimLabelClass).__name__ == "CIMLabelClass":
try:
if cimLabelClass.priority == -1:
if cimLabelClass.name in labelPriorityByLayerDict:
before = cimLabelClass.priority
cimLabelClass.priority = labelPriorityByLayerDict[cimLabelClass.name]
arcpy.AddMessage(f'Changing {cimLabelClass.name} from {str(before)} to {cimLabelClass.priority}')
else:
before = cimLabelClass.priority
cimLabelClass.priority = i
arcpy.AddMessage(f'Changing {cimLabelClass.name} from {str(before)} to {cimLabelClass.priority}')
i += 1
except:
arcpy.AddWarning("*** WARNING ***: Failed to set label ranking")
pass
l.setDefinition(l_cim) It would be really helpful to know if the script above fails for you against your data after making the necessary changes. Jeff - arcpy.mp Team
... View more
12-03-2025
10:25 PM
|
0
|
0
|
15180
|
| 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 |
Thursday
|