In my 'graphic project' I want to place text into a TextLine. The following script gets some properties from a selected TextLine (which is located in an anchored frame). But so far I create an empty TextLIne at the desired place and with the desired angle.
But how to put text into it?
// Clone a selected TextLine to check the function
var j, oDoc = app.ActiveDoc, oFrame, oTextLine, CM = 1857713, DEGREE = 65536;
oSelected = oDoc.FirstSelectedGraphicInDoc;
oFrame = oSelected.FrameParent;
oTextLine = oDoc.NewTextLine(oFrame); // Take over specifications from selection
// there needs to be text to get the TextLine visible!
//oTextLine.AddText ("New text"); // statement not valid
frameexpert • Adobe Community Professional, Nov 28, 2018
Hi Klaus,You should be able to add text to a TextLine just like you do with a Paragraph:var textLoc = new TextLoc (oTextLine, 0);doc.AddText (textLoc, "Text on the text line.");I haven't tested this with ExtendScript, but it should work.Rick