question

Fu P avatar image
0 Likes"
Fu P asked Jason Lightfoot edited

Custom Web page(Using Web server)

I already set up the web server correctly, and I want to create a custom page instead using the default page .

In my model ,I determine the parameters by reading specific rows and columns in the global table, and my results are shown in Dashboard .

I want my final page look like these

I would like to ask about the main points of the implementation process

Thanks.

FlexSim 18.1.2
webserverflexsim 18.1.2
1595816555264.png (45.3 KiB)
1595816575078.png (118.0 KiB)
1595817175086.png (69.7 KiB)
5 |100000

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

Ben Wilson avatar image
2 Likes"
Ben Wilson answered Jason Lightfoot edited

Hi @iamfph,

Coming at this question so late I didn't adequately read your request. Looks like you're wanting to build a custom web interface and you're using the FlexSim webserver?

The FlexSim webserver allows your model to serve up a custom web interface, but you'll need to be pretty familiar with both FlexSim and web programming.

To start, check out the webserver documentation. It's all good background information, but the parts that most pertain to your question are under the heading Developing Custom Web Interfaces, and in particular the sub headings Instance Queries and Default Page.

The Default Page section shows where in your model tree to look at the code that your model is serving to the web browser. Here is where you can edit FlexSim's default code until you transform FlexSim's default page into what you want.

Look that over, then if you have any specific questions, please ask a brand new question, rather than adding to this old one.

Thanks!

· 4
5 |100000

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

crzdada avatar image crzdada commented ·
Hello, Ben, is there have a example for your description? I also have a same problem in how to use custom web page
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ crzdada commented ·

As Ben said - it's described here and tells you where to find the default page which is your example for creating your customization (for which you should have some web coding skills)

You can create a customized page by model instance by making a copy of the node at:

MAIN:/project/exec/globals/serverinterface/pagetemplates/default

..and placing it in the model for you to edit at this location:

Tools/serverinterface/defaultpagetemplate


1 Like 1 ·
crzdada avatar image crzdada Jason Lightfoot ♦ commented ·

1684733938797.png

I created a custom page and named "defaultpage",then copy the code of node from MAIN:/project/exec/globals/serverinterface/pagetemplates/default and pasted to this page, at the end ,i tried to connect webserver and the page seem to have not any content, did I miss anything?

0 Likes 0 ·
1684733938797.png (602.8 KiB)
Show more comments
tannerp avatar image
0 Likes"
tannerp answered tannerp commented

@iamfph, the best resources for building something like this would likely be the GUI Building and Dashboard Widget sections in the User Manual. If you have a specific question, I'm happy to help answer those, but your initial question was broad, so I provided a generic answer.

Hope this helps!

· 4
5 |100000

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

Fu P avatar image Fu P commented ·

@tanner.p Thanks for your answer.My original intention was for customers who were not familiar with FlexSim software to be able to operate on established models without installing FlexSim software. When using web Server, use a custom web page instead of the default page.

And after logging in,the browser will open a page look like this :

These parameters are important during my simulation, and I set them in my custom code.

I use this code to set rules for Pre pool ,and I put K1 in a Global table.

I want to know if I can change the value of K1 in my code (or be able to read different rows and columns from global table )in a custom web page.

Now I am reading @phil.bobo 's FlexSim Webserver Example (https://archive.flexsim.com/threads/thread2916.html ) Trying to figure out how to develop my own page.

0 Likes 0 ·
1595896615719.png (127.4 KiB)
1595896873313.png (19.0 KiB)
tannerp avatar image tannerp Fu P commented ·

It sounds like what you're describing is the purpose of a Runtime License of FlexSim. You can review the different features of the Runtime License here. I recommend communicating with your distributor about how this is done. It sounds like any website building you do is going to be independent of FlexSim anyway, which means FlexSim's tools will not be helpful to you in creating the website.

0 Likes 0 ·
Fu P avatar image Fu P commented ·

I've tried building custom GUIs, and my boss says this is not what he wants, he wants an interface independent of FlexSim where the customer can remotely control the model and see the results by adjusting the parameters. So GUI Building and Dashboard Widget sections in the User Manual is not a solution.


0 Likes 0 ·
1595898651050.png (261.5 KiB)
Joerg Vogel avatar image Joerg Vogel Fu P commented ·

Off the record: this refers to licenses topics and there is external communication involved. You will probably need at least a runtime license, because you will be not allowed to compile a self running model without a valid license from FlexSim Inc. Then there isn’t a real difference if you have dashboard or GUI widgets running or control an instance of a FlexSim Webserver by inputs of another Webserver. An external control let you only run a model slower, that is the main difference from my point of view.
If you want to start, please look for answers to questions of communicating with FlexSim, perhaps one keyword can be ”json“.

EDIT a link to thread

https://answers.flexsim.com/questions/27245/what-would-be-the-best-way-to-communicate-between.html

0 Likes 0 ·

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.