Illustrator Scripting :: Get Actual Visible Width Of Groupitem?
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
ADVERTISEMENT
Oct 27, 2013
I'm trying to find the smallest textframe within a group and then matching that textframe font size to the minimum size allowed for printing. Everything else works, except I can't figure out how to resize the textframe while also resizing its parent, the group.
#target illustrator
docRef = app.activeDocument;
gpRef = docRef.groupItems[0];
var gpHeight = gpRef.height;
[Code]....
I'm not even sure if I'm going about this the right way. Hoping a fresh set of eyes can take a look
View 3 Replies
View Related
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
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
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
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
Mar 3, 2013
How to make a layer visible by using the name of the layer, with javascript?
View 2 Replies
View Related
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
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
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
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 5, 2014
Trying to use the width tool, I ran into the following problem. I would like to have a smooth transition of the stroke width between two width points while keeping the original stroke width unchanged outside of that line segment.
There are four width points here: two end points and two in between. The original stroke width is 200. The two on the left have one side set to 100 while the two on the right have one side set to 50. I would like to eliminate the distortion of the line width occuring in the first and third line segments. The only solution that I have come up with so far is to place two additional width points very close to the two middle width points: one with a 100-unit side to the left of the second point in the picture and one with a 50-unit side to the right of the third point in the picture. Yet there will be a small distirtion in between.
View 1 Replies
View Related
May 9, 2010
I drew a cured line with the brush tool in illustrator CS5, but when I select the new "width tool" to change the width, it doesn't work.
Here are my steps:
1. Select the paintbrush tool
2. Draw something
3. Select the "width tool"
4. Try to change the width but it won't work.
Since I draw with the paintbrush tool, the "width tool" can be very handy if I can get it to work.
View 6 Replies
View Related
Feb 22, 2009
What is the difference between Actual Pixels and Actual Print Size?
View 15 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
Oct 19, 2012
When using the type tool in Illustrator, setting the font size to 150mm give me a character size of 107,373mm and in the H value window it says the size is 185,15mm wich mean that none of the sizes is actually correct when using text and for me that is usless because I get drawings with spesific text hight and length.
View 8 Replies
View Related
Mar 15, 2013
I am doing design exhibitions with interior design. The interior designer sends me an AutoCAD file. The AutoCAD can calculate ratios from the actual sizes, how about the Illustrator? Can it calculate in the same way? For example, draw the line 2 meters from ratio 1:30. Now, we have to compare and calculate length in manual way which is inconvenience for us.
[URL] ....
View 3 Replies
View Related
Jun 24, 2012
is there a way to make it so everything that appears on the artboard is hidden/invisible, and have it so my vector shapes/images only appear inside rectangle/panels?
As of now, if I am to create a comic using the pen tool, and some parts of the vector are outside the rectangles (panels) I made, I would either have to use the knife tool to cut off the vectors outside, or hide the vectors outside the panels with white rectangles (since my artboard is white).
View 10 Replies
View Related
Jan 28, 2014
I work at a university and have logos shared with me from other designers, most of which are working on Macs and I'm working on a PC. When I open the logo and select all, the size displayed is 227.5417 inches x 227.5417 inches. The last one I received, the actual size of the logo was 2 inches x 1.75 inches. How do I get Illustrator to display the actual size of the logo?
View 7 Replies
View Related
Jan 21, 2014
I'm trying to import some JPEG images into illustrator to add a very simple vector graphic over the top of some of them. The prolem is that when I import the images the don't appear at the same resolution as they should be. The images are all 600px x 400px 72dpi but when I import them into illustrator the software is readinig them (via the w & h dimensions in my illy browser) as 144px x 96px. The odd thing is that when I export them from Illustrator they're showing as 600x400px images again. Is this somethign to do with my import settings or preferences?
View 10 Replies
View Related
May 13, 2013
Is there a way to get the dimension text to highlight along with the actual dimensions, without having to directly select it after pulling a dimension off of an object? CAD Tools 7 automatically highlighted it.
View 1 Replies
View Related
Sep 19, 2012
I made something exactly 14 inches in illustrator according to the AI ruler. When I print it, it is larger than 14 inches - over 14 1/4 in. Print settings are set to do not scale.
View 3 Replies
View Related
Nov 2, 2013
I want to use a 3rd party brush to 'color in' parts of a drawing or paint the background so it has a nice effect.However, when I use the brush tool to add color it reacts in an odd way as seen in the snapshot. I've looked at the brush options but am unsure of what will make a difference. Is there a way of devoting more ram to the program when I'm using it?
Is there an alternative way of adding the same stroke to the actual fill of a shape? At the moment all of my fill colors are block colors rather than having a kind of chalk / pastel texture that I can get with the brush. Basically, I would like to fill shapes with textured color rather than flat color.
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
Oct 12, 2013
whats the difference between creating a width using layers and using polyline width?
View 2 Replies
View Related