Create Random Alphanumerical Vector Pattern under 3 minutes within the help of Illustrator Scripts.
Scripts used in this tutorial:
Replace Selected Objects with Random Symbols Illustrator Script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
//************************** Script modified by Mehmet Sensoy *****************************// //************************** Replace Selected Objects with Random Symbols Illustrator Script *****************************// //************************** msensoy@gmail.com *****************************// //*************************************************************************************************************************************************// var doc=app.activeDocument; var sym = doc.symbols; if(doc.selection.length>0) { try{ for(i=doc.selection.length-1;i>=0;i--) { var iObj = doc.selection[i]; var iObjL= iObj.left; var iObjW = iObj.width; var iObjT = iObj.top; var iObjH = iObj.height; var currDotx = iObjL; //+ (iObjW/2); var currDoty = iObjT;//+ (iObjH/2); var currDot=doc.symbolItems.add(sym[Math.floor(Math.random() * sym.length)]); currDot.height = iObjH; currDot.width = iObj.width; currDot.position=[currDotx,currDoty]; iObj.remove(); } alert("Please wait..."); } catch(e) { alert("Unknown error occured."); } } else { alert("There is no selection"); } |
Convert Layers to Symbols
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
var doc = app.activeDocument; var lays = doc.layers; for ( var i = 0; i < lays.length; i++ ) { var grp = lays[i].groupItems.add(); var items = lays[i].pageItems; for ( var j = items.length-1; j > 0; j-- ) { // items[j].move( grp, ElementPlacement.PLACEATBEGINNING ); items[j].moveToBeginning( grp ); }; doc.symbols.add( grp ); }; |
And the other scripts are;
- Random Swatches Fill Script.
- Ungroup.