Illustrator Scripting :: Extracting Data From Excel To JavaScript Or Vbscript

Mar 16, 2012

I was wondering if there was a way to extract data from Excel to be used in Illustrator. I know there is an option of variables and xml, and I don't want that. I've seen and tried out how to read illustrator and write to excel, and I get that.  What I would like to do is pretty much the opposite:
 
1.Pre-fill in an Excel file(.xls,.csv, doesn't matter) with data such as a filename in column 1 and (Replacement Text) in column 2 and close manually.

2. Run script(VBSCRIPT,Javascript, doesn't matter)

3.For each column in Excel file where cell in first column is not empty, open Illustrator Template with placeholder of "DWG" textframe and replace the frame titled "DWG" with Replacement text from Excel in Column2.

4, Save each to a PDF file and name file with text from Excel Column1(Filename)
 
In a nutshell, there will be a single illustrator template with a premade textFrame with a name of "DWG". Excel will contain two columns, one for the filename to be named and one for the relative text to replace with the placeholder in AI.

View 17 Replies


ADVERTISEMENT

Illustrator Scripting :: How To Add Arrow Heads To A Path With Script (JavaScript Or VBScript)

Apr 22, 2013

I'm using Illustrator CS 6 / ExtendScript Toolkit CS 6.
 
Is there any way to add arrowheads to a path with script (JavaScript or VBScript)? I don't want to make triangle or V-shaped path but add one of the built-in start and end arrowheads, scale them and set arrowhead alignment, all with script. There is no information about this topic in the Illustrator scripting references.

View 1 Replies View Related

Illustrator Scripting :: Importing Data With JavaScript

Feb 3, 2014

I would like to open a file dialog box seltect a CSV text file saved from Excel and import this into an array/variable/dataset in adobe illustrator using javascript. Have done some work with javascript but not a power user. Can't work out how to get the open dialog to appear.

Long term aim would be to use the data to plot a path which seems straighwforward enough, its the getting the info in bit I'm stuck on.

You do have to be able to select the file to import, this bit quite important.

View 2 Replies View Related

Illustrator Scripting :: Can Populate A Pie Chart From Excel Data

Apr 4, 2013

I was wondering if there was a way to import excel datat into illustrator, then it populates a vector pie or bar chart for me?

[URL]

View 1 Replies View Related

Illustrator Scripting :: Sending Excel Cell Data To Specific Points In VBA

Oct 27, 2013

I want to send the contents of A1 to an Illustrator document at 135, 172 and B1 to 135,190, same with A2/B2 will be at different coordinates as will A3/B3 and so on... I want to do this 6 times and save the document as a PDF. Then, it should clear and do it again. The columns will ALWAYS be A and B.

View 5 Replies View Related

Illustrator Scripting :: How To Read Real Number Data From Selected Columns In Excel Spreadsheet

Oct 27, 2013

Problem:

How to read real number data from selected columns in an Excel spreadsheet into an illustrator javascript array variable, so that then I can use this information to construct an illustrator polygon. 
 
Further information:

I am new to javascript (and not much of a programmer in the best case, but do have some basic knowledge using ancient languages like FORTRAN 88). I am sure I am just missing an important step here despite all morning browsing with Google for answers (something to do with variable definition I assume?). I have some survey data defining the outline of features in map view listed in a string of point (x,y) values in adjacent columns in excel (these x,y point values calculated from GPS data using a commercial program to converted 3D position to a 2D x,y by geoid projection, and then in excel to re-scale point locations to illustrator’s artboard).  What I am trying to do is select columns of x,y value pairs in an excel spreadsheet, copy these values to the clipboard, and then develop an IA JavaScript to draw a polygon through the specified set of x,y points. It seems easy enough to script illustrator to draw the polygon once I get the values from the clipboard are in a javascript array (lots a good tips here [URL] ....), but pulling in the clipboard data seems to be beyond me. I have tried populating a defined array with various combinations of array declarations and app.paste(); or windows.clipboardData.getData('text/plain'); with no satisfaction. I then had the idea to try to pull in the clipboard to one long continuous string, place that in a text box (see see its structure), andthen read and split up the text in a loop to populate the JavaScript array…but that deposited a complex illustrator table object into my text box, and several attempts to force the clipboard to paste text did not work (again probably having problems understanding variable type declaration).
 
I would be happy to find any method of scripting the pull of the selected on an excel spreadsheet for use in an Illustrator script…so if I am making this all harder than it needs, be I would be grateful to know that also!

View 4 Replies View Related

Illustrator Scripting :: Printing Artboard Only With VBScript

Apr 17, 2012

My script creates an artboard in my pdf file. i need to print this artboard only.
 
if i go to file/print manually there is an option 'Bereich' (pls see screenshot, my illustrator is in german language), so only the 2nd page is printed. (exactly what i want)

up to now i could not find this option (or something similiar) within vbscript.
 
code:
...
appRef.ActiveDocument.Artboards.Add(Array(Rminx,Rmaxy,Rmaxx,Rminy)) ' vars are correctly set before
Set jobOptionsRef = CreateObject("Illustrator.PrintJobOptions")
Set printOpts = CreateObject("Illustrator.printOptions")
printOpts.JobOptions = jobOptionsRef
jobOptionsRef.Designation = 2 'aiAllLayers
jobOptionsRef.PrintArea=2
appRef.ActiveDocument.PrintOut printOpts
....
 
these lines prints 2 pages: 1) main document  2) artboard
 
if i set
jobOptionsRef.Designation = 1
only the main document is printed - but not the artboard. i need exactly the other way round, only the artboard but no main image.

View 2 Replies View Related

Illustrator Scripting :: How To Save DXF As AI File Using VBScript

Oct 9, 2013

I have a VBA script that opens a .DXF file in Illustrator, and want to save it as an AI file. How do I do this?

View 14 Replies View Related

Illustrator Scripting :: VBscript To Edit All Drawings In A Folder?

Mar 19, 2013

I have some +900 legacy pdf's that need to have a title and date change. The pdf's where generated in ArcMAP 10 so the text appears as individual letters. So I wrote a script that creates a knockout and adds the required text. I can get this to work for an individual file but I can't figure out is how to have the script perform it for all the pdf's in a folder.
 
Set appRef = CreateObject("Illustrator.Application")
Set docRef = appRef.Open("C:WorkCity_Wide_Zoning�_Spring_2013TestA001.pdf")
' *************************
'Knockout

[Code]....

View 4 Replies View Related

Illustrator Scripting :: Rotate Whole Document Page In Vbscript

Apr 19, 2012

in an open PDF File  i press 'Ctrl+A' to select all Items in the document, then i choose Edit/Transform/rotate ... 90 degree.now i'd like to do the same with an vbscript.
 
the best thing i could find is:

rotate(90)
Sub rotate (degree)
Dim appRef, argument, element
Dim changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout
Set appRef = CreateObject("Illustrator.Application")

[code]....
 
not all, but all elements i am interested in are rotated - it would be better if really all elements would be rotated the elements are rotated around 'aiTransformDocumentOrigin' ... i would prefer if they are rotated around 'middle of document'.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extracting Data From Excel File?

Jun 12, 2013

We have a custom LISP program (Written, upadated in 2003) that takes a keyed in item number, opens and searches a .txt file with four coulmns, for the keyed in item number (column 1) and returns a part number (column 2), description (column 3) and any information in column 4.

Here is the Part of the cod in question:

(setq recx (open "H:/ACAD2012/alcocustm/LISP/hardware.txt" "r"))
(setq d "?")
(setq rec (read-line recx))

[Code]....

A quetsion was asked if the data in the .txt file could be put in an Excel file. I tried looking at other post, but I can't seem to find a clear cut way to open and extract the data. Or this old dog overlooked a boand. Is there a easy way to do this, similar to the above?

View 8 Replies View Related

Illustrator Scripting :: Select All Text / Layers Including Locked Or Not Visible Using VBScript?

Feb 1, 2013

I'm looking for the most elegant syntax to loop through a document and select all the text frames.

View 1 Replies View Related

Illustrator Scripting :: Call Actions Through JavaScript

May 2, 2012

Currently i'm doing automations for Adobe Illustrator CS4. I have created some actions due to the limitations of scripting in Illustrator. I need to call this actions through javascript.But in applescript i can able to call the actions by using the do script method.

View 5 Replies View Related

Illustrator Scripting :: Convert JavaScript To AppleScript?

Apr 3, 2012

I need to convert javascript to Apple script.
 
try {
app.activeDocument.layers.getByName( '.ARD' ).remove(); } catch (e) {};

View 1 Replies View Related

Illustrator Scripting :: How To Tell With JavaScript That The Text Was Set To Overprint

Feb 24, 2012

If I were to select some text, then checkmark 'Overprint Fill' in the 'Attributes' pane, is there a way to tell with JavaScript that the text was set to overprint?
 
I've been experimenting with this code in ExtendScript, but it keeps returning false:
 
var doc = app.activeDocument;
$.write(doc.textFrames[0].textPath.fillOverprint + '
');

View 3 Replies View Related

Illustrator Scripting :: Set Stroke Alignment From JavaScript

Jan 21, 2013

I'm trying to set the stroke style for a path item I've drawn through JavaScript, however I can't find a way to set the stroke alignment for my path item.

I've checked the Illustrator JavaScript reference but I can't seem to find that option in there.I would expect something like:
 
pathItem.strokeAlignment = StrokeAlignment.OUTSIDE; // This doesn't work, what is the correct way to set the stroke alignment from JavaScript?
 
If I change the option in the Actions Panel it comes up as 'Set Stroke/Alignment: Outside', so there must be an equivalent way of setting it from JavaScript. Is there a way of converting Actions to JavaScript so you can see which properties and attributes are being set on the object? What is the correct way to set the strok alignment from JavaScript?

View 5 Replies View Related

Illustrator Scripting :: How To Add Spotcolor To Colorgroup In JavaScript

Feb 11, 2012

How to add a spotcolor to a colorgroup in javascript?

View 1 Replies View Related

Illustrator Scripting :: Execute Action From JavaScript In CS6

Jul 10, 2013

I've seen on this forum a lot people saying that in CS6 you can now call an action from JavaScript. However, I haven't been able to find what the syntax is to do that in the reference or the guide. Can you actually do this now with Javascript?

View 2 Replies View Related

Illustrator Scripting :: Link To Webpage From AI JavaScript?

Dec 5, 2012

I've written a script with a ScriptUI interface, which other people will be using. I'd like to include a 'help' button in the interface, which ideally would connect to a web page with more details. (The alternative is to create the 'help' window in javascript, but the web page already exists and it would be a shame not to use it.)
 
From what I've read, other Creative Suite programs may be able to connect to the web with javascript, but apparently not Illustrator.

View 22 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 :: Create A Panel With JavaScript?

Jan 26, 2013

As I´m studying JavaScript and the user interface creation...would like to ask (more for curiosity):
 
Is it possible to create a new panel for Illustrator using JavaScript? Or this is only possible using C++?
 
(in the Window Class UI we have the "palette" creation method..so wondering the result of it too)

View 10 Replies View Related

Illustrator Scripting :: Duplicating A Circle With JavaScript

Jan 9, 2013

I'm trying to build something like a bullseye using javascript. I'm new to scripting for Illustrator but I've used javascript before so I thought it would be simple, but maybe I'm missing some basic notions here.
 
I'm using Illustrator CS6. I created a blank document and drew a circle with a 1pt black stroke and no fill. Selecting that circle, I my script to copy and paste it in front and increase its radius by one centimeter. I attempted a simple duplication first:
 
if ( app.documents.length > 0 ) {
var numberOfItems = 3;
var selectedItem = app.activeDocument.selection;
for (i=0; i < numberOfItems; i++) {
newItem = selectedItem.duplicate();
}
}

With my circle selected I get an error message saying "Error 24: selectedItem.duplicate() is not a function".

View 7 Replies View Related

Illustrator Scripting :: Select Objects Outside Artboard Using JavaScript

Aug 10, 2013

I want to select the objects outside artboard using javascript. Their are many objects outside activeartboard i want to select all those object using script.

View 1 Replies View Related

Illustrator Scripting :: Color Change Command In JavaScript

Feb 4, 2013

I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?

Here is the script:
 
var docRef = app.activeDocument;
with (docRef) {
var findColor = swatches.getByName('TSB Dark Blue').color;
var replaceColor = swatches.getByName('TSBDB').color;
[code]....

View 2 Replies View Related

Illustrator Scripting :: Possible To Apply Transform Effect From JavaScript?

Apr 18, 2013

I was wondering if it's possible to do what Effect > Distort & Transform > Transform does from JS. I had a look at the documentation and found nothing in that direction.
 
The closest thing I found was PageItem.applyEffect(effectXML) looking at the Object Model Viewer in Extend Script Toolkit, but couldn't find documentation for it and I suspect it might have something to do with SVG filters perhaps ?
 
In conclusion: Is it possible to apply a Transform effect from JS (and if so, how )?How can applyEffect be used ? 

View 4 Replies View Related

Illustrator Scripting :: Creating Outlines From Text Using JavaScript In CS5?

Feb 18, 2012

Is there a way to select all of the text on all artboards and CREATE OUTLINES using Javascript? The text that Adobe provides for scripting has this option for saving to FXGs which is preserveTextPolicy or something similar, but I need the same type of solution for saving as an AI file or as a command before the save. I'm currently working in windows, but am writing this script for use on a MAC. If there isn't an internal way of doing this through Javascript?  I would imagine it would be possible through Applescript since it can access the application's GUI, but I'm not sure. A javascript solution would be preferable, but any solution would work at this point.

View 7 Replies View Related

Illustrator Scripting :: Splitting Up Stacked Text With JavaScript

Mar 14, 2013

I am trying to get any stacked text in my illustrator file that is a single frames  such as with carriage returns such as:
 
1
2
3
4
5
 
to be individual text frames.
 
Is there a split command I can use?
 
Im thinking it would start by finding all the textframes that have carriage returns is the carriage return identified as " "

View 5 Replies View Related

Illustrator Scripting :: Variable Width Tool (JavaScript)

Feb 6, 2013

I am looking for any info on scripting the Variable width tool (Javascript).
 
Background: By adding a gradient to a variable width strock you can create nice 3D looking  Shapes (see example)

this is a straight vertical line with varied widths, then hit with a gradient.
 
Goal: My hope is to write a script that will take a "Profile" or "Shape" and convert it to a Variable width line. (see Example)

The Black line is to have its widths modified
The Red line is how wide the line needs to be.

View 10 Replies View Related

Illustrator Scripting :: Determining KEY Object In A Selection Via JavaScript

Feb 20, 2013

Is there a way to determine which object in a selection is the key object? For example: draw 10 squares on a layer, select all of them, click on one of the 10 and it becomes the Key Object (heavy border) for things like Distribute Spacing on the Align pallete. I can determine that a particular object is selected via ActiveDocument.Selection.PathItem[n].Selected = true/false. But I can't figure out how to find out if this is the KeyObject. The ultimate goal is to modify the below script so that it uses the KeyObject as the reference and not the object on the bottom-most layer.
 
Here is the Script - from [URL]
 
mySelection = activeDocument.selection;
if (mySelection.length>0){
if (mySelection instanceof Array) {

[Code]....

View 3 Replies View Related

Illustrator Scripting :: Attaching Action To A Button In JavaScript

Sep 9, 2013

I'm playing around with attaching an action to a button in javascript but I'm just not getting it
 
I've tried putting it into a function like so
 
function deleteSwatches () {
= app.doScript("Delete Unused Swatches", "Custom Art Actions");
}
 
Then calling the action with said function but it doesn't respond.

View 2 Replies View Related

Illustrator Scripting :: How To Get Saved Selection List In JavaScript

Aug 21, 2012

Recently I met a little problem about save selection. I want to get saved selection list so that I can used in javascript. Some useful information about how to get Saved Selection list in javascript!

View 2 Replies View Related







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