Insert a component (.skp file) in a precise point of the model space SU

Hello, everyone, a little help, please…
I insert the component (.skp file) into model space, through these few lines of code…

mod = Sketchup.active_model 
ent = mod.entities 
sel = mod.selection 

filepath = File.join(File.dirname(__FILE__),'/Smeg_Elettro/Lavelli/LLR116-2.skp')

cdef = mod.definitions.load(filepath)

I insert this component, through the click of the mouse in the space model…


I would like to insert this component ( .skp file) in a precise point of the model space, through the x, y, z coordinates of a point and that is therefore not hooked to the movement of the mouse… you can… thank you for your help…

1 Like

Thank you very much, the advice, where to look to solve my little problem, always very kind in helping…

Okay… I think I understand… thanks again…

model = Sketchup.active_model
entities = model.active_entities

pt =,,
transform =
filepath = File.join(File.dirname(__FILE__),'/Smeg_Elettro/Lavelli/LLR116-2.skp')
defComp = model.definitions
compDef = defComp.load(filepath)
instance = entities.add_instance(compDef, transform)