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:

  1. import FlexSimPy as fp
  2.  
  3. controller = fp.launch(evaluationLicense=False, showGUI=True, programDir=flexsim_path) # works
  4.  
  5. controller.open(model_path) # works
  6. controller.reset() # works
  7. controller.run(100) # works
  8.  
  9. script = 'Tools.create("GlobalTable_1")'
  10. result = controller.evaluate("/Tools/GlobalTables/", script) # NOT work
  11. 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