question

London MT avatar image
0 Likes"
London MT asked London MT commented

Is it possible to open a GUI with Flexsim running as a background process?

Hi,

I wonder if it is possible to open a GUI with a Flexsim instance running in the background?

So, more concrete, I'm thinking of a batch script that starts a Flexsim instance. The instance fires the OnModelOpen trigger that then opens a GUI window without any parent active views. Would this work? Is there a better way of doing this?

Hope this was clear. Thanks,

Jarek

RHDHV London

flexsim commands
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
2 Likes"
Phil BoBo answered London MT commented

If you pass the commandline parameter of nogui, then FlexSim does not load any views and it doesn't load the view tree. You cannot show a gui or message box in this mode.

To do what you want to do, you should use a model environment to customize the main view instead of having no views at all.

Documentation for model environments is in the Module SDK in Documentation/Environments.html.

If you are just making a model environment instead of a module environment, then you don't need to make a custom module, but the documentation is still in the module sdk.

Here is an example model with a custom environment: model-environment.fsm


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

London MT avatar image London MT commented ·

@phil.bobo In the model that you gave as an example, you replaced the OnClick command for the TableView. How can I change the OnClick command for a Custom GUI?

Thanks,

Jarek

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ London MT commented ·

You don't need to use the module replacement mechanism to update things in your model. You only need to use that if you want to update something in the MAIN or VIEW trees.

You can simply add an OnClick attribute to your custom GUI if you want to have an OnClick in your GUI.

1 Like 1 ·
London MT avatar image London MT Phil BoBo ♦♦ commented ·

ofcourse, didn't think of that option. Thanks

0 Likes 0 ·