Ruby script to write component size to attributes only partially working

you can test if an entity is a component with

if entity.is_a? Sketchup::ComponentInstance
3 Likes