Illustrator Scripting :: Width Point On PathItem
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
ADVERTISEMENT
May 8, 2013
<ai cs5><javascript>
I creat 5 pathitem in the K_layer, i want to group them.
code:
var myDoc = app.activeDocument;
var K_layer = myDoc.layers.add();
var k01 = K_layer.pathItems.add(); k01.name='01';[code].....
View 3 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
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
Mar 19, 2013
I want it to be a variable stroke, so I loaded up “Width Profile 2” in the profiles. The trouble I am having, is that Illustrator defaults to start the larger dots in the bottom right hand corner, and I would like the “starting point” to be in the middle of the line if you know what I mean. I'm still happy for the dots to start big, then gradually decrease in size, but I want to control where the “beginning” is.
View 2 Replies
View Related
Sep 22, 2012
Is there any way to find a specific point on a path, that is not necessarily an anchor point?
What I'd like to be able to do is tell Illustrator "Give me the coordinates of the point that's exactly at half of this path's length" or "... exactly 25% ...". And if that's possible, can I somehow add an anchor point to that point, or cut the path at that point?
View 4 Replies
View Related
May 7, 2013
I wish to resize a selection around a custom 2D point. I have had a look at the resize function:
#target illustrator
sel = app.activeDocument.selection[0];
var scale = 200;
var scaleAbout = Transformation.TOPLEFT;
[Code] .....
Which works allright but I assume that I need to use the constants defined in the Transformation class? I cannot just input a 2D point to scale around? Would be handy. I have a feeling that I need to use a transformation matrix to do this.
View 4 Replies
View Related
Jun 9, 2012
I'm trying to get the position of point text from left anchor if left aligned, middle if center aligned and right if right aligned. is this even possible?
here are the keys of object I am trying to get at:
keys:
story : [Story]
contents : export me
textRange : [TextRange]
textSelection : [TextRange]
rowCount : 1
columnCount : 1
rowGutter : 0
columnGutter : 0
flowLinksHorizontally : true
spacing : 0
opticalAlignment : false
kind : TextType.POINTTEXT
contentVariable : undefined
orientation : TextOrientation.HORIZONTAL
this is what I am using to get at it:
app.activeDocument.textFrames[2].anchor[0]
am i confusing anchor point with baseline position?
View 3 Replies
View Related
Aug 17, 2012
I'm trying to nudge the anchor points on an object randomly (to get an informal look). (I know some Effects do this already.)
Maintaining corner points is no problem - you just set the direction handles to the same coordinates as their anchor.
But I can't nudge a smooth point in the way I want to, which is to move the anchor but maintain the direction handles in exactly the same relation to their anchor as they had before. That is to say, they should remain smooth points.
My script calculates the difference between 'before' and 'after' positions of the anchor, and applies that difference to the direction handles… but in practice the smooth points are converted to corners, because the direction handles don't maintain their relation with the anchor.
var docRef = activeDocument;
var objects = activeDocument.selection.length;
var cShift = prompt("Point shift (pt)",5);
// loop through all objects
for(var count=0;count<objects;count++)
[Code] .....
View 2 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
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
Jan 2, 2014
Having a lot of issues manipulating points on paths in Illustrator CC - this is a fundamental feature of creating vector graphics and it's very annoying I'm paying for this and it's just not working. Eating up a lot of my time simply because I can't select or convert or add the anchor.
View 2 Replies
View Related
Oct 9, 2013
I would like to draw a Zig Zag Line, but I want that the line start in point "A" and finish in point "B".
The image below is similar to how I want the line, but I would like to have that "wavy" style. I use Illustrator CS6.
View 3 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Feb 20, 2014
How does one erase part of a circle from point to point ?
View 2 Replies
View Related
Apr 24, 2013
I was doing the following steps when I encountered this problem:
1) I created a V shape with the Pen Tool.
2) After having changed my default selection tool to the Direct Selection Tool (so that I can use it later), I used the Convert Anchor Point Tool (Shift-C) to drag at the V junction to change it to more of a U shape & thus also creating a Smooth Point there, like this:
3) Then I grabbed one of the direction handles & dragged it a bit to make it a Cusp point. Like this:
As soon as I did this, the other direction handle disappeared & the anchor point also became deselected.
4) So I temporarily switched to the selection tool (the Direct Selection Tool in my case) by holding down the Cmd key and clicked on the anchor point.
Result: As soon as I clicked on the anchor point to select it and also make the other direction handle visible, the anchor point became a smooth one & the shape of the path changed dramatically - i.e., the cusp point I created was gone (see fig.)
and I had to rework on the changed path.
Is this expected? BTW, I'm working in Illustrator CS6 (Mac).
View 1 Replies
View Related
Oct 12, 2013
whats the difference between creating a width using layers and using polyline width?
View 2 Replies
View Related
Jan 9, 2014
I'm having trouble with the spacing of my text when I import a .rtf file. The spaces change width based on the width of the columns. The problem does not effect all the paragraphs only select ones. If I change the width of the column the spacing of the text will fix itself. All of the text is the same text style. I have attached a copy for reference.
View 2 Replies
View Related
Jun 4, 2010
All i want is to set a stroke width of 0.25 pt. When i select it, it just goes back to 1 pt. What gives????
View 6 Replies
View Related
Apr 1, 2013
I'm having an issue where I'm creating a white border around two landscape oriented images that are the same exact size then doubling the width of the canvas. I've never had this issue before with PS CS6.. I tried resetting the photography workspace but no luck. I tried with two portrait oriented images and the same result. I've restarted my machine. I'm on Windows 7 Pro 64bit and I'm running PS CS6 64bit as well. Thought to do a repair through Programs and Features but there is only the option to uninstall. I haven't done anything out of the ordinary except use an action a few days ago I downloaded and used from
[URL]........
and I downloaded and used the press print action.
How I can correct this? If an image is 20 inches wide and I'm doubling it to 40 it's tripling the width to 60 inches. Is there a way I can reset every aspect of PS CS6 to get back to a factory state other than uninstalling and reinstalling?
View 5 Replies
View Related
May 16, 2012
I'm having trouble with stroke option in illustrator. It was working just fine but now its stuck at 1pt and I cant increase or decrease the stroke width no matter what I do.
View 6 Replies
View Related
Dec 11, 2012
Why does illustrator default the pt size back to 1 when you try and do 0.75, 0.5 etc?
It's not consistent throughout the document, I have other shapes/ lines with 0.75 pt stroke..
(CS5)
View 10 Replies
View Related
Jun 6, 2013
I've got CS6 (Using the Cloud so most up to date version).I want to draw a line segment. I select .5pt for the stroke width. I draw the line whilst holding down Shift so it's straight. It defaults to 1pt width. I select it and try to change the width using both the appearances panel and the tool bar. It automatically defaults back.
I draw the line on an angle and it remains at .5pt. But I don't want an angled line. I want a straight line. I draw it with the pen tool and it defaults to 1pt.
View 2 Replies
View Related