Place a shape at regular intervals between two lines


#1

Hi all,
I am new in ruby for sketchup, I do it as hobby…
I am trying to understand how to use location, and shape distribution with ruby.
And to do this, my test is to place one rectangular shape between two lines and paste it until the end of sinusoidal lines with regular intervals.

Can you help me about this? Just to know which function I must to use, how to select my rectangular shape, and give it the destinations’ lines to be paste and distribute?

Thanks by advance !

Nckb

PS : I hope that I use correct english to explain you my problem :wink:
PPS : If you want pictures, I can upload it…


#2

Have you discovered the API documentation yet? If not, you should. When thinking in terms of SketchUp’s API, you do not “select” but you have (or get) a reference to an entity. You do not “paste” etc., but you create new entities or insert an instance of an already defined component/group. Also SketchUp does not have a rectangle primitive, so you will have to handle several entities (4 edges and 1 face) and so it is easiest to have them in one group.

So you need to look up methods to: