question

andyru avatar image
0 Likes"
andyru asked Julie Weller commented

Exception in initialize environment when running model programmatically

I've been trying to run a model programmatically using the following answer: https://answers.flexsim.com/questions/21116/automatically-configure-and-run-a-flexsim-model.html. I'm able to get things to work with the test model provided in that answer.

However, when running with a real model, the model never starts. After calling go(), FlexSim seems to hang indefinitely. Nothing appears in the model view, and I get a spinner if I hover over the view. I see an exception `exception: FlexScript exception: MAIN:/project/events/OnStartApp/initialize environment` in the console.

I'm able to run the model successfully if I open it in FlexSim through the GUI, reset, and run, and the model runs can run programmatically on a coworker's machine. This makes me think something is wrong with my environment that is preventing the model from initializing.How can I debug what is causing the FlexScript exception in the initialization script?

FlexSim 23.0.9
flexscript exceptionprogrammatically invoking flexsim model
· 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.

0 Answers