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!
π« Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Get/Set Image and Group glue_to ?
-
ComponentInstancehas.glue_to- butImageandGroupdoes not despite that they can be glued.
AndFacehas.get_glued_instanceswhich does list Images and Groups attached.Is there a workaround to glue or unglue
ImageorGroupentities using the API? -
class Sketchup;;Group def real_parent if self.entities.parent.instances.include?(self) return self.entities.parent else Sketchup.active_model.definitions.each{|definition| return definition if definition.instances.include?(self) } end#end return nil # Should not happen. end end class Sketchup;;Image def real_parent if self.entities.parent.instances.include?(self) return self.entities.parent else Sketchup.active_model.definitions.each{|definition| return definition if definition.instances.include?(self) } end#end return nil # Should not happen. end endNow use these to find the 'component-instance' of a group/image - e.g. of say the group you want to 'unglue'...
group.real_parent.instances.each{|ins| if ins == group ins.glued_to = nil break end#if }I haven't tried this but something like it should work...

EDIT: tried it it fails !

-
see new beta post, SKX forum:
[code] beta Group/Image parent, glued_to? etc.
Advertisement