XYZ
Object representing coordinates in 3-dimensional space.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.XYZ
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class XYZ
The XYZ type exposes the following members.
Constructors
Name
Description
Public Method
XYZ.
Creates a default XYZ with the values (0, 0, 0).
Public Method
XYZ(Double, Double, Double)
Creates an XYZ with the supplied coordinates.
Properties
Name
Description
Public Property
Static Member
BasisX
The basis of the X axis.
Public Property
Static Member
BasisY
The basis of the Y axis.
Public Property
Static Member
BasisZ
The basis of the Z axis.
Public Property
Item
Indexed access to coordinates.
Public Property
X
Gets the first coordinate.
Public Property
Y
Gets the second coordinate.
Public Property
Z
Gets the third coordinate.
Public Property
Static Member
Zero
The coordinate origin or zero vector.
Methods
Name
Description
Public Method
Add
Adds the specified vector to this vector and returns the result.
Public Method
AngleOnPlaneTo
Returns the angle between this vector and the specified vector projected to the specified plane.
Public Method
AngleTo
Returns the angle between this vector and the specified vector.
Public Method
CrossProduct
The cross product of this vector and the specified vector.
Public Method
DistanceTo
Returns the distance from this point to the specified point.
Public Method
Divide
Divides this vector by the specified value and returns the result.
Public Method
DotProduct
The dot product of this vector and the specified vector.
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetLength
Gets the length of this vector.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
IsAlmostEqualTo(XYZ)
Determines whether this vector and the specified vector are the same within the tolerance (1.0e-09).
Public Method
IsAlmostEqualTo(XYZ, Double)
Determines whether 2 vectors are the same within the given tolerance.
Public Method
IsUnitLength
The boolean value that indicates whether this vector is of unit length.
Public Method
Static Member
IsWithinLengthLimits
Validates that the input point is within Revit design limits.
Public Method
IsZeroLength
The boolean value that indicates whether this vector is a zero vector.
Public Method
Multiply
Multiplies this vector by the specified value and returns the result.
Public Method
Negate
Negates this vector.
Public Method
Normalize
Returns a new XYZ whose coordinates are the normalized values from this vector.
Public Method
Subtract
Subtracts the specified vector from this vector and returns the result.
Public Method
ToString
Gets formatted string showing (X, Y, Z) with values formatted to 9 decimal places.
(Overrides Object.ToString.)
Public Method
TripleProduct
The triple product of this vector and the two specified vectors.
Operators
Name
Description
Public Operator
Static Member
Addition(XYZ, XYZ)
Adds the two specified vectors and returns the result.
Public Operator
Static Member
Division(XYZ, Double)
Divides the specified vector by the specified value.
Public Operator
Static Member
Multiply(Double, XYZ)
Multiplies the specified number and the specified vector.
Public Operator
Static Member
Multiply(XYZ, Double)
Multiplies the specified number and the specified vector.
Public Operator
Static Member
Subtraction(XYZ, XYZ)
Subtracts the two specified vectors and returns the result.
Public Operator
Static Member
UnaryNegation(XYZ)
Negates the specified vector and returns the result.
Remarks
Usually this means a point or a vector in 3-dimensional space, depending on the actual use.