Copy link to clipboard
Copied
Hello
I have a script which rotates an object (textframe) with object style "Signs" applied to it.
Script is working fine except that it requires Center point of the Proxy Refernce point to be activated. Therefore I would like incorporate that in the script itself. How do I do that ?
I have attached a screenshot of what I want to set.
Thanks
Try this—sets the Transform panel ref pont for the front window (not the application):
app.windows[0].transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#LayoutWindow.html#d1e57100
Copy link to clipboard
Copied
Hi @Bedazzled532, please have a look at my script answering this question. You can see that I do the rotation using a matrix, from AnchorPoint.centerAnchor, which is I think what you are asking. Let me know if I haven't understood correctly.
- Mark
Copy link to clipboard
Copied
Hello @m1b
Thanks for the reply. What I want is bit different.
I want to set the point of my choice before rotation or moving or doing any kind of transformation. After I am done with it, I want to set it back to what it was.
I checked indesignjs.de site but I am not able to find the exact option where I can set that proxy.
Copy link to clipboard
Copied
Hi @Bedazzled532, as far as I know, there is no property of page items for what you are talking about. What is your actual need? eg. do you want to rotate or scale a page item around a particular point? This is possible.
- Mark
Copy link to clipboard
Copied
Try this—sets the Transform panel ref pont for the front window (not the application):
app.windows[0].transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#LayoutWindow.html#d1e57100
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ok I found a way to save it.
var myPoints = app.windows[0].transformReferencePoint;
app.windows[0].transformReferencePoint = AnchorPoint.CENTER_ANCHOR;
...... some code ......
app.windows[0].transformReferencePoint = myPoints; //to revert back
Copy link to clipboard
Copied
As a piece of advice - in this case, do not use "s" at the end of the variable name - it's a variable holding single value, not an array or collection.
Better yet - use much more descriptive name - like myTransfRefPt - or something like that.
It will help you to better understand your code - after some time. Or when you share it with someone.
"myPoints" suggests that it's an array or collection of Points.
Copy link to clipboard
Copied
@Robert at ID-Tasker Thanks for the suggestion. I will keep that in mind.
Copy link to clipboard
Copied
It can also be set for the Document.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more