Autodesk.AutoCAD.DatabaseServices Namespace > Entity Class > Entity Methods > MoveStretchPointsAt Method
Entity.MoveStretchPointsAt Method
Description

 

 

Function usage

This function is intended to be called by AutoCAD during execution of a stretch command in which the entity has been selected. However, it is certainly possible for ObjectARX applications to call this function. 

A call of this function should be preceded by a call to the entity's GetStretchPoints() method in order to obtain the valid stretch points and the order they come in which is then used to determine the index values to be passed in within the indices array. 

The offset vector indicates the direction and magnitude of the translation to be applied to the stretch points specified in indices. 

The end result will be that this function will modify the entity in whatever way it deems appropriate so that the stretch points identified by the index values in indices are moved the direction and magnitude of the offset vector. 

 

Function implementation in derived classes

This function must modify the entity such that the stretch points identified by the indices array are translated to the direction and magnitude specified by the offset vector (which is in WCS coordinates). How this affects the rest of the entity is, of course, dependent on the entity, but any other effects must also be taken care of by this function since this is the function that is expected to do all entity modifications that result from the stretch operation. 

If this function is implemented in a derived class, then the GetStretchPoints() method must also be implemented because the index values within the indices array represent the 0-based index of the stretch points appended to the array passed into the GetStretchPoints() method. So a value of 0 in the indices array corresponds to the first point that the GetStretchPoints() method appended to the array passed into it, a value of 1 in the indices array corresponds to the second point the GetStretchPoints() method appended, etc. So, for example, if the first and third points the GetGripPoints() appended are to be "stretched" by the stretch operation, then the indices array would have two elements: the first would be 0 and the second would be 2. 

Because of the dependence of this function on the points appended by the GetStretchPoints() method, it is absolutely essential that this function know exactly what points are reported by the GetStretchPoints() method and the order they are reported in (that is, the order they are appended to the array passed into the GetStretchPoints() method). 

 

Default implementation

Calls the entity's Entity.TransformBy() method with a transformation matrix that translates the entire entity by offset. It then returns whatever status the TransformBy() method returns.

Visual Basic
Public Function MoveStretchPointsAt(
    indices As IntegerCollection, 
    offset As Vector3d
) As void
C#
public void MoveStretchPointsAt(
    IntegerCollection indices, 
    Vector3d offset
);
Parameters
Parameters 
Description 
IntegerCollection indices 
Input array containing index values (which correspond to stretch points reported by the GetStretchPoints() method) that indicate which stretch points are being translated 
Vector3d offset 
Input vector (in WCS coordinates) indicating the direction and magnitude that the stretch points have been translated 
Links
   Comments?