Select to view content in your preferred language

Best practice for geoprocessing in ArcGIS Pro Tasks

356
1
05-09-2023 12:19 AM
Labels (2)
TorbjørnDalløkken2
Frequent Contributor

Hi.

I'm working on creating several ArcGIS Pro Tasks for my organizations users, and would really appreciate some input on a subject.

One of the tasks involved a step where the user edits / creates one or more polygons, and in the next step the edited featureclass is used in a intersect with another given class. The result is then supposed to be used in a later task-step. The featureclass that's being edited and the result is in the same filegeodatabase.

When I first created this task, I went through all of the steps and defined the contents (visibility, selectability, editability etc) for each step. So far, so good. But when distributing the task to a testuser through a project template, I ran into a problem with the result-layer. As the resultlayer does not exist when starting the task, the layer is listed as a broken resource. After running the intersect-task, the layer is added to the map, but the layer is still listed as a broken resource and will not respect any of the visibility, selectability I defined when creating the task.

What I've done so far is to add the result featurelayer to the filegeodatabase template, and to the map. At the start of the task, this is an empty featureclass. In the intersect-task, I've created a pythonscript that runs the intersection and writes the result to a "memory"-class, before inserting the results into the real result-featureclass using arcpy.da.InsertCursor. This works fine. What would be the best practice dealing with this? Have anyone done anything similar with tasks?

 

 

 

1 Reply
VeronicaSarver
Emerging Contributor

I have a similar situation. I am creating a Task in ArcGIS Pro where the output of the Task steps should be to a different file geodatabase each time the Task is run. I am not sure what the Best Practice is for Tasks output feature classes and geodatabases. I have not be able to find documentation on this either.

 

0 Kudos