Select to view content in your preferred language

How do I get layers' IDs using python?

9638
24
Jump to solution
01-04-2016 12:56 AM
DavidePavia
Deactivated User

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
DanPatterson_Retired
MVP Emeritus

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...

0 Kudos
LukeSturtevant
Frequent Contributor

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?

0 Kudos
DavidePavia
Deactivated User

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

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
DavidePavia
Deactivated User

I'm about to prove it thanks Dan.

0 Kudos
LukeSturtevant
Frequent Contributor

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?

0 Kudos
FrédéricPRALLY
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

0 Kudos
FrédéricPRALLY
Esri Contributor

Davide,

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

Source

Fred

DavidePavia
Deactivated User

YES!!

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

Davide

0 Kudos
DavidePavia
Deactivated User

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

0 Kudos