Hello everyone and thanks in advance for the attention here is my problem..
..working in an ArcMap session, I've checked the option to get an ID for each of the layers in my document, so anyone has it.
Now, what I need is a way to get these values within a python script (to copy that automatically in a table): there's no such information in the layer's properties reached by a describe, nor from the .mapping module..
Thanks, and have a good day!
Solved! Go to Solution.
Could you try to go back to the ZIP file you downloaded, select properties, then “unblock” the content?
Can show show a screen grab where you are toggling this on...I can't find one
I need to get this information from all of the layers in the .mxd from a python code..
Thank you Dan!
The only difference that I can see is that your layers have the red ! indicating that the layer can't be found. In my example, all layers have a know path and that option doesn't exist. Perhaps therein lies the difference. Check to see whether, the ID check appears when a layer has a known path.
The option appears because I've checked the box below in the data frame properties (even if the data source path is broken):
I can see the layer's ID by opening their properties in the .mxd, but I don't know how to read them automatically in a python script..
Now it is clear...small but important detail, and yes, I don't see any obvious way to get that from within arcpy layer properties
for ArcGIS 10.3.1
Alphabetical list of arcpy.mapping classes—Help | ArcGIS for Desktop
Alphabetical list of arcpy.mapping functions—Help | ArcGIS for Desktop
lists the arcpy.mapping classes and functions in case others can see something
and for ArcGIS PRO
Alphabetical list of arcpy.mp classes—ArcPy | ArcGIS for Desktop
Alphabetical list of arcpy.mp functions—ArcPy | ArcGIS for Desktop
Maybe you could use this geoprocessing tool: Get layer ID for a layer in ArcMap
Hope this help you,
Thank you very much Frédéric but is not working on my pc here is the screenshot and what happens when I run the installation..
I'm working with an advanced license of ArcGis 10.3.1
Do you execute the install on Windows 7 64-bit?
Could you run as adminitrator the install.bat?
So I have updated the tool. He splits it in 2 tools:
(Add the ability to get layer ID for a specific layer. You can manipulate the output value in a python script for example)
Yes, I've run the installation on Windows 64 as the administrator, still the same problem even with the new version you've uploaded..