Example #1
0
        /// <summary>
        /// Construct a Revit CurveByPoints Element (a CurveElement) from a collection of ReferencePoint's
        /// </summary>
        /// <param name="curve"></param>
        /// <returns></returns>
        public static CurveByPoints ByReferencePoints(ReferencePoint[] points, bool isReferenceLine = false)
        {
            if (points.Count() < 2)
            {
                throw new Exception("Cannot create Curve By Points with less than two points.");
            }

            return new CurveByPoints(points.Select(x=>x.InternalReferencePoint), isReferenceLine);
        }