This content has been marked as final.
Show 3 replies
-
1. Re: [JS][CS4] Remove all hidden page items?
Larry G. Schneider Jan 26, 2012 2:03 PM (in response to booyajamo)What happens if you go from back to front? I think something like this
#target illustrator var idoc = app.activeDocument; for (i = idoc.pageItems.length-1; i>=0; i--){ if (idoc.pageItems[i].hidden == true){ idoc.pageItems[i].remove(); } }Worked on a trial
-
2. Re: [JS][CS4] Remove all hidden page items?
Muppet Mark Jan 26, 2012 2:22 PM (in response to Larry G. Schneider)Larry is right when removing objects from collection its easiest to do from working from the back of the deck… When you remove something all the object indexes get reshuffled… If you delete item 4 then 5 becomes the new 4 and so on… If you delete from the highest numbers first then you won't get an out of range issue…
-
3. Re: [JS][CS4] Remove all hidden page items?
booyajamo Jan 26, 2012 2:24 PM (in response to Larry G. Schneider)Thank you both! The explanation really helps so I can start to understand why things aren't working.



