Skip to main content
3 events
when toggle format what by license comment
May 10, 2018 at 14:38 comment added Hornbydd Interesting, the above works because it is used in a tool (CopyFeatures). If used in some standard python code, like write to text file as you have done it writes %Name_DBF%. The only way I go the name to pass into the script was to expose a new parameter to your script tool that took a string and got a handle on that using aText = arcpy.GetParameterAsText(0). Then writing to the text file worked as expected.
May 10, 2018 at 13:16 comment added Aurelija Viluckytė Hi, thanks for the tip. I tried to enclose it the same as you did, but when I open my text file, it only says "%Name_DBF%" in that place, but not a real name of the database table... this is what I was wondering whether in scripting we need to use something more differently than in simple calculate field... but i need to use the script tool as it is easier for me to include more lines of text.
May 10, 2018 at 10:53 history answered Hornbydd CC BY-SA 4.0