예제 #1
0
        /// <summary>
        /// </summary>
        /// <param name="curve">The curve element which is one arc</param>
        /// <returns></returns>
        private static Autodesk.Revit.DB.Arc GetArcFromArcCurveElement(ModelCurve curve)
        {
            Options gOptions = new Options()
            {
                ComputeReferences = true
            };
            var gElement = curve.get_Geometry(gOptions);

            if (null == gElement)
            {
                return(null);
            }

            foreach (GeometryObject geob in gElement)
            {
                var arc = geob as Autodesk.Revit.DB.Arc;
                if (null != arc)
                {
                    return(arc);
                }
            }

            return(null);
        }