question

Martin K5 avatar image
0 Likes"
Martin K5 asked Jeanette F commented

Can anyone help me with flexSimPy?

Hi,

I tried to follow this thread:Future Python and FlexSim integration - FlexSim Community implementing the Python connection to be able to call Python script from FlexSim, but I am getting the "No module named xxx" error.

What is wrong please?


Thank you.

Martin

PyMod.py

test.fsm

FlexSim 22.2.4
codepythonconnectionsflexsimpy
pymod.py (86 B)
test.fsm (27.8 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Martin K5, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

Hey @Martin K5, have you taken a look at this post "How to use Flexscript (Python) to create the data into global table"? In it I explain how to connect your Python script to Flexscript so you can execute it in a model.

· 3
5 |100000

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

Martin K5 avatar image Martin K5 commented ·
Hi, yes I have. I have the same settings, but it does not work and I am not able to find the problem, that is why I asked for a help.


Thank you.

0 Likes 0 ·
Martin K5 avatar image Martin K5 commented ·

I tried to rebuild the model as attached and still getting errors.


Would you be able to help please?


Thank you.

test.fsmTestPy.py


0 Likes 0 ·
test.fsm (26.9 KiB)
testpy.py (55 B)
Kavika F avatar image Kavika F ♦ Martin K5 commented ·

The external linking names are case-sensitive. You currently have

1681400417377.png

but your python script is lowercase, so it should be

1681400438674.png

It works fine after that change.

0 Likes 0 ·
1681400417377.png (3.8 KiB)
1681400438674.png (3.9 KiB)

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.