With some assistance from a coworker, I was able to build and run FlexSimPy using the example provided in the install package. Specifically, I successfully ran `TestFlexSimPy.py` and communicated with the unopened `TestSendReceive.fsm`, allowing the value to pass back and forth between them.
However, when I opened the `TestSendReceive.fsm` file and attempted to run it independently, I encountered a console error:From past experience, I suspect that FlexSim is trying to locate the Python module FlexSimPy but cannot find it.
In my troubleshooting, I attempted to create a "symbolic reference" for the FlexSimPy Python module. I modified the code from:
external python "FlexSimPy" "sendToController";
to:
external python "FlexSimLibs.FlexSimPy" "sendToController";
with `FlexSimLibs.FlexSimPy` externally referenced in an effort to resolve the issue. Unfortunately, this change didn’t fix the error, and it also caused the `TestFlexSimPy.py` script to stop working.
After discussing this with my colleague, we arrived at the possibility that .fsm models designed with this type of connectivity might not be intended to run independently of a Python script that creates and calls the .fsm file.
Am I missing something here? Is my .fsm FlexSim file not set up correctly, or is my coworker’s assumption correct?