You mean stack or what?
All the transformations in Illustrator, except for explicit send back/forward/front/rear and the Symbol Shifter, are about X/Y shifts. But that doesn't change the fact that everything in Illustrator still has a Z stacking order; it's just effectively "automatically asigned" by the creation order. Patterns, brushes, effects, even meshes and dashes auto-replicate things, but the copies do not occur at the same Z position; they still have a Z order.
So simply use to advantage the tools which automate replication.
Don't create a Group. Draw one object. Store it as a Symbol.
Apply Transform Effect with copies to create a row; apply Transform Effect again to create a stack of rows.
Do it again to create a stack of matrices.
To impart a bit of random distribution, Expand Appearance, Ungroup; apply Transform Each with the Random option on.
Thanks for the info JET. I will mess around with it and see if I can get it to work. I am wondering if it may be easier if I want a more controled effect to create a custom action or macro that can iterate through a large group of objects and set the z stacking order on them in this way as well...
I am wondering if it may be easier if I want a more controled effect to create a custom action or macro...
Easier? Using multiple applications of Transform Effect is easy:
- The transformation parameters are still editable after-the-fact.
- The transformation stack can be stored as a Graphic Style.
- Using a Symbol lets you swap out the entire array using the Replace Symbol command.
You can make a Graphic Style which results in a "one dimensional" array (a line of ordered duplicates), another Style for a "two dimensional array" (a grid of ordered duplicates), and another Style for a "three dimensional array" (an ordered stack of grids). That set of Styles, in combination with Symbols is quite versatile and re-usable. All four of the examples I depicted are re-applications of the same Style and/or minor tweaks of the parameters, and a Symbol replacement.
The problem with Actions is the matter of "iteration through a large group." Actions (macros) are just dumb recordings of a sequence of standard interface commands. To iterate through a large group, you have to devise a means by which make the Action select the appropriate "next" object. There is no programmable aspect to Actions. So you would have to figure a way to "define" for the Action what "next" means in terms of standard commands. The regular Select>Next Object Above/Below won't do you any good, because they already refer to the existing stacking order (the very aspect you are trying to edit), not the merely visual arrangement (the X/Y positions of each). So devising a means that would work for all similar instances is unlikely and will be unwieldy.
Scripting can be used, but it's certainly not "easier" to set up, and you have a similar problem in that you have to very explicitly work out exactly what you want to occur. You can't code human "fuzzy logic" like "the next object in this group" without defining exactly what "next" means. In other words, if "next" means to you the object merely visually located at a "higher" or "lower" or "left" or "right" position on the page, you have to explicitly code that so as to target the desired objects in the requred sequence. And once a script is run, it's done. You don't invoke the script to go back and "further" adjust what it's already done. The script is starting all over.
For example, I have a set of scripts which I use to re-arrange the z-order of individual textFrames in correct reading order, so that the reading order is correct when the text is concatenated into a single textFrame. (A common problem when dealing with text in CAD imports.) But that's a repeatable algorithm for a repeatingly similar situation. The situation you are describing is not like that.
So before you dismiss the suggestion already provided, try it.
Hello JET, I did try it, I was not dismissing your method at all. The symbol transform works great as long as I plan it from the beginning. The other peice for a script or action is for those situations where I have already done a great deal of work or already have a large number of objects that are not symbols and am trying to arrange them after the fact. I also wish I had started using symbols much earlier due to realizing I now need to go back and adjust some of the elements of existing objects which in some cases there are hundreds. Oh well, I will have to start doing that in the future. Thanks again for all of your assistance!
Any idea if there is a way when selecting a group of objects if you can have it intelligently change the stroke color for just those pieces in the groupt that have a visible stroke? For example I have hundreds of leaves on a tree. Each leaf is a small group made of multiple pieces some with stroke applied and some with the stroke set to none (not visible). I realized I need to change the stroke color on the parts that actually have a stroke showing. Going into each leaf object and inidividually updating the stroke on the peices within the leaf that have a visible stroke is going to be a nightmare as I have hundreds of leaves...
Thanks again for the transformation approach, I did not mean to sound as if I was dismissing it, I should have been more clear in that reply that I had tried it and the script peice was in regards to projects that are already far along that did not use symbols. Any idea if I have hundreds of copys of an object if there is a way to have it convert all of them to instances of a symbol?
...I need to change the stroke color on the parts that actually have a stroke showing...
See the documentation for the several Select Same... commands. (Not nearly as powerful as select-by-attribute features in other programs, but will probably do what you describe, unless there are complicating issues you have not described.) Subselect (white pointer) one of the paths with the stroke. Select>Same>Stroke Color. Apply a different Swatch.
Similar selections are possible (to select similar attributes within a tolerance range) with the Magic Wand selector.
I have hundreds of copys of an object if there is a way to...convert all of them to instances of a symbol?
That's something I use a script for; not because I fail to use Symbols from the start, but as a subroutine for more elaborate automation procedures that necessarily involve an intermediate step in which many non-Symbol objects are generated. It's a fairly simple thing to script, and is a good exercise to get acquainted with scripting.
Get in the habit of always considering Symbols whenever you find yourself using multiple occurrances of the same graphic.
I did some research and the question in this topic matches my problem the most.
I have a Illustrator file in which I have 128 circles (path's). I'd like to organise the Z-order, because this file will be cut on a lasercutter. The lasercutter moves based on the z-order. So you don't want the laser to moves all over the place.
I did a quick video to show what happens:
I noticed that the paths are shuffled (they where originally pretty organised) when I make a compound path and do an intersection (the rectangular cutout).
I'd like to make a script that checks the position of each path and give it the right zorder index.
For example, I have a set of scripts which I use to re-arrange the z-order of individual textFrames in correct reading order, so that the reading order is correct when the text is concatenated into a single textFrame. (A common problem when dealing with text in CAD imports.)
This sounds like something I could use/modify.
Do you mind sharing that script?