I want to make unique, all the components added and placed manually with the tool moved.
mod = Sketchup.active_model path = Sketchup.find_support_file("MyComponent.skp", "Plugins/plugin folder/subfolder/" ) Component = mod.import(path)
As the method is executed before positioning the furniture, I find no solution.
If the component is loaded with a defined position in the method, all become possible.
mod = Sketchup.active_model entities = model.active_entities defs = mod.definitions path = Sketchup.find_support_file("CLICK-CUISINE 2 - MB RGT_04.skp", "Plugins/TNT_ClickCuisine2/Components/" ) definition = defs.load(path) point = Geom::Point3d.new(0, 0, 0) transformation = Geom::Transformation.new(point) instance = entities.add_instance(definition, transformation) instance.make_unique
My goal is to be able to do a “grep”, of the component placed with the cursor of the mouse.
If that’s possible, then I could make it unique and do a lot more.
Thank you in advance for your help.