Hi. I’m new to Ruby. I’m just trying to cut my teeth on something simple. I want to add a new instance of a component to my model and I want to add it 12 inches from the current selection on the x axis and on the same y and z axes.
Here’s a sample of my code. I don’t really think that it’s as easy as this portion of code… ([selection.x+12,selection.y,selection.z])
I just wrote that in to illustrate what I’m attempting.
Basically it’s just about trying to create a new instance of a component relative to a selection.
model = Sketchup.active_model
entities = model.entities
selection = model.selection
definitions = model.definitions
selection = entities.add_instance(definitions,[selection.x+12,selection.y,selection.z])
Thanks for your help