Illustrator Scripting :: Automate Action Set - Selecting Raster Images
Mar 8, 2013
I would like to automate an action set that selects a raster image (linked file) that has been grouped with vector art and then converts that selected raster image into a vector (live trace)
Â
I'm using cs5 on a mac. As far as format goes I have hundreds of eps files that all have at least one raster bitmap tif which was imported as a linked file and then grouped with vector art. So I will like to run a batch script command that will select only that bitmap raster image (because I want to maintain the present vector art in the file) and convert that bitmap tif to vector- and save the file which will hopfully be in vector format.
View 2 Replies
ADVERTISEMENT
Mar 8, 2013
I would like to automate an action set that selects a raster image (linked file) that has been grouped with vector art and then converts that selected raster image into a vector (live trace)
View 11 Replies
View Related
Dec 18, 2012
I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work. Here is my Script, mostly copied from the example script provided with Illustrator (CS5). And, this works manually, using the file names in the script, via Load Variable Library
Â
   Set appRef = CreateObject(strIllistratorVersion)
  Â
      'Open the file and import the datasets
       Set docRef = appRef.Open(strTemplate & "200-500.ai")
       'docRef.Datasets.RemoveAll
       docRef.Variables("Yearbook").Delete
Â
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
      Â
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai | XML file:" & strXMLFolder & "" & objFile.Name & "^')"
       If (appRef.Documents.Count > 0) Then
           Set docRef = appRef.Documents(1)
 [Code]....
Â
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
Â
It's simply not loading. What do I need to do to get it to load?
View 8 Replies
View Related
Aug 16, 2011
How to Raster a object in illustrator with scripting?
View 7 Replies
View Related
Mar 22, 2012
I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?
View 1 Replies
View Related
Aug 8, 2012
I am trying to turn every layer in my .ai file to a raster image without flattening to one layer.
Â
-The big issue I am dealing with is the agency that just built a paralax site for us refuses to export to PSD. I have tried every possible way to do this but keep getting the file is to big message. To add to it they had it all on 1 layer. I was able to release to sequence, but now am trying to see if rasterizing the objects will work.
View 1 Replies
View Related
Jul 10, 2012
I have created this script for selecting open paths in illustrator cs6 as the graffix plugin is not working under CS6.
Â
Just save the following text in /Applications/Adobe Illustrator CS6/Presets/en_US/Scripts/Select Open Paths.js
Â
if (documents.length > 0 && activeDocument.pathItems.length > 0){
var allPaths = activeDocument.pathItems;
var allPathsCount = allPaths.length;
var openPathsAreLocked = false;Â Â
[Code] ........
View 4 Replies
View Related
Feb 17, 2012
How to select objects by their group names?
Â
I'm working with imported graphics, and the objects appear in the AI layer hierarchy grouped and named according to their object types in the native program (see the attached image). The problem lies with the annotation objects: they are made of different parts for which different graphic styles are needed; however, they all come in one layer and are difficult to access for global operations. I need to do different things with the different object types (delete the POINT's, move the LINE's and LWPOLYLINE's to different layers, etc...). The option of selecting objects individually is ok for small data sets, but you can imagine this becomes untenable in a hurry.
Â
Two possible solutions I've considered:
(1) change the output parameters in the source program such that the objects come into illustrator with different graphics allowing them to be accessed through the "Select same ..." tools; it would work, but is problematic for the source program
(2) print the annotation graphics with their desired graphic appearance to pdf rather than importing the source file directly in AI, then open in AI to render the remaining graphics; again, this works but introduces inefficiency in the process. Also, the print process tends to explode closed paths requiring more inefficient path tinkering in AI.
Â
I would like to tell AI to select all objects named "POINT" or "LINE" etc... but have found nothing in the documentation or forums on whether this is possible.
View 1 Replies
View Related
Sep 13, 2012
I frequently record Illustrator Actions. My actions are quite long, but they all involve three common steps:
Â
-Assigning Notes to shapes  Â
-Assigning Swatches to shapes  Â
-Selecting shapes that have a specific notesÂ
I often need to re-record my actions to repeat all the steps, but to change the notes/swatches that are selected/assigned during the action.
Â
Illustrator has a re-record command. This command is great for changing the value of the note in number 3 of my list. However, it does not work for items 1 & 2 in my list. For these items I have to delete the old step in the action and then record a new step with the new swatch/note.
Â
I know macros in Microsoft Office have an editor which allow you to change values in actions. Is there anything similar for Illustrator actions?You can save an Illustrator action and open it in Text Edit. However, all the attribute/swatch values are saved as weird strings, so I don't know how to change them.
View 4 Replies
View Related
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
Jul 17, 2013
I need to create an action. A simple one. The idea: One path is selected, a user runs the action, it makes a copy of that path, moves the copy, select both the path and its copy and makes a blend.
Â
I tried to record that action, but Illustrator does not record the paths selection/selecting.
Â
Even a simplier task: How, in general, having one path selected, select an item/path above or below it? And how to select them both?
Â
I can make a script for that, but the requirement is to keep it as simple as possible: have an Action only without any scripts, if possible.
View 2 Replies
View Related
Aug 23, 2012
I'm extremely new to scripting; I managed to create a script to extend the artboard of my documents (which I was extremely proud of given my inexperience!) and another to align a couple of objects alongside each other, but my attempts to script some new code has met with failure.
Â
Firstly, I need some Illustrator CS4 Javascript code that will create a bounding rectangle for the selected object(s). The selected object(s) will always be rectangular; no irregularly-shaped objects. I know this should be simple, but I can't work out the variables/attributes involved.
Â
Secondly, some code to select the leftmost object in a document. And the equivalent for the rightmost object.
Â
If it makes any difference, I'll be stitching these scripts together with an action to achieve the following workflow.
Two EPS files are dragged into an empty document as 'Linked Files'.The two Linked Files are aligned alongside each other. (Using a script I've already written.)The leftmost Linked File is selected and has a bounding rectangle created, which is then used to mask the Linked Object.The rightmost Linked File is then selected and has a bounding rectangle created, which is then used to mask the Linked Object.Both masked Linked Files are selected, and a bounding rectangle is created to mask them into the same Clipping Mask group.The artboard is set to the dimensions of this combined masked pair (I've managed to write that script already).The Linked Files are embedded into the document.Â
The reason for this is because we have EPS map files exported from AutoCAD that are left- and right-hand pages. These need to be combined into one file, but when they are brought in they lose their masks as the BBOX element is not recognised by Illustrator. The double-masking in my process above is needed to ensure that content from either map doesn't overlap the other half of the map.
View 9 Replies
View Related
Jul 23, 2013
How can I select all objects in a layer and copy and paste the objects into a new document? We are having issues with the copy and paste method. Is this because it uses the operating systems clipboard?
View 10 Replies
View Related
Mar 3, 2013
I want to select all text frames on all visible layers. The script below will select all text frames even in groups but when a layer with text on it is invisible the script will error.(target layer cannot be modified)
Â
if (app.documents.length > 0 ) {
var doc = app.activeDocument;
var numTextFrames = 0;
for (Â i = 0; i < doc.textFrames.length; i++ ) {
textArtRange = doc.textFrames[i];
textArtRange.selected = true;
}
}
Â
So I made this script to select text frames on only the visible layers but it now misses text that is in a group.
Â
var layerCount = activeDocument.layers.length;
var docSelected = activeDocument.selection;
for (i = 0; i < layerCount; i++)
[Code] .....
Why it does not selected textframes in a group when done this way and is there a way to get all textframes selected on all visible layers?
View 3 Replies
View Related
Jun 8, 2012
I created an action to change the width of an image. I execute the action using DoScript javascript method.
Â
The first action Obj1 will select the whole image and second action Obj2 will open the transform panel and change the width of the image.
Â
app.Open("D:LWW_Castoff45991_09_03.eps")Â Â Â Â Â Â Â
app.DoScript("Obj1", "LWW")Â Â Â Â Â Â Â
While (app.ActionIsRunning)Â Â Â Â Â Â Â Â Â Â Â
Thread.Sleep(500)Â Â Â Â Â Â Â
[Code]...
In the above code, the second action 'Obj2' is not getting executed. Both the actions are getting executed individually. Let me know the problem and how to execute both the actions.
View 5 Replies
View Related
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
Dec 20, 2012
rename a layer of illustrator like document file name? (with an action)
View 12 Replies
View Related
Oct 9, 2012
I need to do a form of automation, but wanting to execute this from another process (self-made application). Adobe Photoshop has this mechanism called "Droplets" that are executable based upon Actions defined in Photoshop (as far as I can understand). Is it possible to let AI do some work for you from an external application as with Photoshop (assuming you are able to execute the executable once it has been created)?
View 4 Replies
View Related
Jul 26, 2012
Today, out of the blue, Illustrator stopped displaying any raster images. The file opens, but I just get a blank artboard. The title bar at the top of the page shows the preview but it doesn't display on the page. It doesn't seem to matter if I import the file or if I just open the file straight into Illustrator. I've tried PSD, JPEG, TIFF, and PNG without success. This morning I was redrawing old logos for a client, and this afternoon I can't open anything that is rasterized.
View 2 Replies
View Related
Jun 3, 2012
Is it possible to trigger actions from the actions panel using javascript? I see that you can do this with AppleScript but I've written everyting so far in javascript and don't know AppleScript, though could learn it if I need to.
Â
I'm writing a script that creates a lot of complex graphic files and have all the prototypes done except for wanting to change the color of a few of the points in a mesh object. Apparently this can't be done in javascript, so I was hoping to mid point in the script, trigger an action from the panel to edit the mesh, then let the script carry on its way.
Â
Is this possible?
View 5 Replies
View Related
May 17, 2013
I have a piece of art on "Layer 1" that i need to shrink and duplicate to "Layer 2". The two layers are always named the same. I'm working in CS5.
View 6 Replies
View Related
Jan 18, 2014
I have the requirement to calculate total ink converage of embeded raster object in EPS. Is there any way to get min and max value to ink used in raster image.
View 1 Replies
View Related
Apr 16, 2013
I tried following action script code to save PDF file with color profile attached:
Â
                  var saveOps: PDFSaveOptions = new PDFSaveOptions();
                  saveOps.colorConversionID = ColorConversion.COLORCONVERSIONTODEST;
          saveOps.colorDestinationID = ColorDestination.COLORDESTINATIONWORKINGCMYK;
          saveOps.colorProfileID = ColorProfile.INCLUDEDESTPROFILE;
                                      Â
          doc.saveAs(pdfFile, saveOps);
Â
But got following errors: error an Illustrator error occurred: 1346458189 ('PARM'). What is the correct way to save PDF file with color profile?
View 1 Replies
View Related
Oct 3, 2011
I created an Action to batch export a folder of .ai files to create 300dpi .png's of the .ai file's artboard. I did this by simply recording "Export...as png" with my desired settings then Batch running the Action on desired folder of .ai files. The files were successfully exported, the trouble is that the exported files lack a .png file extension. My intent is to take these PNG files and merge them into a single PDF using Acrobat Pro. Unfortunatly, without the .PNG extension, Acrobat Pro does not recognize the file types and does not let me use the Combine Files feature on them. Going back and manually adding a .png at the end of the exported files defeats the time-saving purpose of Batch Processing all together. Is there something I am missing or doing incorrectly? I have included screenshots of 1) My Batch Action settings 2) folders showing files without .png extension and 3) visual of what I see when I am trying to combine PNGs into a PDF.
View 4 Replies
View Related
Dec 6, 2012
Images that are opened or psds that are imported are resized into an artboard that is smaller then the image. With raster image formats, the following behavior occurs:
Â
For a jpg that is 1000x800px an artboard is opened at 1000x800px and an additional artboard at 360x288px with the actual raster image is created.
View 1 Replies
View Related
Jul 30, 2013
I'm seeing a strange issue when I automate an action in Photoshop CC (14.0). I have a simple action that does three things in this order:
1. Flatten Image
2. Convert to 8-Bit
3. Add some standard file info
Â
When I run the action from the action menu it works fine. However when I have multiple images open and I want to run them all through the action using "Automate->Batch", it gets run in this order:
2. Convert to 8-Bit
3. Add some standard file info
1. Flatten Image
Â
The same process in CS6 does not have the issue.
View 7 Replies
View Related
Jul 20, 2009
I have recorded a set of actions that I am automating for a few images. At the end I recorded the export and close steps (I records Save For Web - PNG 24 settings). The issue is that the script overrides each image once it's saved. How can I run the image editing part of the script, and then insure that each file is being exported seperatly with a different name? Should I have not recorded the export part of the script?
View 3 Replies
View Related
Oct 10, 2012
I do not want to use the the Pen Tool to make selections of Vectors! I want to know if it possible to use the Pen Tool to select say the eyes or the arm or the chair or the apple, etc! Then convert that vector pen tool selection into a Raster selection?
Photoshop and Gimp do this! I would love this feature in PaintShop Pro X5, but since that out maybe the next version X6!
View 2 Replies
View Related
Feb 25, 2012
'm trying to make an action to automate the saving of one photoshop file to multiple different jpegs. Basically what I am doing is producing team pictures from a psd template. I will do player #1 then save as #1jpeg, #2 save as #2jpeg, etc up to 20 players. I tried to make an action but it won't allow me to insert a file name. It would be straight forward if I could get a stop in there. how I could automate this
View 5 Replies
View Related
Mar 1, 2012
I need to add images in multiple artboards (each image in different artboards)
Â
Initially i added an artboard and placed the image
Â
Dim illus_doc As Illustrator.Document
View 4 Replies
View Related
Jan 3, 2013
ESTK for AI CS6 is already known to create problems (e.g. URL....).It’s possible that, in dialogs created with ScriptUI, AI CS6 also fails to display images with transparency properly. On my (Mac) system at least, such images appear with an aliased edge.
Â
If this is true it’s doubly unfortunate, since with CS6 Adobe chose to make AI’s background interface colour adjustable—which makes interface images with transparency something of a requirement.
Â
One workaround, which sadly negates the whole business of variable interface background colour, is to create dialog images with a background colour instead of transparency, and then force the dialog to display with the same background colour. For this technique we’re indebted again to Peter Kahrel’s invaluable ScriptUI for Dummies (URL...). Page 69 of that publication shows how to do this—for example:
Â
win.graphics.backgroundColor = win.graphics.newBrush(win.graphics.BrushType.SOLID_COLOR,[0.5,0.5,0.7 5]);
Â
The process is, to say the least, quirky: and, as Peter mentions, poorly documented by Adobe. But I hope it may be useful to others trying to use ScriptUI. The more I see of AI CS6 the more I like CS4! I develop scripts for CS6 using ESTK for CS4?
View 3 Replies
View Related