Sorry, there is no out of the box way to keep a variable linked to the file name, you'll need to write code to do it.
All you have to do is make variables in your Dispatch script that extracts the filename without extension... I have listed the ones I use - not all are required if you just want the filename without extension.
Message was edited by: Tim Read - just fixing a typo in the D_FileName extraction.
Originally I used that approach and then abandoned it because it seemed a data card variable was super simple (and it would have been if the variable updated with file name changes).
You have inspired me to give your suggestion a try . . .
I have the file named "453561234567.sldprt" and use the variables above in a dispatch to fill in a data card value. When I run the dispatch with the D_FileName it puts 19 in the data card. I was just using the 3 variables: D_Length, D_DotPos and D_FileName. I added all variables and changed the names to match the ones above exactly and I still get the 19. I have them all entered as string values as I could not find an integer value or anything like that.
Do you have any idea why the D_FileName variable would be returning the D_Length variable value? I am using EPDM 2011.
Ok I got it. I had to add an extra variable and use the correct one for the output.
Here is what I used for variables and I used "FileName" for the output without the extension.
Thanks for the starting point. I never would have figured it out.