Select to view content in your preferred language

How to Access arcgis.gis.ItemDependency Properties

964
4
01-10-2022 08:49 AM
PatrickMcKinney99
Regular Contributor

I read on the API reference that an Item has the property "dependencies," which "returns a class to manage the Item’s dependencies."  Does anyone know how to access/read the contents within the returned "arcgis.gis.ItemDependency" class?

I am assuming that the "dependencies" property of an item can inform me of what services are used in a web map.  I am working in the ArcGIS Online environment, so that "dependent_to()" and "dependent_upon()" methods are not relevant.

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

C:\your_install_folder\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\__init__.py contains the definition and methods if you want to examine the code itself


... sort of retired...
0 Kudos
ShaneHallowell
New Contributor

Did you ever get this figured out?

0 Kudos
ChaseYoung323209
Emerging Contributor

Were you ever able to figure this out? Im trying the write the dependencies to an html file but I cant access the class properties for some reason.

0 Kudos
sam-gartrell
Emerging Contributor

assuming you have an item instance, you can access the properties with `item.dependencies.properties`, or `ItemDependencies(item).properties`. It'll come back as `{"items: []}` if the item doesn't depend on anything. 

0 Kudos