We are having an odd behavior in Illustrator CS4 in our office. Multiple users try to deselect objects by clicking in blank space, but the last object still appears as if it is selected onscreen. When they select another object (without holding SHIFT), it looks as if the old object AND the new object are selected...but when they delete or otherwise manipulate the newly selected object, it only affects that particular object and does not alter the old object that appeared to also be selected. Although the actual functionality is correct, it is extremely distracting and annoying because it looks like they have more objects selected than they actually do...and they can never really tell what's what!
For one user, this happens frequently when selecting objects with clipping masks. For another, it happens when simply using the selection tool on any old object. All users on Mac Leopard 10.5.5. Aside from resetting preferences which I've had one of the users do.
1)While selecting multiple objects, 2)a certain script is run. it has an option to input the range of the number of objects that are going to be deselected. 3)The number within the range I inputted is chosen, and the same number of objects are deselected randomly.
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".
use the interactive contour to create an inline. Cntrl+k (break apart). It works but leaves both selected. Now what I need it to do is deselect the outer rectangle leaving me with just the inner one still selected.
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"
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.
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.
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]
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.
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.
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++){
Simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align objects with each other but they dont align to the artboard.
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.
How to write a script which can duplicate objects and apply colours. I have a full break down of the project together with a Illustrator Action that demonstrates the functionality of the required script.
I'd like to select an object and have a script select all objects behind that object, within that objects bounds. I believe this is possible with z-order? But I've never worked with Z-orders before
Is there a way to simply select all object directly below an objects?
I found this script here but it doesn't seem to work.
//DESCRIPTION:Select Below // A Jongware Script if (app.documents.length && app.selection.length) { ypos = app.selection[0].visibleBounds[3];
[Code] .....
Here's an example file. I'm trying to select eveything below the yellow polygon.
This would be very useful in another project with many small objects bunch together below many larger objects. I want to group the small objects that are bellow the larger object together without having to manually select each objects (there are thousands of objects so a script would be ideal).
I have a grid of objects—say, tiny squares. I'd like to make arbitrarily-shaped selections of those objects—for instance, select a star-shaped group of the squares. Or a circle-shaped group of the squares. Or use text paths to select letter-shaped groups of the squares.
I could imagine a utility that lets me choose an arbitrary shape/path, and then turn that into a selection of objects on the canvas. Is this possible?
Right now I'm stuck using the lasso tool to hand-draw shape selections but it's not accurate enough for what I need to do.
I have multiple icons placed in a document, from several different sources (all are vector objects) -- see the included image. They vary in size and what I would like to do is find a less onerous method of resizing all the heights to a specific size, while scaling the width proportionately. I have found several scripts that come close to a solution (see links below), but none that allow me to input a height (or width) in inches and have all the objects resize to that height proportionately.
Change Width to the Width of the narrowest object --> Script01 Change Height to the Height of the shortest object --> Script02 Change Multiple Attributes (JohnWundes) --> Script03
icon image (couldn't place via Adobe Forum) --> click
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.
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?
I'm trying to set up a script that will grab a group of objects and turn them into a compound path, then apply a clipping mask to the compound path and the next group in the layer.
I'm trying to use this command to change the colour of objects inside of a document using applescipt but i keep getting an error "adobe illustrator "can't get color"" the colour exists and is active on a document. I have read the manual on variables and i'm a little lost on what i'm doing wrong, heres what i've got so far:
tell application "Adobe Illustrator"
if color is "C=0 M=0 Y=0 K=90" then set color to "C=0 M=0 Y=0 K=90" end if end tell
i understand this is quite basic but its all i have to start with at the moment
Does this script also cleans up unpainted objects and empty text frames? Personally, I don't think so because the check of the script in extendscript and illustrator results negative.
var idoc = app.activeDocument;var straypoints = []; for (i=0; i<idoc.pathItems.length; i++) { var ipath = idoc.pathItems[i]; if (ipath.pathPoints.length==1) straypoints.push(ipath);} for (j=0; j<idoc.textFrames.length; j++) { var itext = idoc.textFrames[j]; if (itext.textRange.length==0) straypoints.push(itext);} for (k=0; k<straypoints.length; k++) straypoints[k].remove();
I also want to automatically remove all objects who have a white fill (white background) and no stroke.
Problem is a created pdf-file of an html-file of a table that must be cleaned up. There are a lot of stray points, empty text frames, unpainted objects, white "cells" that are also be painted in the pdf.
I was hoping to create a JS script to move objects away from common center based upon their current position. I was thinking to use a single selected path item as the center based on its position x/y and width/height. Using this reference point the script would then move away all other path items from this center point based on a desired amount and with uniform increments given their current location from this center. I was thinking cos and sin would be my friend in this case, however they seem to have become my foe instead. ;-)
Does this sound doable? What am I missing, doing wrong, misinterpreting? Below is a non-working attempt, I can't seem to sort things out, perhaps I was close and missed it or maybe I am super way off and its more complex than I thought. However at this point I am confused across my various failed attempts this only being one of them.
// Example failed code, nonworking concept var docID = app.activeDocument; var s0 = docID.selection[0]; pID = docID.pathItems; var xn, yn; var stepNum = 20;
When I'm working with the pen tool, and create just a stroke (not a full shape), I have to go all the way over to the direct selection tool and click in the margin to deselect that one path. I see people on you to make strokes and deselect the current stroke and make another one with out even flinching towards the direct selection tool.