How is it possible to set a layer or table ID with arcpy (ArcGIS 10.3.1)?

5210
11
Jump to solution
09-18-2015 12:48 AM
ThomasBrogle
New Contributor

Is it pssilble with arcpy?

Or is there an other skript possiblity?

0 Kudos
1 Solution

Accepted Solutions
DarrenWiens2
MVP Honored Contributor

I'm using 10.2, so can't test anything in 10.3, but this doesn't appear to be a property of the Layer object. I'm guessing you're out of luck, at least as far as arcpy goes, which truly isn't meant to do absolutely everything.

View solution in original post

11 Replies
NeilAyres
MVP Frequent Contributor

Can you please give us a little bit more detail on what you are trying to achieve. I don't quite understand your question.

0 Kudos
ThomasBrogle
New Contributor

The same problem as in post Set Layer ID for a layer in ArcMap 10.3

But i want solve it with python.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor
0 Kudos
ManuelBröchin
New Contributor

I haven't found an arcpy.mapping functions for setting a layer/table-ID.

Even in arcpy.mapping classes i haven't found a method in the class "layer" to set the ID.

Know somebody else more?

Is there a possibility in python with arcobjects?

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

if the property existed, it could be set, meaning that layers don't have an ID property but it has a readonly ObjectID property

http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-functions/table-properties.htm

0 Kudos
ManuelBröchin
New Contributor

You've got the wrong ID ...

Inside a mxd (ArcGIS 10.3+) you can open the possiblity to fix the IDs on the data frame:

mxd_config_IDs.jpg

After that you can fix the ID on each layer:

mxd_config_set_layer.jpg

The wish is to set this layer ID's ... but with a python script and not manually.

You see the  IDs in a published MapService - the numbers in brackets:

rest_mapservice.jpg

0 Kudos
DarrenWiens2
MVP Honored Contributor

I'm using 10.2, so can't test anything in 10.3, but this doesn't appear to be a property of the Layer object. I'm guessing you're out of luck, at least as far as arcpy goes, which truly isn't meant to do absolutely everything.

DanPatterson_Retired
MVP Esteemed Contributor

But it isn't on the list of properties you can set in the link I sent you​

0 Kudos
ManuelBröchin
New Contributor

I haven't found a function nor a method: To set the Table ID.

Tell me the name of the function or method you mean.

I look for the same as is described upper for the Layer ... in the example the Table ID is 200 - i want set it for example to 400. How can i do it programmatically?

table_properties_id.jpg

0 Kudos