I have an inspection program that write results to a text format logfile on every cycle. In that logfile I want to add the name of the inspection program. I realize I could do this with text on the block diagram, but every time I update the program and save it with a different name I will have to remember to change the text.
So, if my vi is called Resultfile1-0.vi I want to append that to the log file. If I then create a new version of the program and call it Resultfile2-0.vi I want it to write that to the logfile.
Solved! Go to Solution.
It call "Current VI's Path" in the File Contant palette
Give credit to Omar. That is an even simpler iimplementation.
Either his or mine will give the full path if that is what you want. If you want just the file name, then use Ben's, or you would need to use Omar's or mine and use a Strip Path function after it to get just the filename. (and perhaps a path to string to convert it to a string.)
Thank you everyone. I was sure it would be simple, for someone who knows their way around the pallets.