cancel
Showing results for 
Search instead for 
Did you mean: 

Provide arguments for /command

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

6 REPLIES

Re: Provide arguments for /command

Siemens Phenom Siemens Phenom
Siemens Phenom

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

Re: Provide arguments for /command

Works like a charm!

Thanks!

Re: Provide arguments for /command

Valued Contributor
Valued Contributor

Hello, Diana!

 

Where can I found all command line arguments for Process Simulate?

Re: Provide arguments for /command

Siemens Phenom Siemens Phenom
Siemens Phenom

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

Re: Provide arguments for /command

Valued Contributor
Valued Contributor

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.

Re: Provide arguments for /command

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello A-S-E,

 

We support execution of a command from the command line starting from Tecnomatix V13.0

 

Best Regards,

DianaG