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.
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.
On my Mac OS X (2010), running Excel 2011 and Adobe CS6, I'm having major issues with the points in a scatter plot not rendering as vectors once moved to an Adobe program. The entire plot will transfer as a vector, except the data points themselves! Oddly, even the shapes in the legend are vectors! When I save a plot from a powerpoint presentation as a pdf, the data points look pixelated in the pdf. When I copy paste the plot into illustrator, same thing. It is totally infuriating.
How to import data from excel (from particular cell) to AutoCAD Drawing. I have already Created a template for both Excel and AutoCAD. I want to do Whenever i am changing the datas in excel sheet corresponding changes to be done in AutoCAd drawing.
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!
I struggled for a while this morning with trying to data link to a large door schedule in Excel. After several failures, I searched online for answers, and read in another forum that AutoCAD won't data link to more than 2000 cells.
My door schedule is about 2050 cells now, and will be about 4000 when done. I defined a set of about 1,000 cells in the Excel spreadsheet, and AutoCAD linked to it no problem. So, I tend to believe the poster who stated the 2000 cell limit, but I can't find this.
I would like to be able to retreive data from a sepcified cell, in a specified worksheet, from an excel file.
I don't have any clue how to connect to an excel file and read the data. Most seems to think you already had an understanding but I'm starting from the beginning.
Is it possible to embedd data in a table so that a user can select from a group of data within one cell?
I use this technique quite often in Excel. One cell in a table can have various values: A, B, C, or D. While another cell can have a different set of values to choose from: BLUE, RED, ORANGE, or PURPLE. The user can pull down an arrow (similar to a dynamic block) and choose from a set list of values.
I think I might be doing this wrong, I am trying to get contents of a specific textFrame within first group on layer called "page numbers"
It seems to work, but is a bit sketchy, the documentation indicates textFrame is all the text frames in a document, and that textFrameItem should be the specific one within collections of groups etc, maybe I am misunderstanding. this is what I am using:
var existingPageNumbers = app.activeDocument.layers.getByName('page numbers').groupItems[0].textFrames[0].contents;
I have multiple icons placed in a document, from several different sources (all are vector objects) -- see the included image. They vary in size and what I would like to do is find a less onerous method of resizing all the heights to a specific size, while scaling the width proportionately. I have found several scripts that come close to a solution (see links below), but none that allow me to input a height (or width) in inches and have all the objects resize to that height proportionately.
Change Width to the Width of the narrowest object --> Script01 Change Height to the Height of the shortest object --> Script02 Change Multiple Attributes (JohnWundes) --> Script03
icon image (couldn't place via Adobe Forum) --> click
I want to open a doc, run a script that selects all paths of a color, say 255,0,0 or 50,0,20,4 and changes that color to black or another color I specify and also changes the stroke. Is this possible? I can't see how i would do it?
I am searching for a simple automated Find and Replace script, the idea is that in Excel the Find and Replace with texts are located. The script finds the textblock in Illustrator and replaces it with the value from Excel "New number".
I have an excel file with thousands of rows, each with a column for the x-coordinate, the y-coordiante, the height, and width of a rectangle. I need a script that will ask me to select the excel file, read the excel file, and create rectangles from each of the thousands of rows. I'm working in a windows environment and have Illustrator CS4. Any scripts out there that might give me a start?
i'm trying to build an easy way to create something like the following network graphic in Illustrator:
I basically want to create a brush or some other automatic method for adding a specific shape (in this case a circle) at every point a long a path. It would be nice if I could easily move around points on a path without have to move all of the circles independently.
I tried creating a pattern brush where the circles were the corner elements but depending on the angle of the corner the shape would get distorted.
So I am trying to replace gps points with a symbol I have created. I have found blogs referencing a script that can replace selected items with symbols saved in the symbols panel, but I can't seem to find the actual script! Where I can find JET_ReplaceWithSymbol.jsx or any other script that can do the same function.
I'm laying out a report with many graphs of similar styling, the client is to provide an Excel doc with the figures and I need to redraw them as graphs.Is it possible to design the graph style in Illustrator, import the data from the spreadsheet to the graph and then place the graph(s) into InDesign. Essentially, this is what I'd like to achieve:
1) Style/design a graph in Illustrator 2) Import spreadsheet data into Illustrator graph (a step I'm also haveing problem with - is it possible to import an entire Excel doc or do you have to copy and paste each cell individually) 3) Import Illustrator graph into Indesign 4) If original data in Excel is changed/updated and the document is saved, data will update in Illstrator and therefore in InDesign.
I've got areaText rectangles that were created by various means, and the 0 index is sometimes the top left, other times the bottom right. I need to do a lot of resizing/aligning/spacing/sizing. To script the movement of the top left point of each (or any point for that matter), I'm trying to clean up the sequence of points in each objects array of pathPoints so I can move pathPoint[0].anchor for each rectangle and be sure that the top left is moving, not some other random corner.
So, testing in script alone, and I came up with the following (don't laugh at how I called out the array), which works great in extendScript:
var testArray = new Array; testArray.push({xVal: 5, yVal:0}); testArray.push({xVal: 0, yVal:-2}); testArray.push({xVal: 5, yVal:-2}); testArray.push({xVal: 0, yVal:0});
[code]....
Which throws an error "objPoints.sort is not a function"Unlike the JS only version, my AI script is trying to sort all of the points of all of of the textAreas, which I'll fix shortly so it sorts the 4 points of each object. The problem is that the script isn't sorting the points, but providing a useful error message instead.
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.
I want to be able to edit text by editing a cell in excel. I am not sure if there is any way to do it with AutoCAD LT 2004 and Microsoft Office Excel 2003.
I am wondering if there is a way to add/remove/redistribute anchor points on a compound shape so that there are evenly spaced anchors along the outline of that shape.I am aware of the "add anchor points" command. But that adds a new anchor at EVERY midpoint between two anchors. It doesn't smartly calculate where to add and where to avoid adding anchors.
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.
What im trying to do is take the i properties from an inventor .dwg, and place them into a specific excel spreadsheet. I've managed to get so far, by using code that Curtis posted, which does the opposite of what im looking to do.The code Curtis posted takes info from excel and fills in iprops.
I can fill in specific cells, for instance columns A, B & C on Row 1 and place that info into a specific spreadsheet. But my code falls down when i run the code on another .dwg, It obviously overwrites what was previously in those cells.... I am looking for the code that looks to see if those cells are in use, and if so, go to the next available cell down.
was wondering if it's possible to bring in the value of a single Excel cell into a predefined window area in AutoCAD LT 2012? Some of our tool and die calculations are done in Excel, but we only want one cell (equation summary or description) brought into to AutoCAD 2007. If not AutoCAD LT 2007, then what about a more recent version of LT or even full blown AutoCAD?