Move the object by the "reference Point".

I need to move the images on my document using different reference points. But it seems that by default, it moves using the 'AnchorPoint.TOP_LEFT_ANCHOR '. I can't change it.

Here is my code:

myDoc var = app.activeDocument;

var changeRefPoint = app.activeWindow.transformReferencePoint = AnchorPoint.TOP_RIGHT_ANCHOR;

if(MyDoc.Selection.Length == 1)

{

If (app.selection [0].constructor.name == "Rectangle")

{

var rectangle_graph = app.selection [0].move([159,61.3]);

}

}

Hi Ken0207,

I'm afraid that the setting of PageItem.move (in, in) is always top-left-anchor parent, regardless of the current transformReferencePoint.

I can't test it in depth, but the following function should do the job:

function moveToConsideringAnchor(obj, xyDest, anchorPt)
// -------------------------------------
//       :  any singular PageItem specifier
//    :  [x,y] location expressed in the current ruler space
//  :  the considered AnchorPoint (default is top-left)
{
    if( !(obj && obj.transform) ) return;

    var CS_PASTEBOARD = CoordinateSpaces.pasteboardCoordinates;

    anchorPt || (anchorPt=AnchorPoint.topLeftAnchor);

    var xy0 = obj.resolve(anchorPt,CS_PASTEBOARD)[0],
        xy1 = obj.resolve([xyDest, anchorPt],CS_PASTEBOARD,true)[0],
        dx = xy1[0]-xy0[0],
        dy = xy1[1]-xy0[1];

    obj.transform(CS_PASTEBOARD,[0,0],[1,0,0,1,dx,dy]);
}

// ---
// SAMPLE CODE
// ---

// Your settings:
var CONSIDERED_ANCHOR = AnchorPoint.BOTTOM_RIGHT_ANCHOR,
    XY_DESTINATION = [159,61.3]; // in ruler space

var sel = (1==app.selection.length) && app.selection[0];

if( sel instanceof Rectangle )
    {
    moveToConsideringAnchor(sel, XY_DESTINATION, CONSIDERED_ANCHOR);
    }

@+

Marc

Tags: InDesign

Similar Questions

  • Set the reference point for several objects in the middle of the document

    Hello community,

    I want to mirror a layout.

    I: Yes

    1. Select all objekts

    2. set the benchmark in the Middle

    3. objects in mirror

    BUT

    The reference point is in the middle of all the OBJECTS. This led to several objects across the border into my document because the layout is not spread out on a regular basis.

    I want through the DOCUMENT will be the point of reference. How can I do?

    Thank you

    Christian

    Have you fiugured this out yourself?

    I just played a little and found a method, but it is not really intuitive. Select the object, then go to the rotation tool. The center of rotation must be defined as one of the handles of transformation, but you can drag it anywhere you like, then move until you want as the center of your mirror. Hold down the Opt/Alt key and click on the button to create a mirrored copy. The objects original reflects their position around the reference repositioned without the modifier key.

  • HOW TO MOVE THE FLAG POINT MAP, MIRCOSOFT 2013

    HOW TO MOVE THE FLAG POINT MAP, MIRCOSOFT 2013

    Hello

    It is not a Community Forum for MapPoint.

    Ask here

    Highway, Streets & Trips, MapPoint Forum:
    http://social.Microsoft.com/forums/en-us/streetsandtrips/threads

    Other Support options (not free)

    Support for MapPoint, streets & trips and Highway:
    http://support.Microsoft.com/ph/851

    Don

  • How to move the insertion point from editText ScriptUI?

    Hello.

    How to move the insertion point from editText ScriptUI?

    Please tell me the JS code.

    Thank you.

    I don't think you can. You can control the selection of text in an editText widget, but not the position of the insertion point.

  • How we move the top point of the triangle down without shift 2 low points!

    Hello

    I'm doing my own logo... (trial and error)... and the need to move the top point of the triangle down without the 2 basis points on the way down!  Have been to him for a long time but the basis of 2 points to continue moving down for.

    It's actually a small square with a triangle roof - House, but the roof is too high.   Very simple things, but the basic points is still moving down!

    Would like to know how to do it!

    Thank you!

    Tania (U.K)

    If still in trouble, download a screen shot of your form with all points of view.  How did you produce the form?  You could either use the polygon tool with set on 3 sides, or a more convoluted process, is to use the pen tool to draw the shape.  Then with the resultant Workpath selected in the Trace Panel, go layer > fill new layer > solid color. This produces a new layer of the shape of your workpath.

  • I can't move the anchor points on a shape, I've drawn with the pen tool.  There are also small circles with a point in them (think focus), who they are and they are part of my problem.  If I open a new document and draw randomly everything is good, no foc

    I can't move the anchor points on a shape, I've drawn with the pen tool.  There are also small circles with a point in them (think focus), who they are and they are part of my problem? If I open a new document and draw randomly everything is good, no anchor and focus points behave.

    Bubble icons are the widgets corner. You can drag inward to round the corner. They are not part of your problem. If you want to hide them, select view > hide corner Widget. I have a hotkey defined for this menu item.

    If you see multiple bullseyes, you may have your set with the shape selected, that would prevent you from being able to move individual anchor points. Deselect the shape first, and then move the anchor with the direct Selection tool.

  • Free transform: drag the reference point?

    So when you use the transform tool it has a button to change the reference point at 9 different locations. But I need set the reference point at a specific location in the image. Can't I put manually, by dragging or something?

    While you can do in the full version of photoshop elements

    does not seem to allow for this.

    MTSTUNER

  • Tecra S1: Move the mouse pointer

    From time to time my mouse pointer moves slowly upward or sideways. This happens once anchored and when not docked. In the latter case, I have an external mouse not attached.

    This problem is really annoying, especially when you try to hit a box for example.

    Any ideas?

    See you soon

    seasack

    Hi seasack

    If you use the pointer internal (the stick between GH and B), it is very common that the ca of pointer starts to move.
    The reason is a bit technical but very understandable.
    The mouse pointer works like a small joystick. Means that it is that you push forward, down, sideways and so on. However, please check the HOUSE or 0-position from time to time. When you're not, this would be a normal position of the HOUSE for us but it doesn't.
    It is therefore possible that it may be wrong to believe that the position of the HOUSE is when you push forward.
    If you stand and do not change the position of the needle for (I think) 2 separate controls the position of the HOUSE, this position will then be the new post HOME until the next time he finds another.
    Actual cases is not that extreme, of course, but more normal cases are that you bend your finger on the pointer when for example reading something on the screen. The pointer can recognize as a small boost, and if you do go, then he could have a new position of the HOUSE and start to drift or it could be "heavy" feeling in a certain direction.
    The solution? Simple! Leave it on for about 5 seconds and it will go away.

    If you have this problem, even if your not even using the pointer, then I guess you have a hardware problem.
    Try disabling the internal mouse by pressing FN + F9.

    Good luck

    Tom

  • move the data points on the waveform display

    Hello

    No idea why the waveform display to my VI has shift the data points? The third tab of the screen does not display this problem. I took a video of what happens to better illustrate what I'm talking about and attached my VI to identify the problem.

    I am currently a sample of data from a DAQmx and storing in a queue until data backup button. Everything works well, but the problem is the display of actual data, which, although sense points, it shows move in a small area around where they are drawn in the first place. It happens even when I erase the visible data and restart the collection of data, as shown in the video.

    Thanks for any help you may be able to provide.

    Guy

    The amount of data you draw? If you draw a lot more datapoints that there are pixels on the x-axis of the graph, you can get peaks that appear to move because of graphic interpolation LabVIEW has to do.

    Mike...

  • Can I move the anchor Point for the adjustment brush in ACR CS5

    There has never been a problem before, but the anchor point for the adjustment in ACR brush is sitting exactly where I need to see what is happening.  I can delete and start over, but if there is a way to move or hide the anchor in stil be able to adjust the setting, it would be useful to know for the next time it happens.

    You can press the V key to toggle the power switch pins.

  • Cannot move the anchor point?

    I use CS4.

    When I try to select an anchor point, the actions I take immediately highlight the position and position - not the anchor. I use the selection tool - is not serious if I select the layers or via screen - same thing happens.

    Any thoughts?

    Thank you!

    If you use the Pan behind tool (keyboard shortcut is the key there) and enter the anchor point, the anchor moves relative to the layer, but does not move the apparent position of the layer in the composition. If you check the position values in the timeline panel, you will see that they change when you drag the anchor around the layer.

    If you enter values of anchor point in the timeline panel, the relative position of the layer seems to be moving in the composition window, but the position of the values do not change because the position of the anchor point is not mobile at the composition level.

    The value of the position of a layer is always the position of the anchor from the composition. The value of the anchor point is the position of the anchor relative to the layer. Rotation and scale centered around the anchor point of the two.

    I hope this helps.

  • Move the center point to the triangles.

    I'm trying to get a triangle to turn in place,

    but the central point of the coast is not centered!

    I can move it? Other solutions?

    The triangle in the Center IS lining up vertically. When you align Flash-shaped, it calculates the position relative to the rectangle enclosing.

    If you want to center around what is mathematically one of the centres of the triangle, you need to adjust that manually. Are there any tools for this.

    If you want to create equilateral triangles, you can consider a circle (shift + click & drag), then a triangle in the same Center, which become a symbol, then remove circle encompassing.

  • Cannot move the anchor points using the Subselection tool? (CS5)

    Hey.
    I experienced an intermittent problem in Flash CS5, where sometimes I can't push anything using the Subselection tool. Sometimes, I can, but most of the time I can't and I don't know why.

    I can still click-and - drag points (or multiple points/paths), but I can't push the keyboard.

    Any ideas?

    My guess is that the item is grouped and you are inside the publishing group? For some reason any in this case you cannot move the points in this way.

    Separate the Group and try again. Sorry that's the only answer I know.

  • direct selection - move the anchor points with the arrow keys of the keyboard

    Hello

    I use Illustrator CC.  I just use the image tracking tool to create a version vector of my company logo.  It worked pretty well, but now I'm just trying to clean it up a bit.  I have a few anchor points that I want to just push upwards or downwards into the smallest possible increment.

    I think it would be easier for me to do using the arrow keys on the keyboard instead of the mouse, but the arrows cause my selected anchor point to jump in too large a distance way.  I checked to make sure that the bearings commented, snap to grid and snap to Point are all extinct.  I don't see anything else to do.

    Can someone tell me which control how the keyboard arrow keys will move an anchor point, and how can I fix this to the smallest possible distance?

    Thanks in advance,
    Paul

    General Prefs, area keyboard Increments. Have something you need.

    Then use Nudge (up, down, left, right arrow).

  • Symbol keyboard microphone moves the decimal point

    For me, in what is a decision rather b-o-n-e-head, the microphone on the virtual keyboard symbol has moved the comma, which means you need to perform additional keystrokes to use the ',' in your texts. To take such a well-used symbol and remove the front keyboard was stupid, and I find myself hitting the symbol micro out of force of habit of the comma, having been here for 5 months. The microphone symbol SHOULD have been on the page ALT.

    Is the anyway to configure the keyboard to put the comma? I find the microphone quite unnecessary because the decoding of voice does well beyond a few simple, such words when searching. Try to dictate an entire sentence and see what I mean. Or, dictate an entire sentence, and then take a "communication error, try again" only to have to dictate again.

    I want the rear comma. Put the microphone on the ALT page, not the front. The comma is used all the time, the microphone is NOT.

    Good news, you can have the comma to return! Go to settings > language & keyboard > keyboard Android and then uncheck the box for voice input. And there's your comma

Maybe you are looking for