This content has been marked as final. Show 5 replies
app.layoutWindows.transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.TOP_LEFT_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.BOTTOM_LEFT_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.BOTTOM_CENTER_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.LEFT_CENTER_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.CENTER_ANCHOR;
app.layoutWindows.transformReferencePoint = AnchorPoint.RIGHT_CENTER_ANCHOR;
How does it fail? Moving the object using the bottom right anchor yields the same effect, shouldn't it?
For [object].flip and [object].transform you have to specify an anchor point, and that seems logical, as you can flip and/or rotate around any of the corners, but for move it seems obsolete.
But changing the anchor point won't affect the behavior of the move command. It always moves the top-left to the point you specify. You have to work out the geometry yourself.
Thanks for everyone's response. I will try to better explain. I have different templates, one for each stamp (rubber stamp) size. Depending on the size of the stamp the number of columns and rows on the template maybe different. The stamps are text boxes treaded together. I create the tagged text file to import the stamps. The problem yesterday was with a template that has 2 textframes that are rotated 90 degrees and 3 textframes that are rotated 0 degrees (5 stamps on template). After the stamps are edited I use a script to create the labels that go on the stamp handles. The script copies the stamps to a new page using the duplicate command, if the stamp is rotated it puts it back to 0 rotation. After duplicated the stamps it then moves them to fit on the page of labels, then uses the transform command to reduce them to fit on the label.
The problem is on the ones that are rotated 90 degress it some times uses the Top Right instead of Top Left (the textframes may have artwork added to the frame, then grouped). Below is the code used for the move.
Rem MOVE STAMPS TO LABEL LOCATION FUNCTION
Function myMoveStamps (myLabelDocument, myLabelCols, myLabelRows, myLabelStartX, myLabelStartY, myLabelWidth, myLabelHeight, myLabelHorizontalSpace, myLabelVerticalSpace, myLabelPercent, myLabelHorizontalOffSet, myLabelVerticalOffSet, myMountNumber)
K = 0
For I = 1 to myLabelCols
For J = 1 to myLabelRows
K = K + 1
If K <= cInt(myMountNumber) Then
Set myCurrentObject = myLabelDocument.PageItems.item(cStr(K))
myObjectBounds = myCurrentObject.GeometricBounds
myObjectWidth = myObjectBounds(3) - myObjectBounds(1)
myObjectHeight = myObjectBounds(2) - myObjectBounds(0)
myLabelX = myLabelStartX + (myLabelWidth / 2) - (myObjectWidth / 2) + ((I-1) * myLabelHorizontalSpace) + myLabelHorizontalOffSet
myLabelY = myLabelStartY + (myLabelHeight / 2) - (myObjectHeight / 2) + ((J-1) * myLabelVerticalSpace) + myLabelVerticalOffSet
myCurrentObject.move Array(myLabelX + 2, myLabelY)
set myScaleMatrix = myInDesign.TransformationMatrices.Add(cDbl(myLabelPercent), cDbl(myLabelPercent))
myCurrentObject.Transform idCoordinateSpaces.idPasteboardCoordinates,idAnchorPoint.idCenterAnchor, myScaleMatrix
I think I have found the solution listed below.
myRotation = myCurrentObject.AbsoluteRotationAngle
If myRotation <> 0 Then
myLabelX = myLabelX + myObjectWidth