Hi all,
How do I change the cell value of global table in Flexsim Web server?
Is it JSON?
Hi all,
How do I change the cell value of global table in Flexsim Web server?
Is it JSON?
Hi @Youichi I, was Phil BoBo's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.
Add a custom queryhandler to your model's serverinterface, as described in the Instance Queries section of https://docs.flexsim.com/en/Reference/DeveloperAdvancedUser/Webserver/#custom
From your web page, send the query with an http request. In your query handler, set the table's value.
I can create instance by below command
http://127.0.0.1/webserver.dll?createinstance=tutorials\FlexSim%202020%20Update%202\Test01
I created below html. The returned value is 1. But it doesn't work.
<html>
<head>
<title>Test</title>
</head>
<body>
<form action="http://127.0.0.1/webserver.dll?submitjob" method="POST">
<input type="hidden" name="job" value='{"modelname":"tutorials\\FlexSim%202020%20Update%202\\Test01","timeout":3600,"priority":5,"setupcommands":[{"command":"settable=GlobalTable1","data":"values=[[\"firstParam\",1],[\"secondParam\",2],[\"thirdParam\",3]]"}]}'>
<input type="submit">
</form>
</body>
</html>
Thank you for advice.
Did Test01 have a GlobalTable1 saved in it already?
And how are you checking that the value changed in the new instance of FlexSim and the model that it loaded?
I posted below command to FlexSim Web server.
http://127.0.0.1/webserver.dll?createinstance=tutorials\FlexSim%202020%20Update%202\Test01
I saw the new instance of the model in FlexSim.
After that, I ran the html and clicked submit button and I checked the value of the new instance of the model.
The form in your html is sending a "submitjob" query. You aren't querying a specific instance. The "submitjob" query adds the job to a list of jobs to run on the server by creating an instance for each job, as explained in the Jobs section of https://docs.flexsim.com/en/Reference/DeveloperAdvancedUser/Webserver/
If you want to query an open instance, you don't use "submitjob". You use "queryinstance" as explained in the Instance Queries section of the documentation (just after the Jobs section).
I understand how it works.
However, the documentation does not describe how the parameters are received by FlexScript.
Table gt = Table("GlobalTable1"); gt[1][1] = 123; // OK gt[1][2] = parameter_name; // ???
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved