src/Revit/RevitHyparTools/RevitExtensions.cs
/// <summary>
/// Convert the Revit XYZ to an Elements Vector3, with an option to scale the 
/// Vector3 from feet to meters.  This scaling should be done with any XYZ that represents
/// a geometric property, but should maybe be avoided for other vectors.
/// </summary>
Convert the Revit XYZ to an Elements Vector3, with an option to scale the
Vector3 from feet to meters.  This scaling should be done with any XYZ that represents
a geometric property, but should maybe be avoided for other vectors.
Convert the Revit XYZ to an Elements Vector3 with an option to scale the Vector3 from feet to meters . This scaling should be done with any XYZ that represents a geometric property but should maybe be avoided for other vectors .
internal static Vector3 ToVector3(this XYZ xyz, bool scaleToMeters = false)
        {
            var scale = scaleToMeters ? Elements.Units.FeetToMeters(1) : 1.0;
            return new Vector3(xyz.X, xyz.Y, xyz.Z) * scale;
        }
internal static Vector3 ToVector3 ( this XYZ xyz , bool scaleToMeters = false ) { var scale = scaleToMeters ? Elements . Units . FeetToMeters ( 1 ) : 1.0 ; return new Vector3 ( xyz . X , xyz . Y , xyz . Z ) * scale ; }
Convert the Revit XYZ to an Elements Vector3, with an option to scale the
Vector3 from feet to meters.
Convert the Revit XYZ to an Elements Vector3 with an option to scale the Vector3 from feet to meters .
XYZ
this
scaleToMeters
bool