question

lancewu avatar image
0 Likes"
lancewu asked Joerg Vogel commented

Can the WEB SERVER request open the model to carry parameters?

When I am using WEB SERVER, I want to customize the request interface. I noticed that he has such a command


  • webserver.dll?createinstance=my%20model starts an instance of FlexSim running the model specified (here it's 'my model.fsm') and returns a short xml reply containing the instance number.


  • it can request to open the flexsim model, and I want to carry parameters when opening the model, similar to this:Flexsimxe myfile.fsm - rofops 8
    We can use commandlineparam (str param) to obtain parameters. Can web server requests achieve this?
FlexSim 22.1.4
codewebserver
· 2
5 |100000

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

lancewu avatar image lancewu commented ·

Can webserver implement this feature?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

I don’t think that there are parameters that you can parse into a model On Open event from system command line parameters. Those values must be available in source code editor default header declared as param1, param2, and so on. Maybe they are available, then you should find them there in this model event in your model toolbox.

I would try instead to provide external parameters to a model in a text file, that you load in an event On Model loading or opening or resetting. You can implement a dialog to modify a text file in a web server. Then you invoke a call to open FlexSim model for a Webserver.

Alternatively you can try to use pointer addresses in system memory to parse values from different system processes into another. You will probably need for such an approach programming languages that can set and read such system pointer values like C++, .net, …

Actually this approach is not intentionally what a FlexSim Webserver does. It is not meant to provide individually customized model instances for every connected client. This would involve to start a new session for every new connected client and you need an own license for each session then. And your server must be really powerful running simultaneously several models.

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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