Select to view content in your preferred language

Refer to Recently Added Layer in ArcGIS Pro Tasks

767
2
06-26-2019 09:47 AM
SamanthaGriffore
Regular Contributor

I am creating a task in ArcGIS Pro to have a CO-OP help me do some georeferencing. The steps are:

1. Add a Drawing (Add Tiff File to Project)

2. Select the Reference polygon

3. Zoom to that polygon

*4. Display the Drawing (Fit to Display on Georeferencing tab)

5. continue with georeferencing steps.....

I am stuck on step 4. I would like this to be automatic so that after they select the polygon in Step 2, it zooms to and then displays the drawing automatically. I get an error however when running step 4 that says "Error: Cannot run command assigned to this step. It's not enabled:

The only thing I can think of is that once the drawing is added, it needs to be on and selected in the table of contents. This is easy to set up in tasks under the contents tab, but only if the layer is already added. The user will be starting with a clean Project and will end with a clean project everyday. We have over 150 TIFFs to georeference so I want the project to be cleared out daily to start fresh.

So my question is: Is there a way in Tasks to refer to the most recently added layer without that layer already being in the Project? For example, the task would scan the TOC prior to the Action and select the latest layer added. Then the task would proceed with the action.

Thanks,

0 Kudos
2 Replies
SamanthaGriffore
Regular Contributor

OK, I've figured out the issue here. "Not enabled" means that the ribbon is not open. Unlike ArcMap where if the toolbar is open, it is accessible, in ArcPro you have to open the ribbon every time you want to use any tools from that ribbon, then close the ribbon when you're done with the tool (if there's a better way to leave open like ArcMap please let me know!). 

So to get around this, I had to create a hidden step to simply open the Georeference Ribbon, then use the Fit to Display tool.

The Georeference Ribbon is hidden within the Imagery Ribbon. Click to open, then it is "enabled".

The Georeference Ribbon is open. To move to another tool, you have to Close the ribbon, which disables these tools.

0 Kudos
PhilLarkin1
Frequent Contributor

Not sure if something has changed between versions of Pro, but when I attempt to record an action, clicking on Ribbons/Tabs is not recorded. Is this the method you are referring to: Using record to set the command of opening a ribbon? In the GIF I show how no command is recorded when i click on the ribbons, only when I click on a tool. 

PhilLarkin1_0-1674080008903.gif

 

0 Kudos