Apologies for my ignorance (in my defense I'm not a real coder) But can anyone tell me why this very simple script doesn't print the filename when I run the script from the Toolbox. I get the string so my AddMessage is working but not the filename
Solved! Go to Solution.
How was this script generated? Did you grab it from a model builder output?
I'd guess it's something to do with the getparameter values being out of scope of the function, or that it seems to have hardcoded values into your function - but I'm not too hot on the model builder output 'scripts'.
I'd either really simplify it into a script tool or just use the Parse Path and Add Message functions inside Model Builder.
How was this script generated? Did you grab it from a model builder output?
I'd guess it's something to do with the getparameter values being out of scope of the function, or that it seems to have hardcoded values into your function - but I'm not too hot on the model builder output 'scripts'.
I'd either really simplify it into a script tool or just use the Parse Path and Add Message functions inside Model Builder.
Yes it's the output from ModelBuilder. Edited. I'll take a look at ModelBuilder AddMessage. Thanks for that.