I have created a model in Model Builder that utilizes the ESRI Ready-To-Use Service called "Trace Downstream". This takes an input point file or an input feature set (created by clicking on the map) and performs some trace downstream functions. When viewed in the model, the output is a "Trace Line" that is a type Feature Set. Once the tool runs and the output shows in the Table of Contents, the data type is "InMemory Feature Class". I have been trying to figure out a way to take this output Feature Set and export it or convert it into a local piece of data using Model Builder. I have tried Copy Features, Make Feature Layer, Feature Class to Feature Class, etc. and none of them will accept the Feature Set as the input feature.
When I do a manual "Data > Export Data" I am able to take the resulting InMemory Feature Class and export it as a local Feature Class, but I want to do this within the Model Builder.
Thanks in advance for any help.
Solved! Go to Solution.
Have you tried running Copy Features within a Calculate Value tool?
Expression
cf(r"%Trace output%")
Code Block
def cf(trace):
arcpy.CopyFeatures_management(trace, "in_memory\\trace_feat")
return "in_memory\\trace_feat"
Data type:
Feature class
Have you tried running Copy Features within a Calculate Value tool?
Expression
cf(r"%Trace output%")
Code Block
def cf(trace):
arcpy.CopyFeatures_management(trace, "in_memory\\trace_feat")
return "in_memory\\trace_feat"
Data type:
Feature class
This worked great, thanks!