question

J avatar image
-1 Like"
J asked Phil BoBo commented

How to connect FlexSim with GUI made by python

I have made a graphical user interface by python. Like the JPG below. And I also create a module for FlexSim called pythonGUI. Like the JPG below. But how to import the GUI into FlexSim confused me.1635319996125.png1635320178829.png

FlexSim 21.2.3
guipythongraphical user interface
1635319996125.png (92.4 KiB)
1635320178829.png (16.6 KiB)
· 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·
@J You can create GUIs like that within FlexSim, especially if you're making your own module.
0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Matthew Gillespie ♦♦ commented ·
0 Likes 0 ·

1 Answer

·
Phil BoBo avatar image
0 Likes"
Phil BoBo answered

Your python GUI is an application running in its own process with its own message loop (line 15 of your code).

FlexSim is a GUI application running in its own process with its own message loop.

If you want to communicate between application processes, you need to implement inter-process communication code within your application and FlexSim that can communicate with each other. For example, you can use sockets:

how to use flexsim socket communication with server and client - FlexSim Community

socket — Low-level networking interface — Python 3.10.0 documentation

You cannot simply "import the GUI into FlexSim." Your "GUI" is an entirely different application written in Python.

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.