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

4641
10
Jump to solution
09-18-2015 12:48 AM
Highlighted
New Contributor

Is it pssilble with arcpy?

Or is there an other skript possiblity?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
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

10 Replies
Highlighted
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.

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
Reply
0 Kudos
Highlighted
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?

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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

Highlighted
MVP Esteemed Contributor

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

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos