Taking a model to particular coordinates

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)

Is there a way to link these in 1 program?


Posted via http://www.ruby-forum.com/.