Vector Object
Description
The Vector object. For more information, see the
Transient Geometry overview.
Methods
AddVector |
Add the specified vector to this vector. |
AngleTo |
Determines the angle between this vector and the specified vector. |
AsUnitVector |
Get the unit vector equivalent of this vector normalized. |
Copy |
Creates a copy of this Vector object. The result is entirely independent and can be edited without affecting the original Vector object. |
CrossProduct |
Determine the cross product between this vector and the specified vector. |
DotProduct |
Determine the dot product of this vector to the specified vector. |
GetVectorData |
Get the data defining this vector. |
IsEqualTo |
Compare this vector for equality to the specified vector. |
IsParallelTo |
Determine if this vector is parallel to the specified vector. |
IsPerpendicularTo |
Determine if this vector is perpendicular to the specified vector. |
Normalize |
Normalize this vector to result in a length equal to 1.0. |
PutVectorData |
Method that sets the data defining this vector. |
ScaleBy |
Scale this vector by the specified scale factor. |
SubtractVector |
Subtract the specified vector from this vector. |
TransformBy |
Transform this vector by the specified matrix. |
Properties
Length |
Get the length of this vector. |
X |
Specifies the X coordinate of the vector. If not supplied, the X value will default to 0. |
Y |
Specifies the Y coordinate of the vector. If not supplied, the Y value will default to 0. |
Z |
Specifies the Z coordinate of the vector. If not supplied, the Z value will default to 0. |
Accessed From
DerivedPartCoordinateSystemDef.GetCoordinateSystem,
DSLoadDefinition.Vector,
EllipseFull.MajorAxisVector,
EllipticalCone.MajorAxisVector,
EllipticalCylinder.MajorAxisVector,
HoleTapInfo.ThreadDirection,
Light.Direction,
Matrix.GetCoordinateSystem,
Matrix.Translation,
OrientedBox.DirectionOne,
OrientedBox.DirectionThree,
OrientedBox.DirectionTwo,
OrientedBox.GetOrientedBoxData,
Point.VectorTo,
PresentationTweak.Translation,
RegionProperties.PrincipalAxes,
StandardThreadInfo.ThreadDirection,
TaperedThreadInfo.ThreadDirection,
ThreadInfo.ThreadDirection,
TransientGeometry.CreateVector,
UnitVector.AsVector,
Vector.Copy,
Vector.CrossProduct
Samples
SurfaceBody Copy |
This sample demonstrates copying a surface body from one part to another. This is equivalent to the Promote command, but the API is much more flexible. In order for the sample to be self-contained, it creates two parts on the fly that will be used to demonstrate copying a body from one part to another. When copying a body into a part, you provide the surface body and a matrix to define its position in the new part. This sample creates a matrix based on the position of these parts within an assembly. |
OnDrag Event - dragging a WorkPoint |
This sample demonstrates the use of the OnDrag event to drag fixed work points when no command is active. This sample only allows drags parallel to the X-Y plane. This sample is dependent on events and VB only supports events within a class module. |
Version
Introduced in version 4