Trigger on resize

Trigger on resize

mischa_spelt
Advisor Advisor
5 Views
2 Replies
Message 1 of 3

Trigger on resize

mischa_spelt
Advisor
Advisor

[ FlexSim 19.1.1 ]

Is it possible to get a signal when an object is resized?

I managed to override on drag to capture the user dragging the resize cones, but of course this does not help when they edit the spatials using the Properties window or Quick Properties tab.

I have some logic I'd like to execute when the object changes size, preferably even without resetting the model so that changes show immediately but not necessarily on draw because it will not happen very often.

Accepted solutions (1)
6 Views
2 Replies
Replies (2)
Message 2 of 3

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

The quick properties fields call two function_s methods on the highlighted object when you edit them: scalecomponents and updateResetPosition. You can add one of these nodes to the eventfunctions of your object and they'll be called. Just know that you'll be overwriting any behavior from super classes.

See this example model where I added a scalecomponents node to the processor so that it changes color when you change its size through QP.

colorwhenscaled.fsm



Matthew Gillespie
FlexSim Software Developer

Message 3 of 3

guiroehe
Advocate
Advocate

Hello @Matthew Gillespie , your example does not seem to work in v 25.0.1. What would be the changes in this case?

0 Likes