Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
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
