In ArcMap 10.3 the option to assign unique layer ID's was enabled. When enabled this allows map authors to set the numeric ID's accordingly.
Can this data frame property be read in Arcpy to determine if an MXD is using this setting?
Can arcpy access the layer ID thru the layer object?
Thanks for any info
Ronnie
scroll way down Layer—Help | ArcGIS for Desktop
I think it is there under service properties
Regarding your first question, it appears the answer is no. Reviewing the ArcPy Mapping module DataFrame documentation, it doesn't appear the property you are looking for is made available through ArcPy. This isn't the only Data Frame property not available through ArcPy. Although I haven't done it myself, I am sure you could use comTypes or some other Python COM package to access ArcObjects through Python and retrieve the setting.
Regarding your second question, I don't believe so either. Although a map service layer in ArcMap can have its Service Properties retrieved, the properties listed in the Layer documentation don't appear to cover a publishing unique ID. Beyond that, what you are after seems to be information about/for publishing layer(s) as map services, not consuming map services as layers. If that is the case, Service Properties might not even be supported for the layers you are working with.
Thank you Joshua! I was hoping to be able to access the unique IDs assigned to layers in the MXD when reading the MXD using Arcpy. It appears this property is missing from the Arcpy.mapping module and will likely submit an idea for this one.
Hi,
Has anyone found solution for this? I am working on automated map service publishing scripts and i would like to run checks on MXD to enforce the option being switched on by users before publishing.
also looking for reply, at least in 10.6.1 versions...