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


ADVERTISEMENT

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

Illustrator :: Cannot See A Bounding Box Round Objects

Aug 30, 2013

I am signed up for Adobe CC and learning a lot about the apps.   Using Illustrator, I found I cannot see a bounding box round objects.   I DO see the anchors etc, but no bounding box..I looked in PREFERENCES > SELECTIONS but no luck.

View 2 Replies View Related

Illustrator :: How To Set Origin Of Objects To Be Top Left Of Bounding Box

Dec 10, 2012

It appears that the origin of objects is the center of the bounding box of the object. Is it possible to set the origin of objects to be the top left of the bounding box? It is possible to specify coordinates for paths this way.

View 1 Replies View Related

Illustrator :: Anchor Points On But Bounding Box Disappeared - Cannot Scale Objects

Jan 19, 2014

How do I fix this? I've gone through view settings so far, without success.

View 1 Replies View Related

Illustrator Scripting :: How To Shear Rectangle

Jul 3, 2013

How can i shear rectangle? There is similar question. [URL] .... But i can't understand answer in there.
 
JavaScript Reference has 'getRotationMatrix', 'getScaleMatrix', 'getTranslationMatrix'.
  
But there is NOT 'getShearMatrix'!! How i can shear rectangle?

View 2 Replies View Related

Illustrator Scripting :: Create A Rectangle Around Object?

Oct 3, 2012

Can this be done in illustrator scripting??
 
[URL]
 
creating a rectangle around selected object or objects and set margins...

View 8 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 :: 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 Scripting :: Symbol Is Within Rectangle Vector Area / Parent Child Relationship In HTML

May 30, 2012

I think the execution would be relatively easy. how to tell detect if a symbol is within a rectangle vector area. so almost like a parent child relationship in HTML goes? was thinking about getting top bottom left and right of a layer called parent then checking all layers below it (maybe they have "child" naming scene, so i can match by layer name) if the top bottom left and right are >=/<= the one above it. so it is basically detecting if a box is inside another box.

URL...need to detect is symbol1 is within div1 or 2 and same with symbol2

View 4 Replies View Related

Photoshop :: CC - Could Not Transform Because Initial Bounding Rectangle Is Empty

Sep 17, 2013

I am running the latest version of PS CC on a MacBook Pro OS 10.8.5 with 16GB of ram. When I started my computer this morning an update from Adobe came up so I ran it.  Now the move tool and the free transform function are not working.  Literally nothing happens when I click drag with the move tool and when I try to use free transform I get an error message I've never seen:
 
"Could not transform because the initial bounding rectangle is empty.."

I was working on this computer last night using PS on the exact same files and did not run into this problem.  Perhaps it was something in the update I ran this morning? The description for the update claimed it added a new version of Camera Raw and added new camera profiles. I don't see how, but its possible that the update effected the way the tools  work, or in my case not work.

View 9 Replies View Related

Photoshop :: Error :: Could Not Transform Because The Initial Bounding Rectangle Is Empty

Mar 18, 2008

I've got CS3 and working on a document. I'm typing in text but nothing is coming up on my document. The cursor is not flashing but the text I've written is shown as a layer.

I tried selecting Free Transform and I'm getting the message:

"Could not transform because the initial bounding rectangle is empty"

View 4 Replies View Related

Illustrator :: Tool Creating Skewed Rectangle?

Jan 1, 2014

Why is my rectangle tool creating skewed rectangles in Adobe Illustrator CC?

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

Illustrator :: Selecting Objects Outside Mask Boundary

Sep 6, 2013

On Ai CS3, while working with clipping masks I've been used to select masked objects with the direct selection tool, even the ones that fall outside the mask boundary.I can't do so with the CC version of Ai. Instead I have first to select it with the lasso tool. One can do so as well with the layers or else by selecting edit contents in the control box.So it's actually possible, but since I edit masked objects quite often those extra-steps are just annoying.
 
Would be in the preferences or else some option to fix it? Or do I have to make do with some bias..

View 2 Replies View Related

Illustrator :: Why Is Rectangle Tool Leaving A Trail Of Rectangles And Not Creating Just One

Jan 6, 2014

Why is my rectangle tool leaving a trail of rectangles and not creating just one?  Did I bump a setting by accident. How do I get the rectangle tool back to normal?

View 5 Replies View Related

Illustrator :: Selecting And Manipulating Locked Child Objects

Jun 21, 2012

In CS5, when you have locked objects within a group or layer, you can still select the whole group/layer at once.  And with the group/layer selected, any transform/cut/etc will affect everything in the group/layer, including the locked objects.
 
But in CS6, it seems that you cannot select entire group/layer with locked objects -- the "selection circle" in the Layers panel will not show the double circle.  And if you manipulate the group/layer now, only the unlocked objects within it will be affected; the locked objects will stay the same.
 
How can I revert back to CS5's behaviour?

View 3 Replies View Related

Illustrator :: Selecting Objects Inside Selection Window Only?

Aug 28, 2012

is there a way, that objects only inside the selection window or lassoed region get selected rather than objects getting selected which are partially inside the selection window?

View 5 Replies View Related

Illustrator Scripting :: How To Get Counting Of RGB Objects

Jul 18, 2013

how to get the counting of RGB objects, CMYK Objects and Grayscale Objects information for illustrator vector(editable) file via script for windows.

In illustrator raster image file i need to know how to get the Embedded image information(CMYK or RGB or Grayscale) via script for windows. I collect these infomation manually from "Windows->Document info". I saved the "Document Info" details in illustrator manually using "Document Info Pannel".

View 2 Replies View Related

Illustrator :: CS5 - How To Stop Selection Tool From Selecting Effects Around Objects

Jun 20, 2012

If I have a number of shapes on top of each other, with, for example, a drop shadow on the top shape, whenever I try and select the shape below it (it is peeking out from beneath the top shape, so I click on this 'peeking' section of the shape to try and select it) I cannot - it just selects the top shape as the top shape's drop shadow is 'blocking' the shape below it. Make sense?
 
How do I go about about remedying this? I seem to recall being able to tell Illustrator to ignore 'effects' when making selections in CS4, but cannot work out how to do this in CS5. And is there a way to refine the 'sensitivity' or selection radius when clicking to make selections?

View 7 Replies View Related

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 :: Measuring Distance Between Objects?

May 19, 2013

I'll start off by saying I'm new to scripting. I've tinkered with a script I found for measuring the length and width of a selected object and placing those values in a specs portion of the file. It works great, I'm very excited about how much better my life could be if I conquered scripting, and now I'm struggiling to get another one working but I'm a little stuck.
 
What I need to do now is measure and print the distance from the right edge of a selected object to the left edge of another object named "repeat" in a designated "specs" area of the page. The idea is to show the distance between a print impression and when it will print again (repeat), because it is printed using a print cylinder that rotates to print over and over on a continuous film.
 
I'm a little fuzzy on how I call the value of the left side x value of an object, but basically what I want is to use that value and then subtract from it the width of the selected object. The difference is the distance between impressions.

View 4 Replies View Related

Illustrator Scripting :: CS 5.5 - Deselect Objects Script

Nov 8, 2012

Is there any way to script the deselection of for example 9 out of 10 selected lines, sorted from left to right?
 
So if I have 100 lines selected, the result will be only 10 selected lines evenly spread out.
 
I'm using CS 5.5.

View 16 Replies View Related

Illustrator Scripting :: Creating Shortcuts For Scripts?

Mar 9, 2012

The best way I have found is loading script file in scripts folder so it is in menu creating an action, insert menu item in action then assigning the action to an F key. however, everytime I restart illustrator I have to reset this. Any persistent way to do this?

View 3 Replies View Related

Illustrator Scripting :: Select Objects Outside Artboard Using JavaScript

Aug 10, 2013

I want to select the objects outside artboard using javascript. Their are many objects outside activeartboard i want to select all those object using script.

View 1 Replies View Related

Illustrator Scripting :: Detecting Objects Inside Shape?

Jun 18, 2012

so I came up with this script, and it worked fine until I tried it on a different file. I have moved the artboard around all over the "main" canvas (if that is what it is called) and on the one that it works on, seems to only work when artboard(top, left) is positive values. however on the new file it doesn't seem to matter where it is on the artboard, it wont work anywhere. it should find the textpath relative to the shapes position.
 
I thought it was the coordinateSystem, but that doesn't seem to fix it. How the canvas works (maybe the math.abs();
 
threw it up on gist because it was pretty big: [URL]

View 3 Replies View Related

Illustrator Scripting :: Select Only Objects Within Selection Marquee

Sep 17, 2012

I am trying to find out if there is a way to select only the objects within a selection marquee? In AutoCAD you can make a selection window from left to right and only those objects entirely within the window are selected. If you window from right to left all objects that are "crossed" or touched by the window are selected. Is there a similar technique in Illustrator?
 
Currently I have to select the objects, then go back and hold the shift key to deselect the object I don't want, or put objects on different layers then lock layers to prevent extra objects getting selected.
 
In AutoCAD, my primary program, you simply draw a selection window, left or right, depending on what your next step would be. No special tools or toggles or thinking ahead, it's just the primary selection process and very intuitive.

View 4 Replies View Related

Illustrator Scripting :: Iterate And Remove Objects In A Layer

Apr 9, 2013

I am trying to iterate through objects in a layer and if the object satisfy a condition, I want to remove it.
 
Problem is that from what I suspect, if I use a "for loop" then when I remove an element, the initial length of the loop becomes invalid by removing the element. So what I would need is to iterate through objects in another matter and I am clueless.

View 3 Replies View Related

Illustrator Scripting :: Make Objects Same Width Or Height?

Sep 13, 2012

I found this script that makes the selected objects the same width AND height. I am very new to creating scripts. is it possible to modify this to make an object the same width leaving their heights the same?

mySelection = activeDocument.selection;
if (mySelection.length>0){
if (mySelection instanceof Array) {
goal=mySelection[mySelection.length-1];
for (i=0; i<(mySelection.length-1); i++){

[Code] ......

View 2 Replies View Related







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