Operation on non current aprx

585
3
06-21-2021 11:24 PM
mody_buchbinder
Occasional Contributor III

Hello all

I found out that many of the arcpy.mp commands works only when you use the current aprx and running the code in a tool or python winodw.

For example SetExtent or updating the layer metadata.

Is that a bug, known limitation or documented feature?

Thanks

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

Python CIM access—ArcGIS Pro | Documentation

After the long read, I suspect it is a work in progress.  There are comments about what should and shouldn't be done as well as a lot of the examples have been placed outside the help topics in github or the code sharing site

Esri/cim-spec: This repository hosts the specification for the Cartographic Information Model (githu...

ArcGIS Pro 2.5 CIM Samples V1 - Overview

Also, you can have a stroll through

C:\...Your_Install_folder...\Resources\ArcPy\arcpy\cim

to get a sense of what is there... the folder is getting bigger over time

"current" ... seems to be the current preferred access to CIM, 


... sort of retired...
mody_buchbinder
Occasional Contributor III

Hi Dan

You are correct but the two examples I gave (SetExtent and metadata) are not connected (as far as I know) to the CIM.

Thanks

0 Kudos
DanPatterson
MVP Esteemed Contributor

True, I find it hard sometimes to track down whether "stuff" is available or not, for example, setExtent and getExtent are only found in the Camera class accessible via the Map class and metadata seems to be class specific 


... sort of retired...
0 Kudos