XYZ Class

Object representing coordinates in 3-dimensional space.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBXYZ

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
 NameDescription
Public methodXYZCreates a default XYZ with the values (0, 0, 0).
Public methodXYZ(Double, Double, Double)Creates an XYZ with the supplied coordinates.
Top
Properties
 NameDescription
Public propertyStatic memberBasisXThe basis of the X axis.
Public propertyStatic memberBasisYThe basis of the Y axis.
Public propertyStatic memberBasisZThe basis of the Z axis.
Public propertyItemIndexed access to coordinates.
Public propertyXGets the first coordinate.
Public propertyYGets the second coordinate.
Public propertyZGets the third coordinate.
Public propertyStatic memberZeroThe coordinate origin or zero vector.
Top
Methods
 NameDescription
Public methodAddAdds the specified vector to this vector and returns the result.
Public methodAngleOnPlaneToReturns the angle between this vector and the specified vector projected to the specified plane.
Public methodAngleToReturns the angle between this vector and the specified vector.
Public methodCrossProductThe cross product of this vector and the specified vector.
Public methodDistanceToReturns the distance from this point to the specified point.
Public methodDivideDivides this vector by the specified value and returns the result.
Public methodDotProductThe dot product of this vector and the specified vector.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLengthGets the length of this vector.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsAlmostEqualTo(XYZ)Determines whether this vector and the specified vector are the same within the tolerance (1.0e-09).
Public methodIsAlmostEqualTo(XYZ, Double)Determines whether 2 vectors are the same within the given tolerance.
Public methodIsUnitLengthThe boolean value that indicates whether this vector is of unit length.
Public methodStatic memberIsWithinLengthLimitsValidates that the input point is within Revit design limits.
Public methodIsZeroLengthThe boolean value that indicates whether this vector is a zero vector.
Public methodMultiplyMultiplies this vector by the specified value and returns the result.
Public methodNegateNegates this vector.
Public methodNormalizeReturns a new XYZ whose coordinates are the normalized values from this vector.
Public methodSubtractSubtracts the specified vector from this vector and returns the result.
Public methodToString Gets formatted string showing (X, Y, Z) with values formatted to 9 decimal places.
(Overrides ObjectToString)
Public methodTripleProductThe triple product of this vector and the two specified vectors.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(XYZ, XYZ)Adds the two specified vectors and returns the result.
Public operatorStatic memberDivision(XYZ, Double)Divides the specified vector by the specified value.
Public operatorStatic memberMultiply(Double, XYZ)Multiplies the specified number and the specified vector.
Public operatorStatic memberMultiply(XYZ, Double)Multiplies the specified number and the specified vector.
Public operatorStatic memberSubtraction(XYZ, XYZ)Subtracts the two specified vectors and returns the result.
Public operatorStatic memberUnaryNegation(XYZ)Negates the specified vector and returns the result.
Top
Remarks
Usually this means a point or a vector in 3-dimensional space, depending on the actual use.
See Also