# Array Between

**URL:** <https://discourse.mcneel.com/t/array-between/117314>\
**Category:** Rhino\
**Tags:** windows\
**Created:** [January 28, 2021, 10:53pm UTC](https://discourse.mcneel.com/t/array-between/117314 "2021-01-28T22:53:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![devingrayart](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/devingrayart/32/769417_2.png) [@devingrayart](https://discourse.mcneel.com/u/devingrayart)\
**Post date:** [January 28, 2021, 10:53pm UTC](https://discourse.mcneel.com/t/array-between/117314/1 "2021-01-28T22:53:58Z")

</div>

Is there a command in rhino that allows you to array an object between two points?  
This post isn’t quite what I’m after: [ArrayLinear — Can Second Point be the End of the Array? - Rhino / Rhino for Mac - McNeel Forum](https://discourse.mcneel.com/t/arraylinear-can-second-point-be-the-end-of-the-array/79245)

See attachments…

 ![ArrayBetween](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/1/b/71b4e39b6c872dc6bfdbb076944e0fb46926608b.jpeg)

The thing is that the array needs to begin with the spacing at the first point and end with the spacing at the last point, creating all equal spaces and forcing the first and last copies of the object to the outside of the two points.

The current manual method I use (demonstrated below) doesn’t really take that long to accomplish, but I really feel like, programing-wise, this should be quite achievable and easily translated into a command. I should probably delve into Grasshopper, but I’m not sure when the time will come.  
Anyway, to achieve the ‘ArrayBetween’ I have to place the object (with a bounding box if it’s an odd shape) with its outer face on the outside of my 2 points and draw a line between their centers - then I use ArrayCrv. Not labour-intensive, just curious if a command exists or is in the works.

 ![ArrayBetween-CurrentMethod](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/b/5/9b56611d7401674a777a98380a9e7c7fb4ecfcd3.jpeg)

Cheers!

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [January 29, 2021, 12:29am UTC](https://discourse.mcneel.com/t/array-between/117314/2 "2021-01-29T00:29:16Z")

</div>

Hello - for now, get the ends in position and use `Distribute` to even things out.

-Pascal

---

<div class="post-metadata">

**Author:** ![devingrayart](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/devingrayart/32/769417_2.png) [@devingrayart](https://discourse.mcneel.com/u/devingrayart)\
**Post date:** [January 29, 2021, 12:52am UTC](https://discourse.mcneel.com/t/array-between/117314/3 "2021-01-29T00:52:55Z")

</div>

Great thanks - that’s swifter than my process, thank you.

Would love to see it develop into ‘distribute along a curve’. That’s the dream!

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [January 29, 2021, 12:54am UTC](https://discourse.mcneel.com/t/array-between/117314/4 "2021-01-29T00:54:49Z")

</div>

Hello - for distributing along a curve, `ArrayCrv` may help, otherwise, a linear array and `Flow` from a line to the curve may do it.

-Pascal

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 29, 2021, 1:21am UTC](https://discourse.mcneel.com/t/array-between/117314/5 "2021-01-29T01:21:53Z")

</div>

You can also use [this python script](https://github.com/studiogijs/pythonscripts/blob/master/ArrayBetween.py)

---

<div class="post-metadata">

**Author:** ![user3134](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/user3134/32/759255_2.png) [@user3134](https://discourse.mcneel.com/u/user3134)\
**Post date:** [April 6, 2024, 10:15am UTC](https://discourse.mcneel.com/t/array-between/117314/6 "2024-04-06T10:15:43Z")

</div>

Hi Gijs, Im a relative newbie, as far as im aware to run a script you must enter the command ‘run rhino script’ and select it from where ever you have it saved within your files. Is it possible to save a script within Rhino so you don’t have to try and remember where it was saved and go digging for it?

thanks

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [April 6, 2024, 10:19am UTC](https://discourse.mcneel.com/t/array-between/117314/7 "2024-04-06T10:19:07Z")

</div>

hi @user3134  
There are several ways. Pls have a look [here](https://www.rhino3d.com/docs/guides/scripts-plugins/how-to-use/) for more info how to use and run scripts.

---

<div class="post-metadata">

**Author:** ![user3134](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/user3134/32/759255_2.png) [@user3134](https://discourse.mcneel.com/u/user3134)\
**Post date:** [April 6, 2024, 10:31am UTC](https://discourse.mcneel.com/t/array-between/117314/8 "2024-04-06T10:31:31Z")

</div>

Thanks but I’m on a Mac…is there a similar help page for Macs? I can’t seem to find one

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [April 6, 2024, 11:00am UTC](https://discourse.mcneel.com/t/array-between/117314/9 "2024-04-06T11:00:37Z")

</div>

@user3134 you can Follow this guide to make your own macros in Rhino 7 for mac:

> **[Customize toolbars | Rhino 3-D modeling](https://docs.mcneel.com/rhino/7mac/help/en-us/toolbarsandmenus/customize_toolbars.htm)**
>
> How to customize Rhino toolbars.

for the rest you can still use the guide I showed, particularly [option 4 and 5](https://www.rhino3d.com/docs/guides/scripts-plugins/how-to-use/#using-pythonscript-scripts)

---

<div class="post-metadata">

**Author:** ![user3134](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/user3134/32/759255_2.png) [@user3134](https://discourse.mcneel.com/u/user3134)\
**Post date:** [April 6, 2024, 11:02am UTC](https://discourse.mcneel.com/t/array-between/117314/10 "2024-04-06T11:02:06Z")

</div>

Fantastic, thank you!

---

<div class="post-metadata">

**Author:** ![Erkki\_Koitla](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erkki_koitla/32/575483_2.png) [@Erkki\_Koitla](https://discourse.mcneel.com/u/Erkki_Koitla)\
**Post date:** [May 11, 2024, 2:22pm UTC](https://discourse.mcneel.com/t/array-between/117314/11 "2024-05-11T14:22:24Z")

</div>

Choose a line along what you want to have the objects.  
Then use **“Divide”** and divide the line into how many equal length segments you need. After that it gives points on the line on which you can copy the objects you want.

---

<div class="post-metadata">

**Author:** ![user3134](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/user3134/32/759255_2.png) [@user3134](https://discourse.mcneel.com/u/user3134)\
**Post date:** [May 12, 2024, 10:33pm UTC](https://discourse.mcneel.com/t/array-between/117314/12 "2024-05-12T22:33:26Z")

</div>

yeah, that’s another good way, it does add an extra step in the process though. Also it does not give you equal divisions if you want to place objects of a certain width BETWEEN two points. If you spread objects 100mm wide along points on a divided line you would end up with 50mm overhanging the end points.

---

<div class="post-metadata">

**Author:** ![mc11](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mc11/32/642795_2.png) [@mc11](https://discourse.mcneel.com/u/mc11)\
**Post date:** [May 29, 2025, 7:36am UTC](https://discourse.mcneel.com/t/array-between/117314/13 "2025-05-29T07:36:27Z")

</div>

![Screenshot Script Editor](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/e/d/7ed9021b11af488cf1e88a88fba0f61ceeeb0676.png)  
Rhino 8 Mac

---

<div class="post-metadata">

**Author:** ![mc11](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mc11/32/642795_2.png) [@mc11](https://discourse.mcneel.com/u/mc11)\
**Post date:** [May 29, 2025, 8:39am UTC](https://discourse.mcneel.com/t/array-between/117314/14 "2025-05-29T08:39:20Z")

</div>

Line 114  
`print("can't calculate boundingbox")`

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [May 29, 2025, 9:31am UTC](https://discourse.mcneel.com/t/array-between/117314/15 "2025-05-29T09:31:44Z")

</div>

@mc11 yes, that script is old and needs updating

---

<div class="post-metadata">

**Author:** ![mc11](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mc11/32/642795_2.png) [@mc11](https://discourse.mcneel.com/u/mc11)\
**Post date:** [May 29, 2025, 9:50am UTC](https://discourse.mcneel.com/t/array-between/117314/16 "2025-05-29T09:50:01Z")

</div>

BTW, still great script. Thank you for that.

---

<div class="post-metadata">

**Author:** ![Victortems](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/victortems/32/646402_2.png) [@Victortems](https://discourse.mcneel.com/u/Victortems)\
**Post date:** [December 6, 2025, 8:47pm UTC](https://discourse.mcneel.com/t/array-between/117314/17 "2025-12-06T20:47:27Z")

</div>

Hello, sorry this is and old thread but the script seems to not work for me.. I added the parenthses but it just blink and nothing (I added it to a button) .. If someone has a clue…

Thank you

---

<div class="post-metadata">

**Author:** ![mc11](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mc11/32/642795_2.png) [@mc11](https://discourse.mcneel.com/u/mc11)\
**Post date:** [December 8, 2025, 9:54am UTC](https://discourse.mcneel.com/t/array-between/117314/18 "2025-12-08T09:54:59Z")

</div>

The script works for me in Rhino 9 WIP. I have attached @Gijs ’s modified script for you.

![arrayBetween_rhino9](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/8/3/483dfea434e9ad4fe02769e15aadc492426f35d9.gif)

[ArrayBetween.py](https://discourse.mcneel.com/uploads/short-url/cLwcckAgpNrIdq9B8rUELNjKFhB.py) (4.6 KB)

---

<div class="post-metadata">

**Author:** ![Victortems](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/victortems/32/646402_2.png) [@Victortems](https://discourse.mcneel.com/u/Victortems)\
**Post date:** [December 8, 2025, 10:55am UTC](https://discourse.mcneel.com/t/array-between/117314/19 "2025-12-08T10:55:26Z")

</div>

Hello,

Thank you, it was, in fact, me not knowing how to properly affect a .py script to a button. Problem solved. Have a nice day!

---

<div class="post-metadata">

**Author:** ![Zander](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/zander/32/761836_2.png) [@Zander](https://discourse.mcneel.com/u/Zander)\
**Post date:** [September 7, 2026, 7:35am UTC](https://discourse.mcneel.com/t/array-between/117314/20 "2026-09-07T07:35:46Z")

</div>

Hey, not sure if this has been added as a standard Rhino command yet (really should be) but I’ve used Claud to write a tool that works really well for this: (Note - sorry if the tools for this have already been created, but hopefully this is a good addition? I think the biggest difference between this tool and the Python scripts that have already been created is that this runs like a normal Rhino command, and not in a menu?)

[ArrayBetweenPoints.cs](https://discourse.mcneel.com/uploads/short-url/i23XEI5QvF0nxifGXT8DrTLdWtm.cs) (9.4 KB)

**Installation**

1. Save the script file. Save `ArrayBetweenPoints.cs` (attached) anywhere on your computer — for example: `Documents\Rhino Scripts\ArrayBetweenPoints.cs`
2. Create a command alias that points at it. In Rhino, open the alias settings:
  - Type `Options` on the command line (or Tools menu → Options), then go to the Aliases page.
  - Click New.
  - Alias: `arrfit` (or any name you like)
  - Command macro:

```auto
     _-ScriptEditor _R "C:\full\path\to\ArrayBetweenPoints.cs"

```

```auto
 Replace the path with wherever you saved the file in step 1. Keep the quotes.

```

- Click OK, then Apply/close Options.

That’s it — no compiling, no separate install step. The alias tells Rhino’s Script Editor to run the file directly each time.

1. Run it. Type `arrfit` on the command line (or select your object(s) first, then type `arrfit`) and follow the prompts.

**Usage**

1. Select the object(s) to array before running the command, or just run it and click objects then press Enter to confirm the selection.
2. Run `arrfit`.
3. Enter the quantity (total items in the array, including the original). Defaults to your last-used quantity — press Enter to repeat it.
4. Click the base point — a reference point for the array’s direction and distance; the object doesn’t move to it.
5. Move toward the end point. Ghost copies of your object(s) preview live at each array position as you move. To change the quantity, just type a new number and press Enter instead of clicking — the preview updates instantly and you’re still on the same prompt, ready to click. Click to confirm the end point.

The last copy in the array ends up displaced from the original by exactly the base→end vector, with the rest evenly spaced along that same line.

**Notes / limitations**

- Built and tested in Rhino 8 on Windows. If you try it on Mac or Rhino 7, the alias/Script Editor mechanics may differ.
- The remembered quantity is stored per-Windows-user (AppData), not per file — it carries across different jobs.
- This is a script, not a compiled plugin — you can open and edit it freely in Rhino’s Script Editor if you want to tweak anything (e.g. the ghost preview color, which is currently yellow)

Cheers!
