I am using ArcGIS ModelBuilder.
I want to use Field Calculator to put the file name into a field.
I created a field using add field.
But I don't know the function to call the file name.
What I've tried is "!name!"
, "!file.name!"
.
-
Are you using the ModelBuilder of ArcGIS Pro or the one from ArcMap?PolyGeo– PolyGeo ♦2022年05月17日 10:55:42 +00:00Commented May 17, 2022 at 10:55
-
There is no means within a Cursor object or Field Calculator tool to determine the data set/source name that is being processed, that information needs to be determined outside a Cursor object or Field Calculator and passed to it.bixb0012– bixb00122022年05月17日 18:20:11 +00:00Commented May 17, 2022 at 18:20
1 Answer 1
Try the Parse Path model builder tool.
You can also use arcpy.describe. The Describe Object Properties returns the path which you can field calculate into your attribute table.
Explore related questions
See similar questions with these tags.