Hi API friends,
Today I bumped into an unexpected behavior and I’d like your advise regading what I’m doing (working on SU2019 Pro).
After cleaning a scene provided by users using Dynamic Components to generate their model, I added a quick “dynamic_attributes” attribute dictionary cleaning pass to avoid errors when subsequent manually trasnformations are performed by the users.
Cleaning Code (only dynamic part)
#Remove the dynamic component data Sketchup.active_model.entities.each do |current_entity| if current_entity.is_a? Sketchup::Entity current_attrdict = current_entity.attribute_dictionaries current_attrdict.delete("dynamic_attributes") unless current_attrdict.nil? end end
The dynamic attributes seems totaly deleted but on some component instances, when transforming them , they are recreated and SU is trying to apply them again…
Did I missed something when cleaning the dynamics attributes ?
Thanks for any help on this