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

 

 

Function usage

This function provides a means by which AutoCAD and ObjectARX applications can ask the entity to apply a transformation matrix (xform) to itself. 

Each entity class must implement this function, so restrictions on what types of transformations are supported are up to the implementer of the entity class. The AutoCAD built-in entity classes for entity types that existed before R13 (such as Circle, Line, Arc, 2dPolyline, etc.) require that the transformation matrix represent a uniformly scaling orthogonal transformation. Other AutoCAD built-in classes have no restrictions. 

 

Function implementation in derived classes

This function must apply the transformation matrix xform to the entity and change the entity's state to reflect the transformation. It is completely up to the implementer as to how to apply the transformation. It is also up to the implementer to decide what, if any, restrictions will be placed on the type of transformations supported. If any restrictions are desired, then it's up to the implementation of this function to enforce them. 

If your derived class implements TransformBy() without calling the base class, you must call DBObject.XDataTransformBy() or your Xdata will not be transformed. 

 

Note If this method is not overridden, then AutoCAD commands such as MOVE, ROTATE, SCALE, etc. will have no effect on entities of this class. 

Visual Basic
Public Function TransformBy(
    transform As Matrix3d
) As void
C#
public void TransformBy(
    Matrix3d transform
);
Parameters
Parameters 
Description 
Matrix3d transform 
Input transformation matrix to be applied to the entity 
Links
   Comments?