So my first question would be "Do these different file types have uniquely different variables that you need manage?" Meaning, if you have Part Number, Description, Material, Weight, Finish, Created By, Approved By, etc. that are all used for all engineering CAD file types, what variables are unique to each file type. If you have a list for each then I could see handling your document types this way.
You can capture the file name+ extension on one variable and then use an input formula - $Right(%FileName%,3) - for your file extension. The problem is going to come when you try to get the SolidWorks 6 character extension when DWG and DXF are 3 characters.
You could possibly do all of this through Dispatch, but I'm too busy to go test it out.
Steve, I do indeed have a list for each individual unique variable for each file type. There are some other data cards and file types I was thinking about using this method for as well. The example I gave earlier (dxf's/dwg's) was one such case... Anyhow, I was trying to do basically what you listed in the input formula, however I statrted by first doing the following: $FindReverse(%FileName%, .) to search in reverse for the last "." in the file name, then used that as input (the count) to subtract off the total length of the file name to determine the exact file extension... That probably did not make much sense, but this is basically the input formula I was using: $Right(%FileName%,$Sub($Len(%FileName%),$FindReverse(%FileName%,.))).
However when I do that, the field on the data card just stays blank, and I'm not getting any reported errors... I am actually uncertain if the FindReverse will locate the period character correctly? I even tried it in quotes "." and didn't get anything either...
There is no time to check, but I looked in Dispatch - there is no "FindReverse" - there is "ReverseFind".
There can be a problem in it?
In general, in Dispatch it is more convenient to check formulas displaying messages about results.
Input formulae are tricky. You have to invoke the data card manually to get them to update. If you have a value in the parent field (%FileName%), go manually change anything on the data card and it will update the input formula.
If your formula doesn't work, here's another possible solution.
From you initial state you could have the files go through an automatic transition based on the file extension. During the transition, it would populate the variable with your extension.
That would allow you to push similar files (i.e. DWG and DXF or png, bmp, jpeg) through the same tranistion and get populated with the same value..."2D CAD" "Image FILE". That way you wouldn't need a tab for every extension on your data card.