Edit Illustrator symbol with AppleScript

Hello,
Does anyone know if it is possible to edit an existing symbol in an Illustrator CS3 document with AppleScript? Specifically, what I'm trying to do is this: I'd like to manually create an Illustrator document that uses the "3D Extrude and Bevel" effect to map symbols to the surfaces of the 3D object. Then, I'd like to programatically open that Illustrator document, edit the existing symbols (so the surfaces of the 3D object are updated), and finally export an image.
From what I've found in the AppleScript documentation PDF, I'm thinking this is not possible since it lists all the properties of a symbol object as read-only. But perhaps I'm overlooking something?
If it is not possible, is there another way of doing what I'm trying to achieve?
Thanks!
Ben

Ben, could you not have just swapped your symbols? like:
set symbol of every symbol item to symbol "Foo"
Justin, if it is essential that you need to crack open a symbol item then it may be possible using system events to expand the item may even be possible with a action for this part?
This works for me. It is set to work with what items i know are available to my test doc.
{1 symbol of >2 path items, 2 gradients swatches}
tell application "Adobe Illustrator"
activate
set Doc_Ref to the current document
tell Doc_Ref
set x to width / 2
set y to height / 2
set ruler origin to {x, y}
-- Make new layer to trash later
make new layer at beginning with properties ¬
{name:"Opened Symbol", visible:true}
-- Place the symbol item you want to open
make new symbol item at beginning of layer "Opened Symbol" with properties ¬
{symbol:symbol 1, position:{0, 0}}
-- Select the item
set selection to symbol item 1
-- Use system events to drive the GUI
tell application "System Events"
tell process "Adobe Illustrator"
tell menu bar 1
click menu item "Expand..." of menu "Object"
delay 0.1
keystroke return
delay 0.1
click menu item "Ungroup" of menu "Object"
end tell
end tell
end tell
-- List your items to edit
set Symbol_Items to every page item of layer "Opened Symbol"
-- Edit what ever you have here
set fill color of path item 1 of layer "Opened Symbol" to {gradient:gradient 1}
set fill color of path item 2 of layer "Opened Symbol" to {gradient:gradient 2}
-- New group
set New_Group to make new group item at beginning of layer "Opened Symbol"
-- Move edited items into new group
repeat with i from (count of Symbol_Items) to 1 by -1
move (item i of Symbol_Items) to beginning of New_Group
end repeat
-- New symbol from group
make new symbol at end with properties ¬
{name:"My New Symbol", source art:New_Group}
-- Replace instances
set symbol of every symbol item to symbol "My New Symbol"
-- Clean up
delete every page item of layer "Opened Symbol"
delete layer named "Opened Symbol"
delete symbol 1
end tell
end tell

Similar Messages

  • Packaging Illustrator files with AppleScript

    Is there not an AppleScript command for Illustrator to package a file?  I use this extensively in InDesign and was trying to make a workflow for Illustrator files.

    The Package command is only usable in the Creative Cloud versions of AI. Don't know if it has been added to the Apple Script commands.

  • Import swatches, styles, symbols, character styles with applescript

    I've done plenty of Illustrator scripting with applescript, but can't seem to find a way of automating import of swatches, styles, symbols, and/or character styles from existing file. Any help would be much appreciated.
    Thanks.

    Oh sorry forgot to tell you what I usually do with this. To get around it, I usually create an empty document with all the library of a document category on it and save that document to a server. If anyone want to create a document of that type I would just tell them to grab that file from the server to their local computer. It won't work if you are editing existing document UNLESS, you don't want the library saved only to the old document. In that case you can just copy every thing on the old document with script and paste it on the pre-made document that have all the library on it.
    Sounds pretty low tech, but it gets it done.
    ZW

  • Is there a way to edit IPTC data of an image with AppleScript?

    Hi,
    I'm looking for a way to batch-edit the IPTC data from images. Is that somehow possible with Applescript? If so, could someone point me to a direction?
    (I fond a script working wit Graphic Converter in another thread, but that didn't work.)
    Thanks,
    p.

    Frank, maybe you could give me a hand here. I'm building the basic script cycling through the dropped files. But I don't know how to best implement the terminal command.
    In each cycle, I would set the file path as a variable and then compose the terminal command in order to execute it with "do script".
    But  "set x to path of eachFile" doesn't work: <<class ppth>> of alias "(path shows here)" could not be read. Any ideas how to do that better?
    on open theFiles
      repeat with eachFile in theFiles
                        set x to path of eachFile
                        tell application "Terminal"
                         activate
                        do script "hello" (Exiftool command will be here)
                        close window 1
                        end tell
              end repeat
    end open

  • Import and use custom Illustrator Symbol Library in Photoshop?

    I would like to import and use my own (project-specific) Illustrator Symbol Libraries in Photoshop
    Background info
    - I create BIG amounts of assets (for UI design) in Adobe Illustrator which I save as Symbols.
    - I store these symbols in a custom symbol library so I can re-use them in a different file
    - Reason A: to be able to re-use these symbols within the Illustrator file to visualize different "interaction flows" to my clients
    - Reason B: I use vector assets because they allow me to accomodate for different screen resolutions in the future
    Wish
    A:  I would like to be able to open the same symbol library I created in Illustrator in Photoshop and drag the symbols onto my Photoshop canvas
    B:  If I change a symbol in Illustrator it should be updated in my Photoshop file
    Question
    - Does anyone know of a way to do this? A work-around, a plugin or a Script would be fine too...
    regards, Koen

    B:  If I change a symbol in Illustrator it should be updated in my Photoshop file
    Check out this Panel:
    http://www.ps-scripts.com/bb/viewtopic.php?f=27&t=3045&sid=70f368dca9bfd96f3c974ee11b798f9 7
    But that is for placed Smart Objects, and would affect changed Symbols in ai-files naturally only if there were instances of them in the document.
    Basically I find what you are asking pretty unrealistic* and would be surprised if an easy solution would be forthcoming.
    Scripting might offer possible work-arounds that use BridgeTalk to get Illustrator content over to Photoshop, but that would probably be slow and not meet what you are expecting.
    The possibly easiest approach might be to have a Script create a new Layer and place one Symbol on it for each one of the Symbols in Illustrator, then save a psd with Layers.
    Why do you need the Symbols in Photoshop anyway, if I may ask?
    Edit: *) unrealistic in terms of the functionality currently being realizable with a reasonable expenditure of resources; but I’m admittedly a layman with regard to that.

  • Exporting Illustrator Symbols to a New Art Board

    Anyone know of any scripts that will:
    Take Adobe Illustrator Symbols in your current document's symbol library and...
    Place them on an art board in either the same document or a new one?
    The symbols should retain their original sizes, with an option to resize if needed
    The symbols should be placed with adequate spacing on the new art board
    The symbols should be put in their own layers when placed on the new art board
    Would be great if the symbol names could be placed beneath each symbol for reference
    I've seen something very, very close here, which already does 1, 3, and 4: http://forums.adobe.com/message/3613498. If you can modify it to do some of the following above, that would be splendid.
    But the script requires the user to place in a value for sizing the symbols before exporting them to the artboard. I like this as an option, but would be better if it would allow you to retain orginal sizes.
    Basically, this is something that could help to create a starter UI Kit from symbols.
    Thanks - Jux

    Jux, did you find a solution to your question, I'm trying to achieve the same result
    I have a graphic moch-up of an app design I have working on in illustrator. All the graphic elements I have created have been captured as symbols. I would like to export all those symbols out to PNG format if posable, without resizing.
    Just like you I also found the script http://forums.adobe.com/message/3613498  but i find this option is not completely suitable as the script is asking me to nominate a size.
    After extracting all the symbols to layers, then i would use another script  Export Illustrator Layers and/or Artboards as PNGs and PDFs | Matthew Ericson - ericson.net output layer or art board to PNG.
    Im also looking around for a script that would export all symbols to layers retaining the names of the symbols to layers or art board.
    Thanks, Pete

  • How to Edit Flash Symbol in Photoshop?

    In Flash CS4, I have a graphic of a long filmstrip with 24 pix in it. I need to edit the symbol in photoshop (to put all new pix in), and then replace the current filmstrip with the new filmstrip. How? This is CS4, not CS5.

    Add an image to a folder with your fla, image folder(with image inside) and then re import image to stage again then try 'EDIT' the file!
    Date: Sat, 24 Sep 2011 13:31:35 -0600
    From: [email protected]
    To: [email protected]
    Subject: How to Edit Flash Symbol in Photoshop?
        Re: How to Edit Flash Symbol in Photoshop?
        created by sneedbreedley in Flash Pro - General - View the full discussion
    Whe nI double click on the image, a Bitmap Properties window opens with no option to edit. When I right-clcik on the image and select Edit With and choose photoshop, an error message appears saying The file G:\web-02\Site\film120902.gif does not exist, uable to launch external editor.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3936238#3936238
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3936238#3936238. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Example file, illustrator file with variables linked to xml

    CS5 – Where can i find an example of an illustrator files with variables, linked to an xml file. We want to export it immediately to .pdf format when the file is linked. Is this possible? The illustrator help files are not so clear about this matter.

    Follow the Help documentation's steps to create at least one of each of the four supported types of variable bound objects.
    Capture the DataSet.
    Edit the bound objects' content.
    Capture the DataSet.
    Save Variable Library. That's your XML file.
    JET

  • Editing a Symbol's Text

    Im trying to edit the text of a symbol so that it applies to all instances where the symbol appears. However, when i TRY to edit the symbol, the new text appears ON TOP of the old text instead of replacing it like I want! Very frustrated because im sure its something simple. Any help would be appreciated.
    See? It just types over the old stuff but I want to replace the first word. It doesn't even automatically select the appropriate font.

    I think I know what you did you clicked on the symbol on the artboard with the text tool and then started typing which only added text on top of the symbol.
    Take the selection tool (black arrow) and double click on any instance of the symbol to enter isolation mode you wil see a prompt telling you you are about to edit a symbol and it will effect ll instances of that symbol.
    Do not, I repeat do not break the link to the symbol.
    Once you are in isolation mode you wuill be able to edit the text of the symbol once you edit the text and you are satified then use the selection tool to click anywhere away from the text or other parts of the symbol to exit isolation mode.
    Al instances of the symbol will be updated.
    You can also use the symbol panel at the bottom of the panel there is an icon that when hoovered over wil tell you that it is the edit symbo tool click on the symbol you want to select it then click onthe edit symbol icon to also enter isolatiobn mode for that symbol.
    Then you do the same as above.
    But make certain you do not break the link to the symbol this is the wrong advice. Keep the symbol linked.

  • Can I use Adobe Illustrator symbol to create a logo identity?

    Is it allowed to use an Adobe Illustrator default symbol (which is normally supplied with the program in the symbols library) to create a logo for a non-for-profit organisation? Is there a contact in Adobe for such enquiries to be officially addressed?
    Many thanks,

    Thanks, Mylenium. Actually it is for a non-for-profit ogranisation and I am not charging anything for it, it is totally on a probono basis. Also the symbol has been modified from its original form in terms of colour.
    Date: Wed, 15 Jul 2009 12:02:57 -0600
    From: [email protected]
    To:
    Subject: Illustrator Can I use Adobe Illustrator symbol to create a logo identity?
    Read the Adobe EULA, section 2.7. Basically it says (in human language) that you can use any of the files that come with Adobe programs in your own work as long as you don't sell them 1:1, i.e. it's okay to use a symbol as part of a logo, but not use a unmodified symbol alone and sell it to clients.
    Mylenium
    >

  • Apply Fill Color to Group Item with Applescript

    Is it possible to set the fill color of a group item using applescript and CS3? The group contains paths and text that have the same fill color with no strokes.I am able to select the group and delete it or move it (with applescript) but have had no success in setting the fill color.
    Thank you in advance for help on this question. And thanks for everything I have picked up from browsing.

    Now that I am addressing the path items and text items of the group separately I am having some success. Now I am having difficulty getting the correct terms for assigning a Spot Color to the file. Here is a piece of the script.
    This works:
    tell application "Adobe Illustrator"
    set openDoc to document 1
    set ftClr1 to (first group item whose note is "Front3") of openDoc
    set ftClr1Paths to path items of ftClr1
    repeat with thisPath in ftClr1Paths
    set fill color of thisPath to {red:255}
    end repeat
    set textFrames to text frames of ftClr1
    repeat with thistext in textFrames
    set fill color of every line of thistext to {red:255}
    end repeat
    end tell
    Need help to set the fill color to a Spot Color that already exists in Swatches.
    Thanks
    Nick

  • I just got a new macbook pro, i had cs6 on my old macbook, i downloaded cs6 on my new computer today. When I open my illustrator files with vector images they appear blurry on the new computer. I have had this issue in the past and I don't

    i just got a new macbook pro, i had cs6 on my old macbook, i downloaded cs6 on my new computer today. When I open my illustrator files with vector images they appear blurry on the new computer. I have had this issue in the past and I don't

    cnsst,
    Are we talking Edit>Preferences>General>Anti-Aliased Artwork?

  • Search and replace formulas with AppleScript

    Thanks to this forum I've found out that it is possible to search and replace text by other text or formulas with AppleScript in Numbers 3.2
    Does anybody have a script to search and replace a formula or a part of a formula by another formula or a partial formula.
    For example:
    I would like to be able to find:
    = Table1::$b$3
    and replace this by:
    = Table1::$b$4

    De Signature,
    Would this approach work for you...
    This is a very neat way edit a complex formula in a single cell....
    a) Copy and Paste the formula to a new black page in Pages,
    b) Do your Find and Replace, then
    c) Copy and Paste the formulae back into the cell in Numbers.
    It works like a charm.
    Here is an example of how I used this approach...
    Original cell formulae:
    =AVERAGE(
    SMALL(OFFSET(K3,1,0,20,1),1),SMALL(OFFSET(K3,1,0,20,1),2),
    SMALL(OFFSET(K3,1,0,20,1),3),SMALL(OFFSET(K3,1,0,20,1),4),
    SMALL(OFFSET(K3,1,0,20,1),5),SMALL(OFFSET(K3,1,0,20,1),6),
    SMALL(OFFSET(K3,1,0,20,1),7),SMALL(OFFSET(K3,1,0,20,1),8))
    Final version of formulae:
    =AVERAGE(
    SMALL(OFFSET(K3,N1,0,20,1),1),SMALL(OFFSET(K3,N1,0,20,1),2),
    SMALL(OFFSET(K3,N1,0,20,1),3),SMALL(OFFSET(K3,N1,0,20,1),4),
    SMALL(OFFSET(K3,N1,0,20,1),5),SMALL(OFFSET(K3,N1,0,20,1),6),
    SMALL(OFFSET(K3,N1,0,20,1),7),SMALL(OFFSET(K3,N1,0,20,1),8))
    Find Replace: be cautious with the Find, to ensure it is unique, in my this example ",1,", to avoid changing the" ,1)"
    Enjoy...

  • Overwriting a symbol with transforms

    Hi all,
    My team is working with symbols in a somewhat unique(?) way. We usually can't edit a symbol the normal way because going to isolation mode will 'shift' the symbol out of alignment with the rest of the artwork (especially if the symbol has many transforms on it -scaling, rotation). so this becomes useless for us. basically the symbol goes into it's original orientation while in 'edit' mode.
    what we need to do is break the symbol, edit it, and then recreate it (or overwrite it). the steps involved are:
    1) break symbol, leaving it's artwork on stage in current transformation.
    2) edit artwork
    3) transform artwork into symbol's original untransformed state. (if you don't do this, when you overwrite the symbol it will have your stage transformations applied. which isn't what we want.)
    4) overwrite symbol with new 'edited' version of artwork.
    i've covered 1,2 and 3, no problem, and 4 is programmatically not difficult, and works much of the time. The difficulty comes when the artwork in the symbol contains a Live Paint group, or Compound path(maybe other art types). when the symbol instance containing a LP group, or compound path, is used in the process above - the last step tends to 'shift' the new instance from it's original position, especially when the starting symbol has been scaled large. If the symbol just contains paths - never a problem.
    so i'm trying to account for something that i'm missing.. i can add code if anyone thinks they can help. it's fairly simple in concept though:
    this covers the removing the stage artworks transform, before saving
    sAISymbol->GetSymbolPatternByName(name1, &symbol); // original symbol name
    // soft is original symbol's soft transformation on stage
    sAIRealMath->AIRealMatrixInvert(&soft);
    sAIRealMath->AIRealMatrixGetScale(&soft,&sX, &sY);
    sAIRealMath->AIRealMatrixGetRotate(&soft, &R);
    sAIRealMath->AIRealMatrixSetTranslate( &artMatrix, -soft.tx, -soft.ty );
    sAIRealMath->AIRealMatrixConcatRotate( &artMatrix, R ); sAIRealMath->AIRealMatrixConcatScale( &artMatrix, sX, sY );
    // move the object back to original position
    sAIRealMath->AIRealMatrixConcatTranslate( &artMatrix, soft.tx, soft.ty );
    long transformFlags = kTransformObjects | kScaleLines | kTransformChildren | kTransformNotifyPluginGroups;
    result = sAITransformArt->TransformArt( art, &artMatrix, 1, transformFlags );
    sAISymbol->SetSymbolPatternArt(symbol, art);
    // this step will update the symbol to the new version, but if that symbol has LP groups/compoundpaths, and originally had a scale transform, it will shift slightly. a symbol containing just paths, will not shift ever!
    anyways, if anyone has any thoughts on what i might be missing.. i hope my description was clear enough! happy to elaborate if anyone has brain cycles to contribute.
    thanks!
    steve

    Actually, this sounds similar to a problem we recently discovered: if one of our users put certain symbols into isolation mode, then left isolation mode, the symbol would suddenly shift. Sounds like it might be related, or even the same problem!
    We never could figure out how to detect & correct the problem though. It feels like there should be a way to divide out the extra transforms sitting on a symbol from the base 'locate me here' transforms, but there isn't that I could find.

  • Whited Out Quicktime Symbol with a ?

    Does anyone know what a white, faded out Quicktime symbol with a ? symbol over it means, and how to fix this? Every time I try and play a video with Quicktime, it now all of a sudden brings this up.
    Thanks for the help...

    (Didn't know how to edit a topic I already posted) Just an fyi...I tried uninstalling and reinstalling Quicktime to fix this problem, but it has not worked.

Maybe you are looking for

  • Apple TV 3 video streaming stops --ALOT

    Hi, I have two apple TV 3s in two different locations.  They worked fine up until about 3 weeks ago.  Both or using ethernet connections, and both are on internet plans of 10mps + download and on unlimited plans.   Any video I stream from the US itun

  • Connecting CME 4.0 to Voice Gateway

    I have a 2600XM running CME 4.0 and a 1760 with 2 FX0 and 1 FXS card. Both routers are running IOS 10.4(9)T. I would like the 1760 to act as a gateway using H.323. Can anyone advise me on how to set this up?

  • File notification via email & font probs

    Think i'm in the right place, On a server I've recently been placed to "correct" issues on, I have 2 problems. Main prob is when accessing the server from an xterm box (not directly), typing into a terminal or console, the spacing between letters is

  • REP-271468673 Saving report to pdf

    Report upgraded from Reports 6i to Developer 10g fails only when output to a pdf file with error REP-271468673. Report returns to screen without issue. Report output is 6k+ pages and 3.5k images. Can anyone offer assistance?

  • Firefox crashes when I open an *.wav file - does not send to VLC

    upgrade to FF 4.0.1 in Ubuntu killed automatic link to VLC media player, esp for *.wav files which I use for telephone voice mail. I tried re-installing VLC and FF, then after changing settings via about:config it now crashes... quickly.. leaves no c