question

Li avatar image
0 Likes"
Li asked Li edited

How to use FlexSimPy evaluate() to create a global table?

I have FlexSimPy set up with my FlexSim 2025. While I'm able to launch , open and run the simulation, it seems that evaluate() never works. The return value is always None no matter what content/command I put there.

Example:

import FlexSimPy as fp

controller = fp.launch(evaluationLicense=False, showGUI=True, programDir=flexsim_path) # works

controller.open(model_path) # works
controller.reset() # works
controller.run(100) # works

script = 'Tools.create("GlobalTable_1")'
result = controller.evaluate("/Tools/GlobalTables/", script) # NOT work
print(result) # this prints None


I've seen this post: https://answers.flexsim.com/questions/123230/how-to-use-flexscript-python-to-create-the-data-in.html But what I'm looking for is to trigger the FlexScript in python outside of the app.

FlexSim 25.0.3
global tablepythonflexsimpy
5 |100000

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

0 Answers