question

qoie200011 avatar image
0 Likes"
qoie200011 asked Julie Weller commented

run python code in Flexsim

Hello,

I want to execute functions from a python file in Flexsim, and the Flexsim version I'm using is 21.2.3. But this version can only use Flexscript or read DLL. I wonder is there any way to do the above requirement.

Any help would be appreciated!

FlexSim 21.2.4
python flexsim
· 1
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

Hi @qoie200011, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of 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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Kavika F avatar image
0 Likes"
Kavika F answered Kavika F edited

Hey @qoie200011, you would have to upgrade your version to at least 22.1 to use the Python connector. It wasn't implemented until then.

If you had a server, you could try using the Http API to send requests to a server that you have, have the server process the requests to run a python script or function, then send the results back through the server to the model.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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