+ Reply to Thread
Results 1 to 12 of 12

Thread: Script for Illustrator

  1. #1
    Junior Member Lex77 is on a distinguished road
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    3
    Thanked 20 Times in 15 Posts

    Script for Illustrator

    Hi! I need to write script which replace text information from different strings of txt file to different fields of Illustrator file. Can anybody help me?
    Thanks

  2. #2
    PRC Member r00tp will become famous soon enough
    Join Date
    Nov 2010
    Posts
    107
    Thanks
    8
    Thanked 46 Times in 29 Posts
    Quote Originally Posted by Lex77 View Post
    Hi! I need to write script which replace text information from different strings of txt file to different fields of Illustrator file. Can anybody help me?
    Thanks
    do you know about "Data-driven graphics" (it’s explained in the help system) in Illustrator and this would not work?

    If you realy need help scripting: what version? what os? explain the details!

  3. #3
    Junior Member Lex77 is on a distinguished road
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    3
    Thanked 20 Times in 15 Posts
    Quote Originally Posted by r00tp View Post
    do you know about "Data-driven graphics" (it’s explained in the help system) in Illustrator and this would not work?

    If you realy need help scripting: what version? what os? explain the details!
    Illustrator CS5, Mac OS X 10.6

  4. #4
    Junior Member Lex77 is on a distinguished road
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    3
    Thanked 20 Times in 15 Posts
    Quote Originally Posted by r00tp View Post
    do you know about "Data-driven graphics" (it’s explained in the help system) in Illustrator and this would not work?
    it is not same. Script must copy text information from some fields of excel file to illustrator file. Is it possible?

  5. #5
    jox
    jox is offline
    Donor jox is on a distinguished road
    Join Date
    Feb 2011
    Posts
    60
    Thanks
    350
    Thanked 10 Times in 8 Posts
    use applescript. open the excel file and illustrator file at the same time.

  6. #6
    Junior Member Lex77 is on a distinguished road
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    3
    Thanked 20 Times in 15 Posts
    Quote Originally Posted by jox View Post
    use applescript. open the excel file and illustrator file at the same time.
    Is this script existing or I have to write it? There is few information or manual for scripting, can somebody help me to write?
    Thanks (sorry for my english)

  7. #7
    Junior Member lord soth will become famous soon enough
    Join Date
    Jan 2011
    Location
    The Abyss
    Posts
    29
    Thanks
    2
    Thanked 43 Times in 6 Posts
    You can use the Variable Data feature (the Variables palette) to create DataSets. You can then "bind" objects on the page to act as "placeholders," so to speak, for the text, images, visibility settings, or graph data that is contained in the current DataSet. You can then switch between DataSets to automatically re-populate the "placeholders." You can then semi-automate the swapping out of the DataSets to, for example, run exports or saves or prints in batch mode.

    The file that contains the data can be an external file that you import as an Illustrator Variables Library.

    However, the Variables feature set is based on XML, not on ordinary tab-delimited rows/columns like you are accustomed to in Excel. So you can't import an Excel file or any other ordinary row/column delimited text file into the Variables palette to create your DataSets. Excel and other programs (FileMaker Pro, for example) can export XML from their rows/records. But unfortunately that's not all there is to it.

    XML is a tag-based markup language. An XML file doesn't necessarily follow a consistent rows/column kind of order germane to a spreadsheet or database table. The occurrences of Column/Row intersections (Elements) can be arbitrary. For example, imagine a spreadsheet with columns A, B, and C, and rows 1, 2, and 3. The arrangement in an XML file is not necessarily:

    1A, 1B, 1C
    2A, 2B, 2C
    3A, 2B, 2C

    It may be:

    1A, 1A, 3A, 2B, 2C, 1B, 1B, 1B....

    ...or any other arbitrary order and/or nesting arrangement of the Elements.

    So an XML file has to be "described" in order to be understood by the program that imports it. The XML file contains reference to a Schema or a Document Type Definition (DTD file) for that purpose. So to use Illustrator's Variables palette in that way, you have to get somewhat into the arcana of XML.

    That's about the extent of what I know about XML. Correction by anyone who actually understands and works with XML is welcome.

    I haven't taken any polls, of course, but I dare say that the vast majority of users who actually ever touch the Variables palette just tediously enter the data directly into the bound objects in the Illustrator document and capture the DataSets as they go. A small minority does that with just a few sample DataSets, then exports the DataSets as a Variables Library (an XML file), and uses that file as the "template" into which they then insert the rest of the data from their spreadsheet or whatever, using a script or some other semi-automated routine. An even smaller minority actually creates the ready-to-import XML file from scratch.

    I have found it possible to import XML exported from FileMaker Pro directly into InDesign. But I cannot do that in Illustrator. For text-only purposes, I have resorted to writing a Javascript that lets me enter (or paste) ordinary tab-delimited text into a text object in Illustrator. The script then converts that text to Variable DataSets. I imagine it would not be hugely difficult to modify that script to also accommodate references to linked images, but I have not had the occasion or need to do so.

    I personally think the Variables feature would have been of much broader value across the AI user base had it been based on straightforward tabular data, like the data merge features in many programs, instead of XML. I guess that would be anathema to the XML users whom I assume must have asked for this feature being implemented this way. Or, it may have just been driven by Adobe-internal "me, too" gotta-have-it direction.



    By JET

  8. #8
    Junior Member Lex77 is on a distinguished road
    Join Date
    Mar 2011
    Posts
    29
    Thanks
    3
    Thanked 20 Times in 15 Posts
    lord soth, thank you very much for detail information about xml!
    I agree that idea of variables is good, but realisation hasn't practic use.
    My task is: I have many excel files from other people. I Just need to copy text information from files to AI. I don't wont any export/import with xml. Can you upload your script, that move data from xls to ai?
    Thank you again!

  9. #9
    Junior Member Helga is on a distinguished road
    Join Date
    Sep 2011
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 2 Posts
    hey do you know how to make a script that will export all open files into a different format?

  10. #10
    Junior Member cuneytoral is on a distinguished road
    Join Date
    Mar 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Helga View Post
    hey do you know how to make a script that will export all open files into a different format?
    Code:
    Only the registered members can see the download links/content. please Register to gain full access.
    read this PDF [URL="http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scripting/cs6/Illustrator-Scripting-Reference-VBScript.pdf"]Illustrator-Scripting-Reference-VBScript.pdf[/URL]

  11. Your ad here

  12. #11
    Junior Member nighttsky is on a distinguished road
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    copies random

    hi how can i select an object and copies it 10 number randomly on page by scripting?
    tanks

  13. #12
    PRC Member moriarty has a spectacular aura about moriarty has a spectacular aura about moriarty's Avatar
    Join Date
    Oct 2010
    Location
    london
    Posts
    98
    Thanks
    116
    Thanked 141 Times in 37 Posts
    Quote Originally Posted by Lex77 View Post
    lord soth, thank you very much for detail information about xml!
    I agree that idea of variables is good, but realisation hasn't practic use.
    My task is: I have many excel files from other people. I Just need to copy text information from files to AI. I don't wont any export/import with xml. Can you upload your script, that move data from xls to ai?
    Thank you again!
    Anyone of you have tested the Esko plug-in called Dinamic Panels ? It can read XML files data and tranfer to the Illustrator files.
    Br,
    James Moriarty

+ Reply to Thread

Similar Threads

  1. Script to Convert text in Adobe InDesign
    By hosam_or in forum Graphic Design
    Replies: 2
    Last Post: 09-07-2011, 07:36 AM
  2. Rhimposition Script Set (for Adobe InDesign CS3/CS4/CS5)
    By RicardoNit in forum Full Software
    Replies: 0
    Last Post: 07-01-2011, 07:06 AM
  3. Adobe CS 5 Master Collection +++ SN +++ Script for MAC
    By admdiscos in forum Full Software
    Replies: 0
    Last Post: 12-07-2010, 03:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts