How do I get layers' IDs using python?

4309
24
Jump to solution
01-04-2016 12:56 AM
Highlighted
New Contributor II

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!

Davide 

Tags (2)
24 Replies
Highlighted
MVP Esteemed Contributor

That error message isn't unique to arcmap, see the actual error message number 0x80131515 for more ideas... for example

http://stackoverflow.com/questions/8524423/could-not-load-file-or-assembly-hresult-0x80131515-when-a...

Reply
0 Kudos
Highlighted
Occasional Contributor III

Perhaps there is another way to do what you are trying to do without the Layer ID? What are you trying to accomplish with this ID?

Reply
0 Kudos
Highlighted
New Contributor II

Hy Luke,

I'm working on a script able to read information from an .mxd (e.g. the Layers ID and the Layer Name), match the values with another field in an oracle db table and finally copy them in a new geodatabase table..

It's part of a bigger test about publishing services.

Davide

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Did you try the response on your parallel post on gis.stackexchange ? arcpy - How do I get layers' IDs using python? - Geographic Information Systems Stack Exchange

Reply
0 Kudos
Highlighted
New Contributor II

I'm about to prove it thanks Dan.

Reply
0 Kudos
Highlighted
Occasional Contributor III

This looks like it might be possible with .NET from looking at this thread​, but it does not appear that Arcpy has this capability. Is there something else you can work with other than the Layer ID?

Reply
0 Kudos
Highlighted
Esri Contributor

I try to run successfully install.bat on another machine with Windows 7.

Strange !

Another guy could try to run install.bat?

Fred

Reply
0 Kudos
Highlighted
Esri Contributor

Davide,

Could you try to go back to the ZIP file you downloaded, select properties, then “unblock” the content?

Source

Fred

View solution in original post

Highlighted
New Contributor II

YES!!

Perfect Fred, it works as I wanted to tomorrow I'm going to go on it, meanwhile thank you very very much..

Davide

Reply
0 Kudos
Highlighted
New Contributor II

Goodmorning Frédéric,

sorry if I'm bothering you again but there is a problem with tool: the test I did on a local pc was fine, but now that I'm working on a remote desktop with windows server 2012 R2 returns me the error "000816: The tool is not valid"..could it be the operative system?

Thanks, thanks, thanks

Davide

Reply
0 Kudos