Shape.SetCenter method (Visio)

Moves a shape so that its pin is positioned at the coordinates represented by xPos and yPos. .

Syntax

expression. SetCenter( _xPos_ , _yPos_ )

expression A variable that represents a Shape object.

Parameters

Name Required/Optional Data type Description
xPos Required Double The new x-coordinate of the center of rotation (PinX).
yPos Required Double The new y-coordinate of the center of rotation (PinY).

Return value

Nothing

Remarks

The coordinates represented by the xPos and yPos arguments are parent coordinates, measured from the origin of the shape's parent (the page or group that contains the shape).

The SetCenter method only moves the point, in parent coordinates, about which the shape rotates. It does not change the point, in local coordinates, about which the shape rotates. The overall effect is to move the shape with respect to its parent shape (or the page).

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.