Illustrator Scripting :: How To Get / Determine Visible Bounds
Jun 30, 2013
how to get/determine the visible bounds (top+left coords and width+height or Rect structure) of a group having a clipping mask or several masks? When a script asks for Visible Bounds, Illustrator provides the coords/size of the group like it does not have any clipping mask. So, you see a circle of 10px diameter (and these are the actual visible bounds of this group), but Illustrator says that the visible bounds are 50 px wide and 70 px in height.
And what to do if the group contains multiple clipping masks of different shapes/sizes?
View 3 Replies
ADVERTISEMENT
Jan 14, 2014
Okay, So when you use a clipping mask there can sometimes be a lot of art that is invisible. If you "Select All" you'll get a rectangle only around what's visible. I want the bounds of that rectangle.
I tried itterating the art but I don't think that the art type is the best way to figure this one out. And if you use AIGroupSuite to test if an art group is "clipped" with GetGroupClipped, you get the bounds of the larger art that I'm trying to avoid.
I didn't see anything about bounds of a "selection" in the docs.
View 12 Replies
View Related
Mar 20, 2012
trying to have an applescript place a PDF as an Illustrator Link at the PDF's Media Box using "make new placed item". The only result possible as far as I can tell is a link at the PDF's Art Box.
I've seached around and have seen others with the same issue, but no answers as to whether it is actually possible. As with most Applescript stuff, I am either way overthinking it or it is not possible directly.
Currently I have a workaround using an Applescript script controlling Acrobat to sidestep the problem by setting the Art and Crop box to Media box, then place as a link in Illustrator, but it is not a direct route into illustrator.
I have also noticed that in the "Adobe Illustrator CS5 Scripting Reference" that the "PDF options object properties" do not honor the PDF crop bounds (except for the default value of Media Box). Is this an inherent problem with Applescript/Illustrator and PDF crop boxes? Could it be that the options for Open PDF and Place PDF are crossed?
View 7 Replies
View Related
Sep 6, 2012
I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text. The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.
View 6 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
Mar 3, 2013
How to make a layer visible by using the name of the layer, with javascript?
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
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
Jul 26, 2013
I have been working on a script to place a psd file onto only one visible layer (document has multiple hidden layers). This java code has worked so far:
var doc = app.activeDocument;
var onFile = File("C:/Users/Desktop/Desktop/ExportedArtboard-01.psd");
var mydoc = doc.placedItems.add();
mydoc.file = onFile;
mydoc.embed();
however this works with only the top layer visible (eye turned on in Ai). if top most layer isn't visible i get "target layer cannot be modified" error.
For instance say i have 1,2,3 layers. layer 1 (top most) and 3 (bottom most) would be hidden, layer 2 (middle layer) would be visible and then running the script would place the psd file on to layer 2.
View 3 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
Feb 1, 2013
I'm looking for the most elegant syntax to loop through a document and select all the text frames.
View 1 Replies
View Related
Mar 18, 2014
I save a document from .ai to .pdf in CS5 and it automatically goes to the size of the artwork bounds instead of the artboard or paper size.
View 7 Replies
View Related
Feb 11, 2014
Both Adobe Cloud application the applications do not constraint to the screen resoluation, meaning that the Window menu in Illustrator for example has options that are inaccessible instead of creating a scrolling menu within the constraints of the screen.
View 1 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
May 6, 2012
Can you access graph data through the scripting DOM?
View 3 Replies
View Related
Jun 26, 2013
How to determine which colors are used in the publication?We must get - cyan, magenta, pantone 100 C.
View 2 Replies
View Related
Mar 21, 2013
I use Adobe Illustrator CS4 and I have a logo (.ai file in CMYK) that uses 2 colors. I don't know how to convert / find what Pantone colors my logo uses.
View 10 Replies
View Related
Nov 7, 2012
I want to be able to check if an object really was created with pen tool. How do I do that? Is it possible?
View 6 Replies
View Related
Aug 20, 2012
I am trying to loop/iterate through all layers, determine if it's a "text-layer", if it is, set it's opacity to 0.This is what I have so far:
var iapp = new Illustrator.Application();
var openoptions = new Illustrator.OpenOptions();
var idoc = iapp.Open("c:\myFile.pdf", Illustrator.AiDocumentColorSpace.aiDocumentRGBColor, openoptions);
Illustrator.Layer mainlayer = idoc.Layers["Layer 1"];
[code]....
View 1 Replies
View Related
Mar 20, 2013
I am developing a plugin for Illustrator CS5, 6. I have a scenario which requires the plugin to place a text frame inside a closed path art. How can I calculate the proper destination coordinates? The path art can be a curve or a rectangle, any shape. I need to place the text frame inside the path such that no part of the text frame overlaps the boundaries of the path art.
I looked at the forum and found the following thread: [URL] .....
Here, its stated that the method AIPathfinderSuite::DoFrontMinusBackEffect of the API did the required task. I tried the same but couldn't get it to work.
My first preference is to use the Illustrator SDK, not any third party libraries.
View 2 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Sep 8, 2007
How do you get an image to look like it is coming out of the TV screen? I have seen this effect in several ads and it drives me crazy to know how it was done. I saw a guy walking out of the TV screen, and I saw a car driving out of the TV screen.
View 1 Replies
View Related
Apr 2, 2007
Here is my latest attempt at an out of bounds image.. I don't understand why the lines of the photo are jagged... I did this rather quick but I am a little confused about the jagged lines... which by frustration left me leaving the image as is. Any ideas as to why this happened? I had made a rectangle and did a fill and deleted the inner part.. then when I transformed it I made sure to hold the shift key to keep it correct..
View 9 Replies
View Related
Jun 20, 2013
When i hatch an area, i's fine, but when i match prop to another (witch is out of bounds) it goes out of bounds.
All of my hatches went out of bounds at some point.
View 5 Replies
View Related
Jun 22, 2013
In the Shake Reduction Filter, what do you look for in the image, and how do you use the Blur Trace Bounds slider to optimize its function?
View 2 Replies
View Related
Oct 31, 2013
I've not had to deal with metes and bounds info in a very long time. For one project I have to generate the info for a couple parcels. From looking around it looks like there's a tool in ACAD Civil. Is there something similiar in Map3D?
View 2 Replies
View Related
Sep 19, 2012
So I'm cropping to a square, but I want the crop to extend off the image area because I want to replace the missing bit in photoshop. This effectively makes the image bigger than the original. the only way to achieve the same effect is to scale the image, that keeps the pixel dimensions the same but effectively reduces the size of the image.
is there a way to crop beyond the image bounds?
View 2 Replies
View Related
Aug 2, 2013
I want to crop several images in same aspect ratio.So I checked "Fixed" option and set proper values in tool box.
And sometimes I want to complement image with background color if selectionis larger than original size. In this case, I add a larger layer bottom of the image and crop it.
But it would better if I can do it by one action.Therefore I'm trying to write a script-fu for it, but I'm stuck now.
Because a function `gimp-selection-bounds` returns points only inside ofthe image even if the selection is outside of image.
Is there a way to get bounds of selection outside of a image by usingscript-fu?
View 1 Replies
View Related
Dec 13, 2011
I have a dynamic simulation which seems to have corrupted itself. I have a number of Revolution joints which are torsional springs. I’ve enabled joint torque and set a spring stiffness and a free position (+15 deg). Then on the ‘initial condition’ page I’ve set Max (+45 deg) and Min(-15 deg) Bounds on rotation angle and set a stiffness 10x the spring stiffness to simulate the end stops of my torsional spring. The initial position is +12 deg. This was working just fine but since I’ve added a couple more parts (nowhere near these springs) I constantly get the message “The parameter xxx value is out of bounds”. Where xxx is the ‘Initial position’ of the joint. If I edit the joint and untick the Bounds section the message goes away but if I tick it (which I need for my simulation) I get the error message as soon as I pick OK. The position is NOT out of bounds?
View 4 Replies
View Related
Sep 16, 2013
Can I have photos I make with out of bounds and layers printed?
View 1 Replies
View Related
Dec 11, 2012
I have windows XP professional installed with IE8 browser. I am trying to access a site which has some SVG images but I am not able to see them at all. The prompt for downloading Adobe SVG viewer also does not work.I cannot install IE9 because XP does not support it. Installing Chrome also does not work. Any proper plugin to view the files on Chrome.
View 2 Replies
View Related