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)
Advertisement