Randomly select a percentage of objects.
Enter in a percentage value to select and Randomill will calculate and randomly select that percentage of objects from within the current selection. The selection algorithm is optimized so that it will select or deselect based on how many operations have to be completed. There is also error handling for selecting too many or too few objects.
Randomly select a specific number of objects.
Select the Count submode and enter in how many objects you need to be selected. Randomill will randomly choose that many objects to select from within your current selection.
When would this random selection function be useful?
Random selection is a ubiquitous feature that can be used in an almost unlimited number of ways. It’s especially useful for making repetitive patterns or background textures a bit more varied while still retaining their cohesive look.
This random select script is especially useful for creating sub-selections of objects for further randomization. For example, if you wanted to randomize a grid of squares to have a 2/3 red fill color, and 1/3 green fill color, you could fill the whole grid with green, and then randomly select 66% of the squares using this tool and fill them with red.
A note on using random selection with large groups of objects.
Please note: Using the random selection function on very large selections may take a long time to finish and could even crash Illustrator depending on how large the selection is. The reason for this is that the script selects objects by flipping the object.selected = true flag, which automatically causes Illustrator to re-draw the document, negatively impacting performance. However, with the latest version of Randomill, this problem has mostly been solved with an optional experimental feature called ‘Experimental Fast Select’, accessible in the advanced options.
What is “Experimental Fast Select”?
This option is an alternate way for Randomill to create selections of objects. The way it works is by creating a temporary action (the same type of action that you would record in the actions panel) and then execute that newly created action to select the objects.
The way the dynamically created action works is that for every object that has to be selected, Randomill will set the ‘note’ of that object (an obscure feature accessible through Illustrator’s attribute panel) to be contain some text. The action that Randomill creates works by selecting all objects that have that text within the note of the object.
This works much faster (by orders of magnitude) than the standard selection method, but may be less reliable, and is therefore an optional experimental feature. However, everyone should use it if it works for them since it’s so much faster.
Related Functions
Selection – Stack
Select a percentage or a specific number of objects from the top, middle, or bottom of the currently selected object layer stack.
Duplication – In-Place
Duplicate multiple objects a specified number of times while retaining the original layer order of the resulting duplicates.
Duplicaton – Count
Duplicate an object a specific number of times with customizable layer stacking options.