Delete All Guides Illustrator Script

How to remove all guides in a document using Illustrator Script?

1

This post has already been read 2351 times!

Today we have a quick, time-saver scripting tip for Adobe Illustrator; Remove all guides in an artboard (or in multiple artboards) using short Illustrator Script.

We strongly recommend using ScriptBay panel for executing scripts. You may download it for free here. ( You may also check this link about installing ScriptBay to Adobe Illustrator.)

 

// Remove all guides
var doc = app.activeDocument;
for (var i = doc.pathItems.length-1; i >= 0; i–) {
var p = doc.pathItems[i];
if (p.guides == true) {
p.remove();
}
}// Remove all guides
var doc = app.activeDocument;
for (var i = doc.pathItems.length-1; i >= 0; i–) {
var p = doc.pathItems[i];
if (p.guides == true) {
p.remove();
}
}


 

 

1 Comment

  1. PeZ
    PeZ11-20-2016

    This script actually has a syntax error that won’t let Illustrator run it. in the 4 loop it shows “i-” when the correct subtraction is “i–“

Leave a Reply