Use %PathToSelectedFile% as parameter to dispatch checkout operation.
Booby, as Faur said, using %PathToSelectedFile% will checkout only the selected file.
When dispatch runs during state transition it will run on any file that goes through.
You may want to put in a JUMP command before the checkout, that sends any file which is not a drawing to the end of the script.
In order to do that, you'll need a set of dispatch variables that isolate the extension in the file name. Take a look at this table:
Name Type Value Meaning ExtPos Static string ReverseFind(%NameOfSelectedFile%, .) finds the location of the first "." from right to left (the beginning of the extension) FileNameNoExt Static string Left(%NameOfSelectedFile%, %ExtPos%) isolates the name of the file without the extension Ext Static string Right(%NameOfSelectedFile%, %ExtensionNoDotLength%) isolates the extension FileNameLength Static string Len(%NameOfSelectedFile%) number of characters in the full file name ExtensionLength Static string Sub(%FileNameLength%, %ExtPos%) number of characters in the extension including the "." ExtensionNoDotLength Static string Sub(%ExtensionLength%, 1) number of characters in the extension without the "."
Once you have these variables in your dispatch, the JUMP command can look at Ext variable and goto label END if it is !=slddrw .
Buy the way, I find it very useful to have an "extension" variable in all my file data cards. I add this variable with a dispatch running every time a file is added to the vault.
I use this variable in other dispatch scripts as "variable from selected file datacard" so I don't have to build this set of static strings all over every time. Having this variable in your data cards also helps in search cards filters, control logics, and transition conditions.
Try this one:
You can add a command "jump" into your dispatch script like this:
If %Ext% is not (!) "slddrw" then go to Exit
For "slddrw"-Extension you have to cut the filename into pieces like this:
Full filename = %NameOfSelectedFile% -> ABC-DE.slddrw
%ExtPos% = ReverseFind(%NameOfSelectedFile%, .) -> 6 (.)
%FileNameLength% = Len(%FileNameLength%) -> 13 (ABC-DE.slddrw)
%ExtensionLength% = Sub(%FileNameLength%, %ExtPos%) -> 7 (.slddrw)
%ExtensionNoDotLength% = Sub(%ExtensionLength%, 1) -> 6 (slddrw)
%Ext% = Right(%NameOfSelectedFile%, %ExtensionNoDotLength%) -> slddrw
Witch version of EPDM do you use?
Your file name contains blanks?