Illustrator Scripting :: Moving Object (JSX) Using Its Width?
Mar 17, 2013
Is there any way to move a object using its width? ex: "move to left a box with 10cm(width) using this value (10cm)". But I want to capture the width of any selected object.
Another thing: i want to select objects with same fillcolor and do something like: pathfinder>>add;
View 9 Replies
ADVERTISEMENT
Sep 5, 2012
You know the width tool? The one that lets you add "width points" to a line to adjust the width of the line at the point? I want to be able to script that!
Basically, my project is to add a bunch of width points to a line and give them random widths at those points. I'm planning on doing a LOT of these, so I'd rather not do them manually.
View 1 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
Feb 6, 2013
I am looking for any info on scripting the Variable width tool (Javascript).
Background: By adding a gradient to a variable width strock you can create nice 3D looking Shapes (see example)
this is a straight vertical line with varied widths, then hit with a gradient.
Goal: My hope is to write a script that will take a "Profile" or "Shape" and convert it to a Variable width line. (see Example)
The Black line is to have its widths modified
The Red line is how wide the line needs to be.
View 10 Replies
View Related
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
Oct 5, 2012
To get the top, left and width of an groupitem without Clipping mask. Actually the group has Clipping mask. But i need only the width of the selection (without Clipping mask). I got these properties in scripting but including the clipping mask. The GUI itself shows different (i.e. Info -->: X:0 mm, Y:0 mm, W:full width [including clipping mask]. Transform palette -->: X:43.00, Y:22.0, W:64 [excluding clipping mask])
How to get the properties without clipping mask?
View 1 Replies
View Related
Apr 23, 2013
How can I get width that multiple selected items? (Not grouped.)
//---------- source code ----------
var mm = 2.83464566929134 //unit conversion. (point->milimeter)
var W = docRef.selection[0].width/mm;
alert(W);
//---------- source code ----------
View 3 Replies
View Related
Nov 26, 2011
Im struggling with the correct use of symbol / symbol items in applescript. I can successfully list the symbols used on the page, but I cannot select them. How I can select all the items on the page that are Symbol Items of symbols named "Apples" but not oranges? After that I hope to replace the instances matching the height or width of the items whichever is greater with a 3rd item name. Javascript is always an option as well but I had the same difficulty.
View 14 Replies
View Related
Dec 31, 2012
I have an AI file containing seamless pattern swatches.I'd like to get each swatch vectors (ie : access the swatch groupItem). It's doable when clicking on the swatch panel and dragging the swatch on the document, or even double clicking the swatch in the swatches panel, I'd like to do it with javascript.
how to access swatch patterns properties.
How to access the swatch properties, like when double clicking on the swatch in the swatches panel, how to "simulate" a drag & drop of the swatch to the document, I'll take it too, though I think it is not the most convenient way to do.
View 7 Replies
View Related
Nov 20, 2013
I'm new in scripting and i need to make a script that moving all layers into a single layer (in Illustrator i press CTRL+A then CTRL+G in layers and works) but i need that in script.
View 2 Replies
View Related
Jul 2, 2013
I am using a script to move anchor points on a path that I have. When I move the anchors, the handles remain in the same location and I am getting very poor results. I was wondering if there was a way to move handles WITH the anchor points. Basically keep them relative to the anchors.
Below is how I am moving the anchor. I know that you can use leftDirection and rightDirection to move the handles, but I would like them to move the same way they would if you moved the anchors when selecting them in Illustrator.
Set currentPoint = targetPathItem.PathPoints(13)
currentPoint.Anchor = Array(-1537.21, 2735.96)
View 1 Replies
View Related
Apr 16, 2013
In a training video on Illustrator cs6 a device is shown as follows, as the instructor manually resizes an Artboard using the Artboard tool:
Justin, the instructor, calls the little box that immediately shows width/height a "width and height box" but searching on that term is not productive. When I run the program the device is not available, not does the video explain what option makes it available or what might have changed on my particular copy to obscure or disable the box. While I know I can get the same effect by choosing the Info window, and can even adjust the parameters more precisely using the control panel bar, I would like to have the convenience of this box.
I note that in the same video series (from Lynda.com) the same type of display device is shown when the instructor resizes a graphic. After some 30 minutes of Google searches and searching for the identity of this device and how to enable it I come up empty.. An experienced Premiere editor, I'm trying to widen my skill set into more of the Adobe suite and new to Illustrator;
View 2 Replies
View Related
Aug 16, 2011
How to Raster a object in illustrator with scripting?
View 7 Replies
View Related
Jan 24, 2013
I am trying to add a prototype to the Layers object so I can do something like try{ .getByName(name) catch{ return null. For when the named layer doesn't exist. (It gives an error for me in CS5). So unfortunately me trying to go Layers.prototype. my method doesn't seem to work at all.
View 3 Replies
View Related
Oct 4, 2012
is there a way to get position of any selected object? It seems like normally you have to dive into specific item like textFrames to get position, but was curious if there was a generic way of doing this for selected objects.
View 5 Replies
View Related
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
Apr 26, 2012
Trying to see what the properties of an object are so I wrote a function, doesn't seem to work though. it is definitely an object though.
alert(typeof selection); //returns object
function printType(obj) {
var key;
for(key in obj) {
if(obj.hasOwnProperty(key)) {
[Code] ......
View 7 Replies
View Related
Aug 9, 2013
i want to select all the object , but i locked certain object it show error while submiting below code
myDoc = app.activeDocument;
myPageItems = myDoc.pageItems;
for (i=0;i<myPageItems.length;i++)
{
myPageItems[i].selected = true;
}
modify above code to select all objects except locked object or i want to select objects outside active artboard
View 4 Replies
View Related
Feb 20, 2013
Is there a way to determine which object in a selection is the key object? For example: draw 10 squares on a layer, select all of them, click on one of the 10 and it becomes the Key Object (heavy border) for things like Distribute Spacing on the Align pallete. I can determine that a particular object is selected via ActiveDocument.Selection.PathItem[n].Selected = true/false. But I can't figure out how to find out if this is the KeyObject. The ultimate goal is to modify the below script so that it uses the KeyObject as the reference and not the object on the bottom-most layer.
Here is the Script - from [URL]
mySelection = activeDocument.selection;
if (mySelection.length>0){
if (mySelection instanceof Array) {
[Code]....
View 3 Replies
View Related
Feb 17, 2014
I'm trying to build a map of the world that includes provinces and sub-provinces (counties). I will be animating it in AE. AE only sees the top layers so it is imparative that the name of the top layer corresponds the the correct province. Unfortunately all the provinces are not layers. They are objects. I can use the "Release to Layers" command to get all objects nested into top level layers. But the top level layers have generic names (Layer 1, Layer2, Layer 3). The objects nested within these layers have the correct name.
Is there a script that will rename the top level layer using the name given to the object nested within that layer? If not, how to create one?
Here's a link to one of the files: world_all_provinces_Senegal divisions. Level 1_area.zip
View 5 Replies
View Related
Jan 24, 2012
trying to make an object the exact size of the artboard. This is something I do on a daily basis for several different reasons and it would be very useful if this can happen automatically for whatever size the artboard may be. As I understand it the only way is with a script but I have no experience with making illustrator scripts, im definately no programmer. I have set up quickkeys in the past to copy from the artboard inputs when you are on the artboard tool but these round to the nearest .01 and this is not accurate enough for what I am working with. Also if I do this with multiple pages open illustrator is very slow to respond to the artboard tool.
Below is a script that I saw on here that I believe may contain what I need but now knowing programming. Where to start on editing. All I need is the part where an object is placed on the artboard that is the exact same size as the artboard.
#target illustrator function main() { if (app.documents.length == 0) { alert('Open a document before running this script'); return; // Stop script here no doc open… } else { var docRef = app.activeDocument; with (docRef) { if (selection.length == 0)
[Code].....
View 23 Replies
View Related
Feb 23, 2012
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
View 5 Replies
View Related
May 30, 2013
When I run the script for an object selection, I want each object to have its color set to the underlying color as if I had used the eyedropper tool. Is this something that can be scripted?
View 1 Replies
View Related
Feb 21, 2014
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).
View 1 Replies
View Related
Oct 28, 2009
In prior versions of illustrator we used a script that basically saved the visible bounds of a masked object as an EPS file. With the upgrade to CS4 and Multiple Artboards this save function (EPSSaveOptions) no longer does the same visible bounds. I have read several post of similar issues, but what I am asking is:
In there a way to make the visible bounds of the eps file equal the artboard on the active artboard only? The artboard seems to be driving the crop box. When I manually save the file as EPS the visible bounds are correct. When I save from the script it is not? As with other posts I do not want to go backwards within compatibility...I would like to keep the file at the CS4 level. What command am I missing? We have tried making the crop box = visibleBounds to no avail.
View 5 Replies
View Related
Sep 8, 2013
we have a problem with Illustrator.Illustrator pulls behind selection. You can't select an object with the Selection tool, without afterwards draw the object by moving the mouse. A new installation and resetting Illustrator was unsuccessful.
View 16 Replies
View Related
Jun 28, 2013
I've got a script that creates a palette that does some calculations when a button is pressed - but something in the script is failing silently. (this question is about how to debug things like this, not what the problem is in my specific script)
I've read the debugging tips in the Javascript tools guide, and based on that, re-opened the script in the Extendscript Toolkit instead of my usual text editor, chosen Illustrator, and hit the green 'Go' button. But, either I've missed something fundamental, or this isn't designed for palettes - the script runs in Illustrator, successfully pops up the palette, considers the job done, pats itself on the back, and closes the palette before I can begin debugging the button.
I'm looking for something where I can test the palette doing regular Illustrator work and see debug messages, set breakpoints, etc. I've tried the old-school approach of just filling the code with 'alert("blah")'s but it doesn't work - my code reaches an
" if(app.activeDocument.selection.length){ alert(1);} else {alert(2);} "
and doesn't alert either of them, or give any error message.
If I was working in a browser, I'd just plonk in a "console.log( app.activeDocument.selection )" and browse the object structure to see what's going on, is there any Illustrator equivalent?
View 1 Replies
View Related
Nov 26, 2012
I need the finished script to create a rectangle with no fill and a 20% gray stroke to outline each artboard. I dug this up off these boards, which works perfectly except the rectangles created have no fill or stroke. certainly save me a lot of time drawing rectangles on a daily basis.
#target illustrator
var docRef = app.activeDocument;
var artboardRef = docRef.artboards;
for(i=0;i<artboardRef.length;i++){
var top=artboardRef[i].artboardRect[1] ;
var left=artboardRef[i].artboardRect[0];
var width=artboardRef[i].artboardRect[2]-artboardRef[i].artboardRect[0];
var height=artboardRef[i].artboardRect[1]-artboardRef[i].artboardRect[3];
var rect = docRef.pathItems.rectangle (top, left, width, height);
rect.fillColor = rect.strokeColor = new NoColor();
}
View 3 Replies
View Related
Apr 23, 2012
I have been following this tutorial: [URL] .... in which artwork is mapped to the perspective grid.
Towards the end of the video (7:00) a sign is mapped to the left grid then moved perpendicular along the right grid ... this is achieved by holding down the tilde key.
When I hold down the tilde key and move the object (which is selected with the perspective selection tool, with the correct grid selected ) it does not map it perpendicular as in the video.
I have deleted my illustrator preferences file (in case any settings were causing this feature not to work). Also if I create a new object and press the tilde key and drag I can create multiple instances, so the tilde key at least in this case is being recognized.
View 3 Replies
View Related
Nov 28, 2013
I'm working in a file zoomed fully to 6400%. I've changed the Keyboard increment to the smallest it will allow to 0.0036 mm.
I have two lines. Line 2 sits on line 1, a fraction above. When I select line 2 and press the down arrow key, it jumps so that line 2 is now a fraction below line one. I cannot get the lines to sit perfectly onto of one another.
I have tried to move the line using the mouse, but it snaps to the same position as the keyboard press.
I have turn off snap to grid, snap to point, all the guides, smart guides.
View 3 Replies
View Related
Dec 25, 2012
I'm using Illustrator CS5
When I move an object to a new tab(drag and drop), the end reult is very low resolution/distorted image?
View 3 Replies
View Related