Illustrator Scripting :: How To Loop Through The Artboards

Feb 7, 2012

Is it possible to loop thru the artboards (with Illustrator CS5) and only work with the pageItems on the current iterated artboard?
 
For example, if I have 3 artboards, with 2 textFrames on each artboard.  And I add the textFrames sporadically (I add a TextFrame with contents "Text 1" on artboard 1, then a textFrame with contents "Text 2" on artboard 3, then a textFrame with contents "Text 3" on artboard 1, etc).
 
Artboard 1:
Text 1
Text 3
 
Artboard 2:
Text 4
Text 6
 
Artboard 3:
Text 5
Text 2
 
Is there a way to loop thru these artboards and get the textFrames tied to the appropariate artboard?  So, on the first iteration of the loop, I'm looking at artboard 1 and only looking at "Text 1" and "Text 3", then on the the 2nd iteration I'd be working with artboard 2 and it's textFrames "Text 4" and "Text 6", and so on.
 
If I loop thru only the doc.textFrames, the order would be incorrect, with the way I added each textFrame.  Instead of artboard order, they'd be in this order:
 
Text 1
Text 2
Text 3
Text 4
Text 5
Text 6

View 4 Replies


ADVERTISEMENT

Illustrator Scripting :: Sort Artboards By Name?

Feb 7, 2012

We have over 50 artboards in most of our documents.  Is there a way to sort the artboards as listed in the artboards panel by name via script?

View 13 Replies View Related

Illustrator Scripting :: Centerlines On All Artboards

Jun 22, 2013

I'm trying to create some simple vertical centerlines to be drawn in the same spot on all existing artboards in my document.  What I have so far is creating the proper amount of centerlines but only drawing them in the correct spot on half of the artboards while the other half are being drawn in the space between the artboards.  Here's what I have so far.
  
function addCenterLines() {
    var doc = app.activeDocument;
    for (var i = 0; i < doc.artboards.length; i++) {
    var abRect = doc.artboards[i].artboardRect;
[code]...

showing the top of a couple of the artboards and the misplaced centerlines in between.I think I have a great misunderstanding of how the abRect coordinates work, as in which side is [0],[1],[2] and [3], which may be leading to my inability to get this right. How I can sort out my centerlines. The centerlines provided in the print dialog are not an option in this case.

View 4 Replies View Related

Illustrator Scripting :: Printing All Artboards?

May 30, 2013

I'm building a script that loops through folders and prints all available PDF-files (long story). I'm having some issues with PDF-files, that has multiple artboards in them.
 
When doing the obligatory "sourceDoc.Print()" it only prints the first artboard. Are there any available print-options that I can set to force it to print ALL artboards in the given file?

View 3 Replies View Related

Illustrator Scripting :: How To Add Images In Multiple Artboards

Mar 1, 2012

I need to add images in multiple artboards (each image in different artboards)
 
Initially i added an artboard and placed the image
 
Dim illus_doc As Illustrator.Document

View 4 Replies View Related

Illustrator Scripting :: Resizing Artboards With Actions?

Jul 11, 2013

I have a few hundred vector files each of various sizes. I want them resize the vector shapes to the scale fit to 300"x200" artboard.I want them all to appear centered on a 300"x200" artboard.

View 2 Replies View Related

Illustrator Scripting :: Create Fitted Artboards From Layers?

Oct 8, 2012

Any script that will create artboards for each separate layer?

View 1 Replies View Related

Illustrator Scripting :: Convert Layers In Document To Artboards?

Sep 24, 2013

Script which would convert the layers in a document to artboards? At present I have a lot of documents with a couple of hundred layers on each of them, but I've decided to change the way that I organise my workflow and started using artboards instead. I don't really have the time to spend moving them individually from a layer over on to an artboard as there are a lot.

View 1 Replies View Related

Illustrator Scripting :: Rename Artboards With Layer Names

Mar 7, 2014

I'm looking to create a script to batch rename a number of artboards.
 
- I have 100 named layers.

- I have 100 artboards.

- I would like to rename the artboards to match the layer names.

- The layers are organized in the same descending orderas the artboards (ignoring the actual artboard names*).

- The topmost artboard (1 in the list) would be renamed "newspaper", the second artboard would be renamed "typewriter", the third artboard would be renamed "books", etc.
 
*in the example below the artboard named "Artboard 7" is actually the 6th artboard in list.

View 5 Replies View Related

Illustrator Scripting :: Loop Through All Layers And Sublayers?

Apr 26, 2012

is there a way that I can loop through all layers and sublayers looking for a name of a layer? I have one that loops through only top level layers. I am thinking I have to somehow incorperate all pathItems, groupItems and the like to incorperate all types of "layers" there might be, since a group is technically not a layer but a groupItem.
 
this is what I am doing so far:
 
for (var i = 0; i < numberOfLayers; i++) {
var customName = "div structure";
var myLayer = app.activeDocument.layers[i];

[Code]....

View 6 Replies View Related

Illustrator Scripting :: How To Find A Way To Loop Through All Items

Apr 6, 2012

I'm trying to find a way to loop thru all items in an Illustrator document and get their stroke and fill color.  Sometimes items are spots, sometimes documents are set to RGB or CMYK, etc, so swatches can be a mixture of things.  Is there an easy way to get the swatch name for each item?
 
For example, I can check if an item is a spot, and get it's color like so:
 
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'SpotColor') {
    var s = c.strokeColor.spot.name;
}
 
But if I try to get the name from an item colored 'Black' (which is set to Process Color, CMYK), then I'll need to do something else like:
 
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'CMYKColor') {
    var s = c.strokeColor.name;  // This returns undefined - not sure what I'm doing!!!
}
 
Is there an easier way to achieve this, other than getting the typename of each item, and then trying to figure out it's color name?  I was hoping something like this would work:
 
var c = app.activeDocument.pageItems[0].strokeColor.name;

View 3 Replies View Related

Illustrator Scripting :: How To Import Several PDF Files As Multiple Artboards Into One File

Feb 11, 2013

I have 30 separate illustrator pdf files (one page each) that I would like to make into one Illustrator CS6 file with 30 artboards. Is there any way to do that without having to import one by one?

View 1 Replies View Related

Illustrator Scripting :: Export Selected Artboards PNG24 JavaScript?

Mar 1, 2013

I'm trying to do some workflow enhancements. For our games we need to export to PNG at different resolutions for different mobile devices. I use a artboard per asset and currently manually export 3 times (using file/export/png with use artboards option), at 72 dpi, 144 dpi and 33.75 dpi.
 
I've been modifying a simple Javascript I downlaoded and have got it save to different fixed locations at different scales. All good. However exporting every artboard each time will cause issues with our version control system and take too long. It's not really a solution.
 
So I need a way to either only export the current selected artboards (which I believe can't be done) or somewho show the artboard range dialog that the system uses. Either of those would be a good solution.
 
var docRef = app.activeDocument;
var num_artboards = docRef.artboards.length;
var getName = app.activeDocument.name;
var fileName = getName.slice(0, -3);
[code]...

View 7 Replies View Related

Illustrator Scripting :: Recursive Loop Through File System

Apr 20, 2012

I'm trying to figure out if Javascript is my answer to my problem.  I've been able to re-write all my Applescripts that manipulate Illustrator except for the ones the need to use the file system.  We have switched to PC's at work and now I'm forced to figure this out.  Our art files are saved with a 7-digit number, followed by the name of the art in the file.  Ex:  1000049-Bob's Garage.  My applescript had a recursive loop that worked it's way down through the file structure on our art server until it found the lowest folder to which it belonged, then saved itself there.  Here's an example of how the server file structure (these are folder names) is layed out:
 
1000000-1004999
1005000-1005999
1010000-1014999
 
and so on.
 
The script would load all the foldernames in the first tier of the directory, loop through them and look at the first and last name of each these folder names, then compare the Illustrator filename to them.  If my file was between the two, then the loop called itself, loaded the folders inside that folder, and by doing so, worked it's way down through the folders, through the tree structure until there where no more folders.  At that point, the file was saved, in order, where it should be.

View 7 Replies View Related

Illustrator Scripting :: Export Multiple ARTBOARDS To Multiple JPGs (AppleScript)

Apr 9, 2012

I´m aware that Illustrator doesn´t have multiple artboards options for JPG as it does with eps, or other formats, but is there any workaround for this? Looping current artboard and exporting them to JPG or something.  Or maybe there is someway to force the   "save multiple artboards:true" in JPG?
  
export document currentDoc to file exportFolder as JPEG with options ¬
{class:JPEG export options ¬
, quality:100 ¬
, artboard clipping:true ¬
, artboard range:1 - 2 ¬
, save multiple artboards:true}

View 3 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

Dec 18, 2012

I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work.  Here is my Script, mostly copied from the example script provided with Illustrator (CS5).  And, this works manually, using the file names in the script, via Load Variable Library
 
    Set appRef = CreateObject(strIllistratorVersion)
   
       'Open the file and import the datasets
        Set docRef = appRef.Open(strTemplate & "200-500.ai")
        'docRef.Datasets.RemoveAll
        docRef.Variables("Yearbook").Delete
 
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
       
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai  |  XML file:" & strXMLFolder & ""  & objFile.Name & "^')"
        If (appRef.Documents.Count > 0) Then
            Set docRef = appRef.Documents(1)

 [Code]....
 
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
 
It's simply not loading.  What do I need to do to get it to load?

View 8 Replies View Related

Illustrator :: Artboards And EPS Size

Oct 1, 2013

I'm an experienced CorelDRAW user (so I do have some vector graphic experience) but a noob to Illustrator and trying to evalutate switching.In CorelDRAW when I export an EPS it doesn't matter what size paper the CorelDRAW file uses, the EPS bounding box is only the size of the drawing.
 
In Illustrator, however, it seems that I have to set the art board to the size of the drawing. Otherwise when the EPS is pulled into another program (like InDesign) the frame created is much bigger than the actual drawing leaving white space around the drawing.
 
Is there an EPS setting I'm missing somewhere that would make AI set the bounding box to the drawing and not the artboard?
 
Or (as most of the Illustrator files we'll be working with are created by someone else) is there a way to automatcially set the size of the paste board to the size of the drawing?

View 6 Replies View Related

Illustrator :: Possible To Re-order Artboards?

Dec 16, 2012

Is it possible to re-order your artboards? If so, how?

View 2 Replies View Related

Illustrator :: Artboards Not Aligning?

Feb 3, 2014

I need to create two art boards in my design document.  They are off by a pixel and won't line up like some weird snap feature is on. I've checked and turned off all snap features. Still not lining up.

View 1 Replies View Related

Illustrator :: Artboards Keep Losing X And Y

Aug 6, 2013

I'm using illustrator to add some bits to .DWG files from AutoCAD, and then exporting them as .SVG files WITH the artboard.However, when i open them, the artboard has changed it's X and Y from X:0 Y:0 to X:-0.5 Y:-512, the artboard is 512px by 512px.
 
Also I have noticed that when opening a .dwg file and scaling it on to an artboard, the Y co-ord jumps to -512, but the X stays at 0.Is there a way to constrain these X and Y values so that they are locked at 0?

View 2 Replies View Related

Illustrator :: How To Resize All Artboards At Once

Nov 4, 2012

I have a document with 20 Artboards. When I resize one it only changes that one. I'm in CS5. Is it possible to resize all artboards at once the way you used to be able to do in document set-up?

View 27 Replies View Related

Illustrator :: Layers And Artboards In CC

Nov 4, 2013

In Illustrator CC is it possible to link exclusively specific layers to individual artboards?

View 4 Replies View Related

Illustrator :: Can't Save Artboards

Jun 13, 2013

Everytime I close a file, it deletes all the custom artboards I set up. Is there a way to save them?
 
I'm on CS5 PC

View 7 Replies View Related

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Illustrator :: Alignment On Multiple Artboards

Apr 3, 2013

The document I am working on has two artboards (front and back of a document) and I am trying to center some text on the artboard. The issue that I am having is that when I try to align something to center on the first artboard (the left one) it moves it off that board and aligns center on the 2nd artboard (the right one).
 
I have about 10 other files with this same set up (two artboards, multiple text boxes) and have never had an issue with alignment. As long as "align to artboard" is selected Illustrator never moves the text box to the other artboard to align it.

View 3 Replies View Related

Illustrator :: Resize Multiple Artboards At Once?

Jan 15, 2014

Illustrator CS6I have multiple documents that someone set up. I want to make the artboards the same crop size. 8 to 16 page illustrator files, and I'm sitting here selecting each and entering the size manually.

View 1 Replies View Related

Illustrator :: Creating Artboards From Guides

Jul 5, 2012

I am working on a large wall sticker and I need to "slice" the image into pieces for vinyl printing. Is there anyways to place guides (or slices) and have them be converted to separate art boards for printing? In the past I would make individual art boards the exact size of each object and save them one at a time to send to the printer. Then once the art came in I could piece the wall art back together as I applied it to the wall or glass, But this is time consuming.

View 1 Replies View Related

Illustrator :: Any Way To Add New Artboards To Existing Document?

May 14, 2012

Is there a way to add new art boards to an existing document (same dimensions and same space betwen artboards)? What I do now is I have to create a new file (with new number of artboards) and cut & paste - is there another way to do this?

View 4 Replies View Related

Illustrator :: Remove Guides In Between The Artboards?

Jan 15, 2014

For instance I have a series of guides set across 10 horizontal artboards. I need two more in a vertical format, but all of the guides from the horizontal are carried through.

View 4 Replies View Related

Illustrator :: Use Artboards Disabled When Trying To Save As PDF In CS4?

Jun 13, 2012

I'm trying to save my document to send to a client as a mock-up. When I try to save as PDF the tick box for "Use Artboards" is disabled, so when I save it saves the whole canvas instead of only what is on the artboard. When I try to export  I can tick the tick box but the document still saves the whole canvas with everything that is "hanging off" the artboard too.  The artboard is the exact size of the document.

View 4 Replies View Related

Illustrator :: Adding Artboards That Show Up In A PDF?

Aug 29, 2013

I'm creating a file that has many artboards that I would like to be seen sequentially after saving as a PDF. I've been creating the artboards one at time from left to right to accomplish this. As you can imagine, there are times when I want to add an artboard before something that's already there but it seems like there's no way to do that if there is no more room horizontally...that you have to add extra artboards at the end of all of them and shift everything over to make room for the one you want to insert, which is time consuming.
 
It also seems like once the artboards get to a certain point horizontally (even if it's before the edge of the whole document where you can't place any to be seen), they don't show-up in the PDF, and you have to create a new row. What is the cut off point?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved