Applies to |
Inserts a copy of the shape at new location.
Object.Duplicate ( method As QfTransformType, v As Point, [angle As Double], [nCopies As Long] ) As ShapeRange
Geometric transformations available with copy (duplicate) operation are:
Displacement: - parallel displacement is applied to selected objects for specified displacement vector. Parameters needed are displacement vector components.
Rotation: - objects are rotated around the specified point for the specified angle. Parameters needed are center of rotation coordinates and angle measured in radians.
Symmetry - objects are mirrored; symmetry line is specified by coordinates of any point on it and the angle (in radians) between the horizontal axis and the symmetry line. Positive value of an angle means counter-clockwise direction. Only one copy can be obtained by symmetrical transformation. If the nCopies parameter has another value, it will be ignored.
With displacement and rotation transformations the nCopies parameter specifies the number of copies. It means that copying operation will be performed several times, each time being applied to the previous result. Default value is nCopies = 1.
The following table clarifies the parameters meaning with various transformation types:
Transformation Type |
Method parameter as QfTransformType constant |
V parameter |
Angle parameter |
Displacement |
qfShift |
Displacement vector |
N/A |
Rotation |
qfRotation |
The center of rotation |
The rotation angle in radians |
Symmetry |
qfMirror |
Coordinates of any point on the symmetry line |
The angle (in radians) between the horizontal axis and the symmetry line. |
The V parameter if omitted is defaulted to the origin (0, 0), and Angle parameter - to zero.