Given the reference frame to add to the transform to, the type of transformation to be added, and any information required for the transformation, adds a transformation object to the Transformation object container in the data model.
Returns an error if used when ReferenceFrame.Option is set to Automatic.
Not all parameters are required for every transformation. For details, see Essential Keyword Arguments and Optional Keyword Arguments.
When created, the transformation is added to the end of the TransformationOrder list for the reference frame.
Cannot be run after participants have started.
Returns the name of the transformation added.
For more information on the object created, see Transformation.
Essential Keyword Arguments
- ReferenceFrame : string
String indicating the name of the reference frame to which the transformation will be added.
- TransformationType : string
String indicating the type of transformation to be added.
Available options are
Translation
andRotation
.Note: Rotation transformations have a default unit of radians.
Optional Keyword Arguments
- Angle : object
Object indicating the angle to rotate a reference frame.
Required when the TransformationType is
Rotation
.Default unit is
Radians
.- Axis : str
String indicating the axis about which a rotation is applied.
Required when the TransformationType is
Rotation
.Available options are:
XAxis
,YAxis
,Zaxis
, andUserDefined
.- Vector : object
Object indicating a vector.
Required when TransformationType is
Translation
.Required when TransformationType is
Rotation
and Axis isUserDefined
.
Return Type
String
Examples
Example 20: Add a transformation
AddTransformation( ReferenceFrame='Frame-1', TransformationType='Rotation', Axis='XAxis', Angle='7 [deg]') 'Rotation-3'