Illustrator Scripting :: How To Check For The Existence Of XML Files

Mar 8, 2013

I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?

View 6 Replies


ADVERTISEMENT

Illustrator Scripting :: How To Check Resolution Of The Image

Jun 26, 2012

How to check the raster image resolution in illustrator through script?

View 15 Replies View Related

Illustrator Scripting :: Syntax To Check Pantone Color?

Aug 16, 2013

Syntax to check pantone color

eg (list.fillColor=="[CMYKColor]")

like that how to find pantone color and how to get the name of the pantone used

View 3 Replies View Related

Illustrator Scripting :: How To Check Color Profile For Current Document

Oct 16, 2012

I'd like to create a script that checks the current document's color profile and checks it against a string, for example "sRGB IEC61966-2.1". My studio has a script that performs various functions to make sure that all the layers are visible/unlocked, checks for stray points, etc., and we'd like to add a check to the color profile because we handle a large number of files and this setting is overlooked a lot.
 
It's alright if this value isn't writable through script (we can just pop up an alert letting the user know that they need to change it), but I can't find where to actually read this setting! We're currently working on Macs and with JavaScript, but any nudge in the right direction.

View 11 Replies View Related

Illustrator Scripting :: Check If A Word / Phrase Exists In Document?

Aug 5, 2013

how would I go about to check if a textframe with specific content exists in a document and if it does then procede with a function?
 
if ("word" exists) { make a new layer}
 
I just need it to check if one instance of the word exist

View 8 Replies View Related

Illustrator Scripting :: Relink Many Files At Once?

Jul 25, 2013

I'm using Illustrator CS6.  I have an artboard with 200 of the same placed file.  I now want to use this same layout for 30 other views, they are the same size, but different images.  If I relink them I have to click through each one.  I tried using a script I found on here by Carlos:
 
#target Illustrator 
// script.name = relinkAllSelected.jsx;
// script.description = relinks all selected placed images at once;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11;
// script.elegant = false;

[code].....
 
and I get an
 
error 25:  Expected: }.
Line:10
->  p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Times}
 
I'm on a mac, os x 10.6.8.  and I copied the script into the script preset folder so its starting  from the drop down menu.  Don't think I'm leaving anything out.  I'm swapping 1 placed(linked) PDF for another.

View 5 Replies View Related

Illustrator Scripting :: Exporting PNG Files With Higher PPI Than 72?

Oct 11, 2012

There is no way to export PNG-files with a higher PPI than 72. I saw a thread that you could scale the pictures when exporting then script to open Photoshop and resize them? This is the last step in my big script and if i cant get this to work i cant use it.

View 3 Replies View Related

Illustrator Scripting :: Batch Export AI Files To PDF

Nov 25, 2012

I found a script that does the job, export tones of ai files to pdf, but I have some files which are in sub folders, and I was trying to find a way to modify this script to include subfolder, but no luck.

Adobe permits you to use, modify, and distribute this file in accordance with the termsof the Adobe license agreement accompanying it.  if you have received this file from a source other than Adobe, then your use, modification,or distribution of it requires the prior written permission of Adobe.
 
This sample gets files specified by the user from the selected folder and batch processes them and saves them as PDFs.
 
Edits by Patrick Mineault:
- only .ai files processed
- files saved in same folder as the input files
- export files have name (oldname).pdf
- PDF settings: editable / acrobatLayers=true for maximum compatibility with Preview
 
// Main Code [Execution of script begins here]
// uncomment to suppress Illustrator warning dialogs
// app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts;
// Select the source folder.
sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
[code]...

View 11 Replies View Related

Illustrator Scripting :: Opening Files As Layers?

Jul 6, 2013

Is there a way to open a file as a layer? I want to open multiple files in the same window to make a collage. Currently, as I open each file they all open in separate windows. The "Open Document As Tabs" option in the User Interface preferences is not selected.

View 1 Replies View Related

Illustrator Scripting :: Create Files With JavaScript?

May 5, 2012

I would like make a config file for my script that i would like to put in the %appdata%adobe folder.
 
How can i reah the value of %appdata% inside javascript?How do i create and read files? 

I am currently reading the Extendscript javascript toolsguide but i cant figure out how to create a file:
 
Should not this code create a file in C: directory?
 
Fille = new File('C: est.txt');
Fille.write("Testwriting!");
Fille.close();

View 10 Replies View Related

Illustrator Scripting :: Use Of Data Set To Translate Text In Files?

Apr 29, 2011

What would be the best strategy on the usage of data set to translate our product packaging. It's quite complex as we have several languages on the same packaging. Moreover, we have different text sources that would require to be translated in different sets of languages.
 
I have already looked into the data set and I tried to get familiar with it. How to create the data set and how to name the different variables knowing that there are different source texts for a particular region (region means a set of languages) and other texts for another region... The idea is to export this into one XML file with well identified elements that can be split with a tool, sent for translation according to their region then merged back into one single file to be imported back into illustrator
 
Region 1:
en-US
text 1
text 2
 
fr-FR
text 1
text 2
 
de-DE
etc...
 
Region 2:
en-US
text 3
text 4
 
ru-RU
text 3
text 4
 
Region 3:
etc..
 
It seems that the formatting such as bold, italic and so on is not exported into the data set which is quite embarrassing.

View 9 Replies View Related

Illustrator Scripting :: Why Won't Script Work On All Files In Folder

Jun 13, 2013

It is supposed to change hyphens to en-dashes in a ai files in a folder. However, when I run it, it only works on one file. After it makes the change and closes the first file, it stops.

var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts;
sourceFolder = Folder.selectDialog;
if ( sourceFolder != null )
{
    files = new Array();
    fileType = "*.ai";
    files = sourceFolder.getFiles( fileType );
    if ( files.length > 0 )
[code]....

View 6 Replies View Related

Illustrator Scripting :: How To Edit Script To Save The Files As SVG Instead Of PNG

Mar 13, 2013

I recently found the following jsx script, which saves a multi-layered IL file into 1-layer-per-file with PNG format.
 
This file is very useful, but i'm currently working on a project that requires the files to be saved into SVG format.
 
Is there anyway to edit this script to save the files as SVG instead of PNG?
 
// *** Export Layers as PNG files (in multiple resolutions) ***
//
// Version: 1.0 (29 Aug 2012)
// Copyright Arcticmill 2012
// www.arcticmill.com
// Developed by: Johan Otterud
//
// This script will export all layers that have a name starting with "#", or "%" into a subfolder of the current .ai document.
// These options can be configured below:
// *** Config options  ***
var subFolderName = "Export";

[Code]...

Remember that you must add a "" + exportLayersStartingWith + "" (when exporting the layer cropped to it's bound) or "" + exportLayersWithArtboardClippingStartingWith + "" (when layer should be clipped to artboard) to the beginning of the layer name. Also make sure that they layers you want to export are not locked or hidden.");

    } else {
        // Show a completed message
        alert(layersToExportCount + " layer(s) was successfully exported to:
" + exportDirectoryPath);
    }

[Code]....

View 4 Replies View Related

Illustrator Scripting :: Changing Colors Multiple Files?

Feb 6, 2014

I have about 300+ product labels that are in Illustrator, and some of them have an incorrect rich black color swatch. What I have been doing is going through and changing the color pallette to change them manually. Essentially going to the instance of black and changing them to regular black.
 
Is there any sort of script that can do this? The files are in CMYK.
 
Otherwise I have a lot of monotonous file editing to do.

View 4 Replies View Related

Illustrator Scripting :: CS5 - Batch Saving AI Files As Low Res PDFs

Nov 20, 2012

I need to find a way to convert a LOT of ai files, individually, to low res pdf's. Preferably with the presets I want, not some defaults. I'm not interested in an action. I was hoping for a droplet, script, or something similar.
 
I did find this and it looked promising... [URL] ....
 
That almost worked.  Ultimately, for some reason, it couldn't see the ai files sitting in the specified folder.
 
Running CS5 with MacOS 10.8.2

View 2 Replies View Related

Illustrator Scripting :: Split File Into Multiple Files

Nov 4, 2013

Is it possible to have a script that would split up an Illustrator file that contains a number of groups of elements into individual files... for example, here is a download link for a file that has different types of moustaches and I want each moustache as an individual file... I have hundreds of Illustrator files like this that have 4, 8, 15, 20 or more illustrations all bunched onto the one file that I need to split up. I'm using CS4 [URL].... 

View 3 Replies View Related

Illustrator Scripting :: Print All Open Windows In CS5 Then Close Files

Feb 2, 2012

To print all open windows  in Illustrator CS5 (or illustrator files in a folder) then close the files.

View 12 Replies View Related

Illustrator Scripting :: Batch Change Color Swatch Name In EPS Files

Mar 20, 2012

I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?

View 7 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 :: Changing Line Of Text In Multiple AI Files

Apr 5, 2013

I have about 500 files that I need to change one line of text in. Example. File name is XXX 001, the line of text is the file name so it would read XXX 001. XXX 002... etc. up to XXX 500. Is there a way that I could automate it opening, changing this line of text, saving and closing?

View 1 Replies View Related

Illustrator Scripting :: Read External Data / XML Or TXT And Create Files Automatically

Feb 3, 2014

Automated AI so much so that it can read instructions from an external source like xml or txt and automatically creates files and folders.
 
For example we have something like this:
File1
Hello
Font: Myriad
Size: 22
Colour: Pantone 254C
Image 1.jpg (link)
Source: Image1.png (link) clipart1.eps (link)
----------
File2
 
and so on.
 
I want AI CS5 to:
1. create an eps File1, create a folder named File1, put File1.eps in it
2. type the text Hello, apply Myriad 22pt and PMS 254 to it, centre it to the artboard
3. Place all jpegs, pngs, eps source files on the artboard and embed them.
4. Save the file as eps legacy version 10, close the file and move to the next file.

View 1 Replies View Related

Illustrator Scripting :: Allow To Select Image To Replace Any Number Of Selected Files

Apr 18, 2013

I've written a script to allow you to select an image to replace any number of selected files.  Each file starts out as an embeded image with a .note to determine where the basis of alignment for the new file should be (i.e. "top," "bottom," "left," "right").  You'll find the code below:
 
#target illustrator
 
if (app.documents.length > 0) {
    var docRef=app.activeDocument;
    var docSelection = docRef.selection;
    // ** Get new file
   
[Code]...
 
For some reason, the ".note" added at the end of the script gets erased once the script is complete.  I can even get it to confirm that it applied the note to the image, but once it's complete, it's gone. 

View 6 Replies View Related

Illustrator Scripting :: Action To Batch Export Folder Of AI Files To Create 300dpi PNG

Oct 3, 2011

I created an Action to batch export a folder of .ai files to create 300dpi .png's of the .ai file's artboard. I did this by simply recording "Export...as png" with my desired settings then Batch running the Action on desired folder of .ai files.  The files were successfully exported, the trouble is that the exported files lack a .png file extension. My intent is to take these PNG files and merge them into a single PDF using Acrobat Pro. Unfortunatly, without the .PNG extension, Acrobat Pro does not recognize the file types and does not let me use the Combine Files feature on them. Going back and manually adding a .png at the end of the exported files defeats the time-saving purpose of Batch Processing all together. Is there something I am missing or doing incorrectly? I have included screenshots of 1) My Batch Action settings 2) folders showing files without .png extension and 3) visual of what I see when I am trying to combine PNGs into a PDF.

View 4 Replies View Related

Illustrator Scripting :: Open Multiple AI Files Produce Error In Palette (8702 - No Document)

Aug 12, 2013

I try to open mulitple ai files through palette dialog but it fails on Error:8702, there is no document. But if i change to var win = new Window ("dialog", "Batch"); the open file works well. 
 
var txtSourceFolder =  win.add("edittext",undefined);
var btnOk =  win.add("button",undefined,"Run");
btnOk.onClick=function(){
try

[Code] ....

View 2 Replies View Related

Illustrator Scripting :: Adding Serial Numbers Apply To Multiple Files In Selected Folder?

Dec 19, 2011

How to make the following script for adding serial numbers apply to multiple files in a selected folder?
 
var docRef = app.activeDocument;
with (docRef) { 
var docName = name.substring(0, name.lastIndexOf('.'));
var artRight = visibleBounds[2];

[Code] .....

View 6 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 Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

AutoCAD .NET :: How To Test For Existence Of Self Intersecting 2D Polylines

Apr 8, 2011

Im trying to write a routine in VB.net based on Fenton's examples from 'Zero to 3D in 60 Minutes'. the routine uses a filter set to select all 2D polylines in a document then a test is needed for each polyline to establish whether it is a loop, which can then be extruded into a solid or it is a non loop, where the operation will need to be an extruded surface, or if the polyline is a non-loop.

So far my code will pick up every 2D polyline and try and extrude it, but i need to catch the non-looped entities to handle them with an extrude surface method or if self-intersecting polylines, to either drop them and not cause an exception or process them in another way.

What entity attributes or methods should I use to perform testing to establish this loop and non-loop existance of the polylines to achieve this. I work with both C# and VB.net.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Determine Existence Of Entity

Oct 10, 2013

I have a specific need to determine if an entity is existing or not so that I can either make changes to or create the entity. I'm trying to do this while referring to the entity by it's handle. Below is my code this far but it doesn't work.
 
(IF (AND (SETQ HNDL (VLAX-LDATA-GET "TB" (STRCAT PLN "PLAN"))) (NOT (VLAX-ERASED-P (VLAX-ENAME->VLA-OBJECT (HANDENT HNDL)))) ) (PROGN ;;| DO SOMETHING WITH THE EXISTING ENTITY ) (PROGN ;;| MAKE THE ENTITY
(vlax-ldata-put "TB" (strcat PLN "PLAN") (CDR (ASSOC 5 (entget (entlast))))) ))

I ran the program and the handle was stored, then I deleted the entity and ran the code again and this is the error I get:

; error: unable to get ObjectID: nil

This VLISP stuff sometime has unpredictable hoops to jump through first, so I wondering if this is the case here.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Checking For Existence Of Drive Using Code Not Working?

May 2, 2013

I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)

(if (vl-file-directory-p "C: en") T)(alert "exists"))

 I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
 
(if (vl-file-directory-p "C: en") nil)(alert "exists"))

View 7 Replies View Related

AutoCAD Inventor :: Spell Check In IDW Files

Apr 25, 2012

is there any way to spell check your text in an .IDW file?

Also... How can I arrange my Dimensions so that our Dimension Standards are the standard Style?

View 6 Replies View Related







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