This post was flagged by the community and is temporarily hidden.
You can’t pass or share any Python objects between scripts (or components for that matter) directly like that.
Your options are basically these:
- Have a separate socket server in each component script that needs to communicate outside VC
- Have 1 socket server in the layout and then pass messages (received and to send) in serialized form using string signals to other components. The socket server could be implemented as a .NET plugin as well.
Thank you for your advice！
As for the first suggestion, it is somewhat different from my requirements, so it should not meet my requirements.
The second suggestion is that the function can meet my requirements, but I think it will affect the communication efficiency.
In addition, I would like to ask how the.net Plugin transfers parameters to the interior.The official tutorial only provides examples of custom functions. Can you provide relevant examples?
You can’t “call” or access Python scripts directly from the .NET API either so the communication would need to be done with signals or properties.
The .NET API has similar ways to manipulate signals and properties as the Python API, but since the plugins aren’t tied to a component you need to find a component and the props / signals within it first. See ISignal and IProperty in the .NET API reference.
OK，Thanks very much.