07-19-2017 05:11 AM
Hi,
i`m able to start Process Simulate and execute my command after study has been loaded with the foloowing instruction:
/c newassembler /l offline /file D:\Test.psz /command MyCommand
The signature of the Execute-Method from a TxButtonCommand is
public override void Execute(object cmdParams)
I would like to provide the cmdParams object when starting Process Simulate with the above instruction.
Such a parameter could be for example a string representing a external id of an object.
Is there a way to provide such argument for the Execute-Method from command line?
I`m thinking of something like this
/c newassembler /l offline /file D:\Test.psz /command MyCommand /params 123456789
Thanks in advance for any help.
--
Andreas
Solved! Go to Solution.
07-19-2017 06:30 AM
Hi AndreasKoenig,
Passing the parameters from command line is not handled from Process Simulate. However, you can implement your own logic inside the
public override void Execute(object cmdParams)
Use
String[] arguments = Environment.GetCommandLineArgs();
or
string commandLine = Environment.CommandLine;
to read the command line parameters and parse them.
Best Regards,
DianaG
07-19-2017 07:09 AM - edited 07-19-2017 07:09 AM
Works like a charm!
Thanks!
07-27-2017 09:12 AM
Hello, Diana!
Where can I found all command line arguments for Process Simulate?
07-28-2017 03:07 AM
Hello, A-S-E,
I am not sure if they all are documented.
Check this post, are you looking for something specific?
Best Regards,
DianaG
07-28-2017 03:36 AM
Morning,
I was just surprised, that it is possible to execute the command from command line.
We have some routines for Process Simulate, which have been executed in background during some batch processing. To achieve this I have misused the command enable. I will try to rewrite my code to use this possibility.
You have a lot of possibilities, great functionality, but you have not documented it!
Best regards.
07-28-2017 04:17 AM
Hello A-S-E,
We support execution of a command from the command line starting from Tecnomatix V13.0
Best Regards,
DianaG
Watch Replays of Previous Topics