Illustrator Scripting :: Selecting Objects By Group Names?

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


ADVERTISEMENT

Illustrator Scripting :: Group Objects On Artboard

May 27, 2013

When i call the method selectObjectsOnActiveArtboard on an artboard, is there a way to easily group all items in the selection? Like in the menu found under "right click > group"

View 4 Replies View Related

Illustrator Scripting :: Creating Bounding Rectangle And Selecting Particular Objects?

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

Illustrator Scripting :: Selecting Objects In Layer To Copy And Paste Into New Doc?

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

CorelDRAW Graphics Suite X5 :: Selecting Multiple Objects In A Group

Aug 24, 2011

I find it extremely annoying to have to Ungroup named groups and then regroup and rename them in order to do a multiple selection of group members. I find I'm constantly ungrouping and regrouping in order to select/edit.

Note that the multiple items are often not the same type of object (e.g., text, line, shape, etc.).

View 3 Replies View Related

Illustrator Scripting :: Find And Replace Month Names?

Sep 4, 2013

I have a few eps files in which month-year format is written like May-12, June-13 etc. I want to change May to Mai, June to Juin etc.
 
Virender 
var myDoc = app.activeDocument;
for (i = 0; i < myDoc.textFrames.length; i++ )
{

[Code]....

View 4 Replies View Related

Illustrator Scripting :: Find And Replace Layer Names

Mar 19, 2013

Are there any scripts to find and replace layer names?
 
There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers. The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
 
Ideally, it would be great if there was something that could do multiple find and replaces in one go:

(E.g.
You have layers like this Car, Dog, Bat
You enter: car(Option1), dog(Option2), Bat(Option3)
Your layers then become: Option1, Option2, Option3).
)

View 12 Replies View Related

Illustrator Scripting :: Localize Names Of Script Folders?

May 25, 2013

i'm trying to get a list of all the scriptfolder names.
 
This will solve path issues with other language versions of illustrator.
 
My script for now:
 
scriptfolder = {
en: "Scripts",
nl: "Scripts",
de: "Skripten"
}; 
var imageiconprinter = File(app.path+'/Presets.localized/' + app.locale + '/'+localize(scriptfolder)+'/idatabase/Images/Infopanel_heinerich/hei nerichinfopanelprinter.png');
  
I've defined a country like de: which is german and put the correct foldername behind it.
 
I would love to have a list of all countrys.
 
if you don't have a list just fill in the foldername and countryname of your country.

View 1 Replies View Related

Illustrator Scripting :: Rename Artboards With Layer Names

Mar 7, 2014

I'm looking to create a script to batch rename a number of artboards.
 
- I have 100 named layers.

- I have 100 artboards.

- I would like to rename the artboards to match the layer names.

- The layers are organized in the same descending orderas the artboards (ignoring the actual artboard names*).

- The topmost artboard (1 in the list) would be renamed "newspaper", the second artboard would be renamed "typewriter", the third artboard would be renamed "books", etc.
 
*in the example below the artboard named "Artboard 7" is actually the 6th artboard in list.

View 5 Replies View Related

Illustrator Scripting :: Put Artboard Names In Text Boxes?

Dec 2, 2013

I have an Illustrator document with ~100 artboards, each artboard named by me. Each artboard has one textbox in it. Is there a way to take whatever name I assign to the artboard and print it into the text box inside that artboard? So in the end I would be able to see the name associated with each artboard on the artboard itself. Ideally I could run the script once (i.e. "turn it on"), have it populate all the text boxes with the artboard names, and then have it dynamically update the textboxes when I change an artboard name regardless of whether the file has been closed and opened since I originally ran the script.

View 26 Replies View Related

Illustrator Scripting :: Get Names Of Placed Images Into Text File For Database?

Jan 7, 2011

I know nothing about scripting in Illustrator, but am willing and interested to give it a try if this sounds doable.  All we want are the names--just a simple list of the names, such as

7009 LL.eps
Rsb shadow design.psd
3_Pt_STA_475_P3.tif
 
of placed images (in our Illustrator CS5 art) into text that we can either import (from a tab- or comma-delimited text file) or paste into our Filemaker database.
 
Right now everyone is RETYPING the names of all placed images into the database, with consequent mistakes, missed images, etc.  Then when we search our database to find which art uses a certain image...results are not to be trusted.
 
(If we could cut/paste from either the Links palette or Document Info, that'd be fine... but nope.  Not in Illustrator, although we were thrilled to see InDesign CS5 has "Copy Info For Selected Links", which is VERY useful.)  In Illustrator, we can export Document Info to a text file, but artists seem to find that long document too unwieldy, and they revert to typing the names, especially if they only have a couple of placed images... and then we're back to error-laden data no matter how careful they try to be.
 
Is such a script even possible?  If so, where/how might I start?  We're on iMacs with the Adobe CS5 suite (and Filemaker 11, if that matters).

View 13 Replies View Related

Illustrator Scripting :: Replace Layer Names In Selected Layers Only?

Jan 22, 2014

I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
 
I would like to make it so it targets selected layers only.
 
I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.

View 7 Replies View Related

Illustrator :: How To Change Color By Selecting All Text Characters Or All Group Elements

Feb 19, 2014

I'm having a problem with Adobe Illustrator CC 17.1.0 with colors, types and groups.
 
If I select a text or a group and try to change its color, the Fill color stays correct a the panel, but the text or the group maintains the old color, like the screenshot below.
 
The only way to change color its is selecting all text characters or all group's elements.

View 6 Replies View Related

Illustrator Scripting :: How To Move / Translate / Reposition The Group

Jul 10, 2013

I have a document with a single layer and a single group (GroupItem) in that layer.

Unfortunately, I didn't create the .ai file, so I don't know exactly what is in the group; however, there appears to be a bunch of complex clipping masks and gradient effects, etc. deeply nested within it.

I've successfully scripted a few tasks like resizing the group with no ill effect... in other words, this works as expected:
 
app.activeDocument.activeLayer.pathItems[0].resize(50,50);
 
However, as soon as I try to move/translate/reposition the group, all the effects/masks seem to go wonky, I've tried all of the below with no success (200 is just arbitrary as a test):
 
app.activeDocument.activeLayer.pathItems[0].left = 200;
app.activeDocument.activeLayer.pathItems[0].translate(200,0);
 
I have no problem moving the group around on the document with my mouse... all the effects/masks are still nice and clean, so I'm confused as to why I can't do the same thing via JavaScript.

View 3 Replies View Related

Illustrator Scripting :: Group Items Are Returning As Layers

Apr 5, 2012

I have a layer that contains two clipping groups (groups with a clip mask and other art).  When I call layer.groupItems it returns an empty array.  When I call layer.layers it returns the two clipping groups.  I need to know if these layers are clipping groups, but if they are coming back as layers how can I figure that out?

View 8 Replies View Related

Illustrator Scripting :: How To Ungroup Or Unmask Imported Group (VBS)

Sep 3, 2012

In vbs, I import a illustrator file with this way

Set importedGroup = appRef.ActiveDocument.GroupItems.CreateFromFile(dest)

after i duplicate them

Set dupItem = importedGroup.Duplicate(newGroup, aiPlaceAfter)

but i don't know how to "ungroup" or "unmask" the importedGroup?
 
I have looking to use clipped but it seems to not working.

View 6 Replies View Related

Illustrator Scripting :: How To Make JavaScript Recognize a Group

May 1, 2012

All the graphics in my document is selected. I want to deselect groups and leave standalone items selected. How can i make JavaScript recognize  a group?

View 2 Replies View Related

Illustrator Scripting :: Center Group On Artboard Using JavaScript?

Aug 14, 2013

I have a group that I want centered on the artboard. 

View 9 Replies View Related

Illustrator Scripting :: (JavaScript) Want To Group In Existing Pathitem?

May 8, 2013

<ai cs5><javascript>

I creat 5 pathitem in the K_layer, i want to group them.

code:
        var myDoc =  app.activeDocument;       
        var K_layer = myDoc.layers.add();
        var k01 = K_layer.pathItems.add();  k01.name='01';[code].....

View 3 Replies View Related

Illustrator Scripting :: Selecting Open Paths In CS6

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

Illustrator Scripting :: How To Get Contents Of A Specific TextFrame Within First Group On Layer

Sep 11, 2012

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;
 
is this correct approach...?

View 1 Replies View Related

Illustrator Scripting :: Ungroup All Groups Then Create A Single Group?

Jul 30, 2013

I'm having trouble getting a script together where I can ungroup all groups in a document, then put everything under a single group. Everyhting I'm working with has a single layer, but for some of the arts I'm importing have groups within groups ect. To run certain actions I've made properly after I need eveything to be in one, single group.
 
I searched for an answer and found this (wirtten by Carlos Canto)
 
function ungroup(whereToUngroup, group) // where to ungroup? layer, document, other group?
{
for (i=group.pageItems.length-1; i>=0; i--)
group.pageItems[i].move(whereToUngroup, ElementPlacement.PLACEATBEGINNING);
}
 
But I'm having trouble getting it to work.

View 5 Replies View Related

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 View Related

Illustrator Scripting :: Selecting Text Frames On All Visible Layers

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

Illustrator :: Resize Group Of Objects?

Dec 27, 2013

I'm looking for a way to select multiple objects (all identical) and resize them all at once without also changing their positions.
 
Said another way, I'd like to resize a group of identical objects but instead of there being a single center/anchor point in the middle of the bounding box, I'd like each object within the group to retain it's center/anchor point (so multiple anchor points) and resize based on those positions.

View 3 Replies View Related

Illustrator :: Outlining A Group Of Objects?

Apr 30, 2013

I would like to outline a grouped object with a single stroke line and not have each object outlined individually.  It is a complex image with some clipping masks and effects applied.

View 8 Replies View Related

Illustrator :: How To Transform Group Objects

Sep 2, 2013

I've came across a thought, how to transform a grouped object. like in Photoshop when we use the distort transformation, we can manipulate the corner points for a particular occasion. Here in the example I have 3 rectangles one smaller than another, and I I have grouped them. Now I'm trying to figure out a way how to adjust the shape into the grey one. I have used the free distort tool, but does no justice. because there is no preview so I cannot see how it adjusts. I'm only after the equivalent of the distortion like in Photoshop.

View 4 Replies View Related

Illustrator :: Curving A Group Of Objects?

Jul 16, 2012

In my image, the top rectangle has been curved to its finished shape (bottom). I did this before, with actually several objects together. They all curve with the rectangle.
 
I tried to do this again, using all kinds of Transform tools (shear) and Effect tools, and everything I could find, but nothing worked. I thought maybe Shear might work if I could pin down the middle of the rectangle and shear both sides of the rectangle upward, but this doesn't work. I think I'll start taking notes when I find something that works !
 
How do I do this simple curving of single object or group of objects?

View 8 Replies View Related

Illustrator :: Align And Distribute All Objects Within A Group?

Oct 23, 2012

Say I have a group that consists solely of five triangles. Is it possible to use simultaneously align or distribute functions on while selecting just those five triangles? It seems like I can align up to four triangles at a time within the group, but when I select all five Illustrator interprets that I'm trying to align the entire group with another object outside of that group. Key objects don't seem to be supported in this situation.

View 2 Replies View Related

Illustrator :: Transparent Gradient On A Group Of Objects?

Oct 30, 2012

I've created a heart using many strokes (like a child would do with crayons). So it's made up of many lines grouped together. I've expaned the stroked lines, so they are now a group of objects in a heart shape. I need to fade them from 100% red to 100% transparent. I don't know how to do this with a group of items.

View 1 Replies View Related

Illustrator :: CS5 Freezes Selecting Objects

Mar 14, 2011

I am running Illustrator CS5 on a brand new quad-core MacBook Pro. When I'm working in an Illustrator file, every time I click on a different object the program freezes for a good 5 seconds (which adds up really quickly and is really annoying.) I first noticed this in a large illustrator file with a lot of different elements, but I was testing it out and it still happens when I have a new document with only two circles in it. One of the circles is selected and I click on the other circle and the program freezes.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved