Set new value of Dynamic Component Attribute and recalculate
-
I want to modify the value of a dynamic component not via property dialog but by ruby code.
How can do that and enforce afterwards a recalculation of the component instances?Eg.: The Component makes the attribute 'copies' user-changeable. I want to define this value and the component should rebuild the instances.
-
Same problem ! Same answer ?
-
You change [or add] the appropriate attribute[s] for the dynamic_component and then force it to refresh thus...
assuming the dynamic_componentis referenced by 'dc' and you know the 'key'/'value' wanted...
dc.definition.set_attribute("dynamic_attributes", 'key', 'value') $dc_observers.get_latest_class.redraw_with_undo(dc)

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement