Select to view content in your preferred language

ArcGIS Online python code

597
4
07-08-2022 11:41 AM
MM598
by
Occasional Contributor

What is the equivalent of

aprx = arcpy.mp.ArcGISProject("CURRENT")

in ArcGIS Online? I am creating a tool within an app. I would like to refer back to the map and what is selected. How do I refer to the current screen in the app?

4 Replies
BlakeTerhune
MVP Regular Contributor

Are you using Web AppBuilder or writing a custom app with the ArcGIS API for JavaScript?

0 Kudos
MM598
by
Occasional Contributor

I am uploading the tool from ArcPro into an app created with Web AppBuilder.

0 Kudos
AlderMaps
Frequent Contributor

I have the same question...working on a python geoprocessing tool and need to look at what layers are loaded in the current web map.

0 Kudos
MM598
by
Occasional Contributor

I think our questions may be a little different. You may find the "listLayers" section of this site useful: https://pro.arcgis.com/en/pro-app/2.8/arcpy/mapping/map-class.htm

0 Kudos