Change product properties

Hi all,

I’m having some trouble with the following.
I have a process node in which I create a product, on which I send a signal (laars_binnen) to a phython script.
When the python script receives this signal, I look for the product in the node’s container, and I want to assign certain properties to this product.
After assigning, I send a signal back (waardes_aangepast), after which the node can transport the product:

This works perfect, however, every loop in the python scripts has significant effect on the simulation time. I can narrow it down to this:

Is there a more efficient way of doing this?

Hello,
Two tips:

  1. Make sure that “Rebuild” option is set as False for all properties that are changed. Rebuilding re-evaluates the entire geometry feature tree of the component, so it is expensive for performance especially if the component has lots of transform features or very much triangles.
  2. Sending (reseting) the signal waardes_aangepast in the process routine seems to be unnecessary, and it may have a small effect on performance. Set WaitTrigger as True for the WaitSignal statement, so it doesn’t need to be reseted to False in between.
1 Like

Ah thanks alot for the tips!
The rebuild checks were causing the problem