Geoprocessing Question about name output ?

121
2
2 weeks ago
PROBERT68
Frequent Contributor

Is there a way around for me to  know which layer that written output that does not written to the new clipped layer ?

I am working on many layers to clip and see which one that output to create a new many clipped layers. So that way I will know which one from the Content to remove it...

Why was not telling which layer that was not written to a new layers ?

PROBERT68_0-1714670164995.png

 

I

0 Kudos
2 Replies
EdMorris
Esri Contributor

Hello

By the look of the diagram you have a toolbox called (NewToolbox).

Is this a Python script tool or a Python Toolbox tool?

If so you can use:

arcpy.AddMessage() and add the name of the layer you wish to be displayed. I think because this layer name is created dynamically as a variable to the analysis.Clip() tool you can specify the variable which holds the name of the dynamically created layer.

for example:

inFeatures = aPointLayer
ClipFeatures = aPolygnLayer
outFeatureClass  = "<Your output Location>\MyClipLayer"

arcpy.analysis.Clip(InFeatures, ClipFeatures, outFeatureClass)
arcpy.AddMessage(f"Output Feature Class is: {outFeatureClass})

will add "Output Feature Class is: <Your output Location>\MyClipLayer" to the output dialog box.

 

I hope this helps

many thanks ed

0 Kudos
PROBERT68
Frequent Contributor

No. 

0 Kudos