question

J avatar image
0 Likes"
J asked Connor A commented

Script Console

I have made a UI interface with C#. It can communicate with Flexsim successfully using socket. I'm I using script console to send the message of content to socket. But it seems that I can only send message while pressing the execute button. I'm wondering if Flexsim can send message by it's self if the content is changed. Thank you so much!

FlexSim 20.0.10
scriptsocket
· 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.

Connor A avatar image Connor A commented ·

Hi @J, was Phil BoBo'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

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo edited

Instead of putting your socket code into the Script Console and pressing the Execute button, put it somewhere else that will be executed when you want it to be.

For example, in the On Model Open trigger. See Automatically Configure and Run a FlexSim Model - FlexSim Community

Or in a timer event on a Custom GUI as described in the 'Creating a Socket Connection in FlexSim.pdf' attached to how to use flexsim socket communication with server and client - FlexSim Community

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.