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

How to get the property values of an object?

$
0
0

Dear all,

Inspecting a graphic object - e.g. a TextLine - I want to list the property values. It's easy to get a list of all the property names. The following

#target framemaker
main ();

function main () {
var j, oDoc = app.ActiveDoc, oObject, oProp;
  oObject = oDoc.FirstSelectedGraphicInDoc;  for (oProp in oObject) {     $.writeln(oProp);   }
}

lists them all. But I want to get the values of these properties, for example BasePointX = 12345678;

How can I do this without writing tons of lines like

$.writeln ("BasePointX = " + oObject.BasePointX);

In many cases objects are still UFOs for me...

 

The reason for my qustion is this:

A TextLine can have the property

  oTextLine.TextLineType = Constants.FV_TEXTLINE_CENTER;

But this changes the BasePointX - although the UI Object Properties dialogue does not reflect the real values!

In the following picture for both TextLines Left = 3.0cm is reported. The second line was created with the above mentioned TextLineType.

I do not find out, how to center a TextLine within a given min/max location.

CenterTextLine.png


Viewing all articles
Browse latest Browse all 888

Trending Articles



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