Re: illustrator Chart data
Re: illustrator Chart data
- Subject: Re: illustrator Chart data
- From: David Popham <email@hidden>
- Date: Thu, 22 Jan 2015 03:06:10 +0000 (UTC)
1. In Illustrator, select the graph and choose Make Graph Dynamic from the Variables panel menu.
2. Export manually using "Save Variable Library" from the Variables panel menu.
3. Use the resulting XML file as the basis for creating a file with the data for each graph. You can look at the file and figure out how to string together text from your data. I did a couple manually to test that I was using the correct XML syntax. You can use "Load Variable Library" to import the XML test file, then click on the downward triangle to the right of the dataset name field to choose datasets and check whether they are displaying correctly.
4. Once you've created your final XML file with your data, use something along the lines of the script below to import the data into the template:
set XMLfilePath to "Macintosh HD:Users:davidpopham:Documents:ifpri_downloads:graph_xml_files:GNR_2014_CP_U5_mortality.xml"
tell application "Adobe Illustrator"
activate
set targetDoc to document 1
import variables targetDoc from file XMLfilePath
end tell
Then you can loop through each dataset and output files as needed.
On Wednesday, January 21, 2015 4:01 PM, "Stockly, Ed" <email@hidden> wrote:
Thanks, David, I've actually gotten pretty far along in this process.
Still not sure how to import the new xml data into the variable/graph. Do I read the xml then set the variable, or does the variable read from an XML file?
ES
As Shane mentioned, you can bind the graph to a variable. Once done, you can use sample data to create a sample graph, then capture that data set and export the data
as an XML file.
Using the sample XML file, it's not too difficult to have a script create a new XML file with all data, then have your script import that into the sample template
file. If you need to create single files for each graph, your script can loop through each data set and output a separate file from your master file (it's also possible to output files using Actions, but for some reason it doesn't include file extension in
the file name). We just used a similar hybrid process to create 193 country profiles that contained 14 graphs each.
On Saturday, January 17, 2015 10:22 AM, "Stockly, Ed" <email@hidden> wrote:
That sounds more like it.
The graph itself was designed by our designers for publication, and I basically need to simply provide data.
So are you saying if I bind the graph to a variable, I can change the variable from applescript and then update?
If that works, that would be exactly what I’m looking for.
When I look at the application in SDs explorer I can see the 50 or so lines that are used to represent the data, if I can’t get binding to a variable to work, I may explore that as an option.
On Jan 16, 2015, at 7:28pm, Shane Stanley <
email@hidden> wrote:
> You can bind the graph to a variable in the UI, and then use "import variables" to update them.
>
> But IMO it's better to create the graphs yourself as standard vector images. It gives you a lot more control, and it's usually just a matter of drawing rectangles or lines. If you need pies, there's still a script of mine floating around that draws them in
AI.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives:
http://lists.apple.com/archives/applescript-users
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden