Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

How to put text into a TextLine ?

$
0
0

Dear friends,

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
#target framemaker  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    oTextLine.Angle = 5 * DEGREE;  oTextLine.BasePointX = oSelected.BasePointX;  oTextLine.BasePointY = oSelected.BasePointY + 1*CM;
//oTextLine.Width = oSelected.Width;              // set by text contents ?
//oTextLine.Height= oSelected.Height  oTextLine.Pen = oSelected.Pen;   oTextLine.Color = oDoc.GetNamedColor("Magenta"); // ???

 

Obviously I need to define a text location - but how is this done in a TextLIne?


Viewing all articles
Browse latest Browse all 888

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>