Cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with using starting options -TrustModels and -NoMessageBox

Legend
Legend

Hello,

 

I've been having issues with using starting options in 14.0 and forwards. It worked fine in 13.2 (With different file paths of course). I've been trying to use this:

 

"C:\Program Files\Siemens\Tecnomatix Plant Simulation 14.1\PlantSimulation14_1.exe" -TrustModels -f C:\Temp\TrustModels\ExampleModel.spp -e C:\Temp\TrustModels\StartingCode

 

The code in startingCode loads libraries into ExampleModel and then tries to use writeObject methods to save certain objects. This results in an error for me.

 

Due to these problems, I've moved towards using the COM interface instead to accomplish what I want to do.

When using the COM interface, is there a possibility to recreate the -NoMessageBox starting option?

 

I've attached a package with the model, source code and link to Plant Simulation.

 

5 REPLIES

Re: Issues with using starting options -TrustModels and -NoMessageBox

Phenom
Phenom

I've checked your issue.

 

To me it is not clear, why Psi  doesn't accept any kind of trustedModels settings

 

when using startup code.

 

In any way

 

if you place the startup code in an autoexec method in the root library

 

would this workaround -as a start- suit you ?

 

Betreff: Issues with using starting options -TrustModels and -NoMessageBox

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello verbalins,

In Model Settings you have 'Prohibit access to the computer' turned on. You have to turn it off.

The start option '-TrustModels' just trusts models which have this option turned off, it doesn't turns off this setting.

 

For the COM-Interface you could call the function SetNoMessageBox with the argument false.

 

Edit: See the correct answer from Martin below...

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Betreff: Issues with using starting options -TrustModels and -NoMessageBox

Siemens Genius Siemens Genius
Siemens Genius

Dear verbalins,

 

I examined your problem and found out several different issues.

 

  1. The help of Plant Simulation states about the start option "-TrustModels":

    Treat models, which you receive from others as if they were your own models, i.e., models with your trust ID. When you open a model that your received from somebody else, for which the Model setting > Prohibit access to the computer is deactivated, Plant Simulation does not notify you about this.

    Models, which were saved with a version older than 14, do not receive a trust ID and thus are always considered to be models from other people. Normally access to the computer is denied when loading an old model into version 14. If you entered the start option /TrustModels, the old model automatically has access to the computer.
     

    Thus "-TrustModels" does not help actually for more recent models to actually access the computer, but to not raise notifications/message boxes.

  2. The model you open by using the "-f" start option is young enough to hold the information about permitted access to the computer, but the checkbox in the "General" model settings "Prohibit access to the computer" is checked, so that the access to the computer is not permitted within this models.
    Since "-TrustModels" does not help the way you seem to expect, it would be good to permit the access to the computer for this template model by unchecking the checkbox "Prohibit access to the computer" in the "General" page of the model settings.
    This way loading and writing objects should have been possible at all.

  3. We now fixed a bug for versions 14.0.4 and 14.1.2, which resulted in security errors while executing the content of text files as methods using the start option "-e".
    The consequence of the bug was, that those methods, after loading from the files, have been executed as formulas, which have prohibited to access the computer independently to the model settings.

In short words:

  • you do not need "-TrustModels" for models saved with version 14.0 and higher
  • models saved with 14.0 and higher should have no prohibited access to the computer if they are save and require in their usage a permission to access the computer.
  • from 14.0.4 and 14.1.2 on you are again able to use the "-e" start option to execute methods from files containing "dangerous" functionality, since we fixed a bug in this area.

Best regards

Martin Lemburg


Siemens PLM Software
Digital Factory Division
Product Lifecycle Management
Manufacturing Engineering Software / R&D / Plant Simulation
Siemens Industry Software GmbH, Berlin / Germany

Did you like the answer? Then click the Thumbs Up button.

Did the answer solve your problem? Then accept the answer as solution

Betreff: Issues with using starting options -TrustModels and -NoMessageBox

Legend
Legend

Thank you very much for both your answers!

Glad to see that there's a fix coming for the -e issue.

 

Also, @RalfTobel, the SetNoMessageBox function is undocumented. Would it be possible to add it to the help files?

Betreff: Issues with using starting options -TrustModels and -NoMessageBox

Siemens Phenom Siemens Phenom
Siemens Phenom

Sure, we will add it to the documentation.

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.