Model Builder in Pro: Contents Naming

568
1
07-11-2020 12:11 PM
MattRich
New Contributor

Ok, so long story short. I am trying to build a model that will simply copy a feature, and rename the copied feature with the date appended to it. Got it! I can do that, it looks like I had been doing that for a while, but did not realize it until I checked in Arc Catalog. 

What I am hoping is someone can help tell me how to have the Contents show the correct name of the layer instead of name of the variable. I am fairly confident (but not certain), that if I schedule this once a day or week, I will have to go back and re-add the previous weeks layer, as it seems that in contents it will be overwritten everytime it is run.

Is there a way to accomplish this? Or any suggestions that someone might could share. Maybe a checkbox I may have missed.

Thank you,

Matt

Setup of Model: 

How the Contents looks using "Add to Display" in the process:

How the Contents looks using "Add to Display" in the process showing the same names as ArcCatalog:

Contents result if Re-Added from *.GDB

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

The copy features is working correctly as the Feature Class name is  HC_Parcel_7_11_2020 but you obviously have the copy features tool set to add to display so it needs to give it a Layer name which is always taken from the name of the bubble, in your case  %HC_Parcel_D%. Remember a layer points to the source data known as a feature class, so the layer name could be anything.

So how do you create a layer object from a featureclass? That's the Make FeatureLayer tool. It's Output Layer parameter is the name of the layer you want.

So disable add to display for your copy features tool, connect that output to a Make FeatureLayer tool and set its output to be what every name you desire and have that add to display. You can now control the name of the layer as its added to the map.

Unfortunately ESRI have introduced into ArcPro 2.8 unwanted naming functionality that really messes up model logic so I recommend you vote for it to be removed, see this idea.