Duplication

Randomill allows for fast and flexible duplication of objects. Copy objects a specified number of times, duplicate objects into a grid, or duplicate multiple objects in-place while preserving layer order.


Count Mode

Count mode allows users to duplicate a single selected object a specified number of times. This can be a good first step before using something like color randomization or position randomization to recolor and then scatter all the copies around.

One square is copied into three squares, symbolizing duplication of an object a specific number of times.

Copy objects in-place a specific number of times

With this copy object illustrator script, just specify how many times an object should be duplicated, and whether resulting object copies should be created above or below the original object in the layer stack. Objects are then created in the same spot as the original.


Grid Mode

Duplicate objects into a grid of specified dimensions and margins. Useful for filling out an area with a bunch of objects to establish a baseline for further randomization across the whole object set. Grid duplication can be followed up with in-place duplication to create multiple copies of each object in the grid.

One square is copied into a 5x5 grid of squares.

Copy an object into a grid in Adobe Illustrator

Specify how many rows and columns the grid should contain, as well as horizontal and vertical margins between grid items.

Grids are created by copying objects from left to right through a row, and then down into the next row. This can be flipped using the Grid flows down and across option. If checked, grids will be created downwards through a column first, and then across into the next column from left to right.

Users can also specify if each new copied object should be placed above or below the previous object in the layer stack using the Duplicate downwards in layer stack option.

Finally, users can specify whether Randomill should take object strokes into consideration when calculating grid margins between objects by checking the Include stroke width in margin calculation checkbox.

The order of objects in a grid can also be altered after the fact using Randomill’s layer arrange feature.


In-Place Mode

Duplicate multiple objects a specified number of times each, while retaining layer order. This illustrator object copy script is a great way to copy multiple objects fast while preserving parent layer order, and keeping the overall layer hierarchy intact.

Three squares are copied twice each, resulting in nine squares.

Normally, when duplicating sets of objects in Illustrator, the created duplicate group or set of objects is created above all of the original objects in the layer stack.

Copy multiple objects and retain layer order

Using the In-Place Duplication Mode, users can instead create a specific number of duplicates for each object that is selected in Illustrator, while retaining the overall layer stack structure. The resulting duplicates for each object in the selection will be placed above or below their original object in the layer stack, but retain their layer stack position relative to the other objects in the selection.

This can be useful if you’re working with multiple overlapping objects and need to create duplicates of those objects that retain the same overlapping pattern.

For example: let’s say you have a pattern of overlapping diamonds, but you want to create a pattern within them while retaining the overall layer stacking:

With native duplication, all created duplicates would be stacked above all of the original objects, but Randomill’s in-place duplication let’s you retain the original layer order and weave duplicates within it.se copies in the grid will have its fill color randomized.

Include initial objects in result

When using in-place duplication, you have the option for the final selection of objects to either include the original objects that the duplicates were created from, or not. When the ‘include initial objects in result’ checkbox is unchecked, only the created duplicates will be selected (and processed by other enabled Randomill functions at the time of duplication).

However, in order for just the duplicates to be selected, the original objects must be deselected, and this can take a long time if the number of original objects is large.

To work around this problem (and other selection-related performance problems), an alternate selection method has been added to Randomill called 'Experimental Fast Select'. This option only appears when using In-Place duplication, and when the include initial objects in result checkbox is unchecked. Read more about it on the selection function page.


Notes

Use duplication in tandem with Randomill’s other functions

When using Randomill’s duplication functions, any other enabled functions in Randomill will be executed on the newly created duplicates. Duplication is done first, and then any other functions are run on the original objects and the newly created duplicates.