03-10-2010 02:18 PM
Is it possible to pass the full path and filename as an argument under the Customize Tool Menu?
Basically, I have an external tool that works on a sequence file and I'd like to call it from the Tools menu. It's a Command type but I don't know what to put in the arguments. I found a post where someone said use "%FILE%", but that did not work.
Also, if there are other keywords available, where is that list?
Thanks.
Solved! Go to Solution.
03-11-2010 11:42 AM
Hi Richard,
It seems there isn't a way to do this using the Command type. The problem is that you can't use an expression to specify the arguments for the executable and you need to use an expression to get the current sequence file's path.
However, you can wrap your executable in a sequence file that has only one step; calling your executable. If you place a Call Executable Step in your sequence, you can specify the argument as the current file path by using the expression RunState.InitialSelection.SelectedFile.Path.
Then add a new item to the Tools menu and select your wrapper sequence.
Cheers,
03-11-2010 03:09 PM
Michael:
Thanks very much. I had thought of going the Sequence route, but I was stumped on finding the selected file path. RunState.InitialSelection.SelectedFile.Path is beautiful!
10-02-2013 06:46 AM
It doesnt works for me - I am getting an exception:
Error in Argument Expression
Unknown variable or property name 'RunState.InitialSelection.SelectedFile'.
-17306; Unknown variable or property name.
Step 'Call Executable' of sequence 'MainSequence' in 'seq test.seq'
I have only seq test.seq with call executable step - in arguments :
"\"" + RunState.InitialSelection.SelectedFile.Path
10-02-2013 08:52 AM
Are you running the sequence from the tool menu? The initial selection might not be set otherwise. Try setting a breakpoint and looking at the variables view window in the execution document to see what variables exist. Make sure you don't have a typo.
-Doug