Illustrator Scripting :: Resetting Anchor Position Of TextFrameItem?

Feb 21, 2012

Why does this not work? The textFrameItem.anchor behaves as if it is a read only value but it isn't supposed to be. What am I doing wrong?
 
function pointText(onLayer,str){
    var pointText = onLayer.textFrames.add();
    pointText.contents = str;[CODE].....

View 1 Replies


ADVERTISEMENT

Illustrator Scripting :: How To Get Position Of Point Text From Left Anchor

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

Illustrator :: Change Position Of Anchor Points On Line

May 16, 2013

How do I change the position of  anchor points on my line,  at the moment the anchor points are in the middle of my line, I would like the anchor points on the inside edge of my line so I can make my cut cuides more accurate. I am using illustrator CS6 cloud.

View 17 Replies View Related

Illustrator Scripting :: VB Syntax For Pathpoint Anchor

Nov 3, 2013

I am trying to (among other things) move a pathpoint that was added on a pathitem rectangle. The add of the pathitem goes well, the add of the pathpoint to the rectangle is fine, although when it it is "added" it picks some arbitrary position, hence the need to change the position, starting with the anchor.
 
I typically write in VB.NET (2013), as I am doing here. Using Illustrator CS6.
 
In VBScript, documentation shows:
    newPoint.Anchor = Array(75, 300)

Using that syntax, I get a pre-complier error in VB.NET, as "Array" is a type and can't be used as an expression.To create an inline array in VB.NET, I would normally use:

    newPoint.Anchor = {75, 300}
Using this syntax, I get a runtime COM-exception error.

View 3 Replies View Related

Illustrator Scripting :: How To Add Anchor Point On A Path

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

Illustrator Scripting :: Move Anchor On Path Item

Jun 21, 2013

All I am trying to do is move an anchor from one location to another using vbscript.  I have searched everywhere and scoured the scripting references but I have not been able to figure this out as of yet.
 
I am able to select anchor points without an issue....moving those points seems to be a problem. 

View 5 Replies View Related

Illustrator Scripting :: Way To Add / Remove / Redistribute Anchor Points On Compound Shape

Sep 10, 2013

I am wondering if there is a way to add/remove/redistribute anchor points on a compound shape so that there are evenly spaced anchors along the outline of that shape.I am aware of the "add anchor points" command. But that adds a new anchor at EVERY midpoint between two anchors. It doesn't smartly calculate where to add and where to avoid adding anchors.

View 1 Replies View Related

Illustrator Scripting :: Move Direction Handles In Sync With Anchor Point?

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

Illustrator Scripting :: Write A Script That Samples Anchor Points Underlying Color And Applies It?

Mar 5, 2013

script that would sample the underlying color of anchor points in a selected gradient mesh and apply it to them? I was just thinking of ways to speed up the process of creating a vector drawing based on a picture so that all you would have to do is model your mesh and then let the script apply the colors.

View 2 Replies View Related

Illustrator Scripting :: Get Position Of Selected Object

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

Illustrator Scripting :: Get Keyboard Cursor (caret) Position In JavaScript?

Oct 24, 2013

How can I get keyboard cursor(caret) position in javascript?
 
I made a multilined edittext in ScriptUI.
 
But It's not working about Enter key. 
 
All I want is when I push 'enter' key, begin a new line.
 
If I know how to get keyboard cursor position, I can insert ' ' character in middle of sentances.
 
////////////////////////////////////////////////////////////////////// ///////////////
 var win =new Window ("dialog", '');
win.orientation = "column";
 var grpContents = win.add("group")
var codeInput = grpContents.add ("edittext", [0, 0, 150, 550], "", {multiline:true});
codeInput.alignment = ['fill', 'top']

[code]....
 
I use windowsXP and Illustrator CS3.

View 4 Replies View Related

Illustrator Scripting :: Copy And Paste Position And Size Of Two Different Objects?

Sep 20, 2012

how can I copy and paste position and size of two objects?
 
Let's say I have a circle 2 x 2 cm and it's position is y 5cm x 5cm, I have a square of size 3 x 7 cm and it's position is y 0cm x 0cm.
 
How do I copy and paste in a single command/step the circles position and size to square, so I can get square of 2 x 2 cm and it's position 5cm x 5cm?
 
Something like copy + paste in place with a different logics. I hope You understand what I want.
 
I'm doing it now manually, I'm copying size and position of one object to another [ctrl + c > ctrl + v] but it takes quiet a while,

View 2 Replies View Related

Illustrator Scripting :: Create JS Script To Move Objects Away From Common Center Based Upon Their Current Position

Jan 17, 2014

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;

[Code]....

View 13 Replies View Related

Illustrator :: Function To Add Median Anchor Between Two Anchor Points

Feb 12, 2014

I'm just wondering if there's some function to add an anchor point on a path between (exactly in the middle) two anchor points. Like Object > Path > Add Anchor Points, except only between two selected anchor points.
 
I'm using Illustrator CC (17.1) on a Mac.

View 2 Replies View Related

Photoshop :: Scripting A Position

Mar 5, 2004

Using action script I would like to crate a text layer and have it be bottom right justified on the canvas. The problem is that when you create a text layer you must click on the canvas. Since I have different size canvases I am doing this on and I want to do it automatically there is an obstacle.

If I could just create the layer and then some how tell it to position itself that would work too. When you script all moves are relative from the starting position.

View 2 Replies View Related

Illustrator :: Can't Delete Anchor Points With Delete Anchor Point Tool

Aug 30, 2012

I have a shape in illustrator CS6 that I'm trying to edit. When I try to click on a point with the Delete Anchor Point Tool nothing happens however I am able to select the point using the Direct Selection Tool and then remove it using the "Remove selected anchor points" option in the Control palette. Same issue with trying to use the Convert Anchor Point Tool.

View 7 Replies View Related

After Effects :: Move An Object's Anchor While Keeping Object In Same Position Relative To Screen?

Sep 7, 2013

I'm want to drag an objects anchor and have the position co-ordinates offset by opposite amounts so it doesn't appear to move postioin on screen. IS there a tool for that?

View 3 Replies View Related

Illustrator :: Resetting Gradients In CS5?

Jul 30, 2010

I have been continuously since buying CS5/Illustrator. Our company had its logo designed by another firm, and it has been my job to use it in brochures and marketing collateral. The logo uses a two instances of a radial gradient applied to two separate elements of the logo. The gradients are off-center. However, when I place the file into a document, save, close and re-open, boom! the gradient is reset to center, throwing off the logo. This has happened when I have least expected it, and even resulted in a very expensive reprint.
 
I have converted the file to different formats: EPS, JPEG and PDF, but with the first, there is a loss of image quality, and with PDF, the gradient still moves out of place.

View 17 Replies View Related

Illustrator :: Resetting Preferences In CS6?

Jul 26, 2012

Im trying to reset illustrator Preferences with the shortcut option+command+shift   but its not working, it worked with photoshop but with illustrator its not working why ?
 
also in CS6 where to find illustrator Preferences file to delete them in case short cut dont works

View 8 Replies View Related

Illustrator :: Brush Stroke Resetting To 1 Pt

Oct 19, 2012

Okay so I've browsed these forums and everybody keeps saying to turn off Align new Objects to pixel grid well I've done that and it still keeps resetting. I've been using a Print document since I am trying to draw illustrations for a children's book but somehow when I choose anything below 1 pt it keeps going back to 1 pt no matter what.
 
Opened up transform panel too but it's not checked and grayed out so I can not turn on / off again. I am using Adobe Illustrator CS5.

View 2 Replies View Related

Illustrator :: Why Does Settings And Brushes Keep Resetting

Jan 7, 2014

I have Illustrator CC (at the moment I am using the trial version), and I have used it a few times. The only problem is that every time I have made some changes to the hotkeys/keyboard shortcuts, and added a few brushes, this disappears (like it resets back to factory settings by itself) when I re-open Illustrator.

View 1 Replies View Related

Illustrator :: Why Does Brush Keep Resetting Itself To Original Settings

Sep 29, 2013

i click on the brush and change its color and or size then, when I go to paint it goes back to previous settings.   (after that I can change its setting and it will work, but I always have to make a mark with the settings I don't want before I can change it to desired settings)

View 1 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

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

Illustrator :: Brush Keep Resetting To Calligraphic When Trying To Use Variable Width Profile?

Oct 7, 2012

I'm working on a reflective drawing and using gradients on strokes.  I've been using pressure sensitive calligraphic brushes I made.  Now I'm trying to use variable width preset profile brushes.  It works fine for the first stroke, but every time I make a new stroke, it reverts back to a calligraphic pressure brush.  How can I keep my brushes the same profile until I manually select it to be different? I've gone back and forth between the brush tool and pencil tool and neither will keep any basic variable width profile past the first stroke. I have to select every brush stroke and change it again and again after drawing it.

View 3 Replies View Related

Illustrator :: Variable Width Profile For Brush Tool Keeps Resetting?

Jan 12, 2013

I’m using Adobe Illustrator CS6 with a mouse rather than a pressure graphics tablet.
 
When I create a stroke using the Paint brush tool I would like the stroke to contain a variable width profile. For example narrower at the beginning and end of the stroke but thicker in the middle. Now I can do this by selecting the line after I have made the stroke and choosing the Basic Brush Definition from the drop down list.  But if i try to draw a new line the settings are reset again.  I cannot create a variable stroke while creating the stroke. The brush definition keeps resetting to 5 pt Round and stroke width 1 pt. It would be much quicker if the stroke remained as a varying width profile as I created the strokes.
 
I noticed the same problem with the blob brush tool except it's even worse. With the blob brush tool the stroke weight always resets regardless of whether or not I try to set a Variable width profile.

I tried deselecting "New Art has Basic Appearance" mentioned on another forum but that didn't work.

[URL]

Notice the variable width profile is maintained as the artists draws. It doesn’t keep resetting.

View 13 Replies View Related

Illustrator :: Stroke Resetting To 1pt - Uniform Profile In CS6 (with Brush And Pencil)

Aug 12, 2013

This was not an issue in CS5, and I can't figure out how to change it in CS6.  I like to Illustrate with the Pencil Tool.  I set the stroke to width profile 1 (tapered on both ends) and the stoke to whatever makes sense for my current project, and it keeps changing back to Uniform and 1pt.  I have tried to get my settings to "stick" with the Pencil Tool and Brush Tool, and have had no luck.  The only way I can change the stroke profile is to do it AFTER the stoke is made. 

View 2 Replies View Related

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Photoshop :: Illustrator - Can't Add Anchor Point...

Jun 12, 2007

In Illustrator I have a path, I choose the add anchor point tool and am positive I have the cross hair exactly on the path but it keeps telling me I can't add the anchor point.

View 1 Replies View Related

Illustrator :: Coordinates Of Anchor Points

Sep 12, 2013

I want to get the coordinates of anchor points in every path layer. Can illustrator itself offer me a list of corrdinates X/Y?

View 14 Replies View Related

Illustrator :: How To Add Or Delete Anchor Point

Feb 7, 2014

I've noticed that in Illustrator CC (17.1) the pen cursor doesn't automatically let you add or delete an anchor point anymore, when in Pen tool mode (P). It used to be an automatic feature in CS5, where a + or - sign would show up whenever I hovered over a selected path with the tool.

View 5 Replies View Related

Illustrator :: Not All Anchor Points Get Corners

Feb 25, 2014

I draw with the pen tool a rectangle... When I click with the direct selection tool on the left side anchors, none of them have the corner widget... The right side anchors / both have corner widgets appearing.
 
I have tried clicking the left-side anchors and converting them to 'corners' both nothing happens..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved