Taking a model to particular coordinates

S

stephanie borg

So I want to import a model and then take it to particular x and y
coordinates in sketchup. I had to do this in 2 different programs since
the model had to be selected before taken to the coordinates. The
programs are shown below:

machine = "trial.3ds"
model = Sketchup.active_model
show_summary = true
status = model.import machine, show_summary

--------------------------------------------
obj = Sketchup.active_model.selection[0]
pt = model.bounds.center.vector_to([x,y,0])
tr = Geom::Transformation.translation(pt)
obj.transform!(tr)

Is there a way to link these in 1 program?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top