question

Mischa Spelt avatar image
1 Like"
Mischa Spelt asked Matthew Gillespie answered

Trigger on resize

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.

FlexSim 19.1.1
triggersdragresize object
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Matthew Gillespie avatar image
3 Likes"
Matthew Gillespie answered

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


colorwhenscaled.fsm (17.8 KiB)
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.