This content has been marked as final. Show 2 replies
Examining the options for rules on your screen would help you. The numbers returned match those given in the interface, and if you need per-page rules in the interface, you'd change them.
Since this is for a script, you can
* store the current setting of the rules in a variable
* set it to your needs
* do measurements, object placement
* restore to the old setting.
That way the script doesn't (permanently) change settings the user would have set by himself.
The script options for rulers allow the same choices as in the UI:
"RulerOrigin.SPREAD_ORIGIN The zero point is at the top-left corner of the spread and the ruler increments continuously across all pages of the spread.
RulerOrigin.PAGE_ORIGIN The top-left corner of each page is a new zero point on the horizontal ruler.
RulerOrigin.SPINE_ORIGIN The zero point is at the top-left corner of the left-most page and at the top of the binding spine. The horizontal ruler measures from the leftmost page to the binding edge, and from the binding spine through the right edge of the right-most page. Also locks the zero point and prevents manual overrides."
Thank you very much for your suggestion. The issue was resolved when I set the view preferences to RulerOrigin.Page_Origin.
Thank you once again :)