Ejemplo n.º 1
0
        /// <summary>
        /// Utility method to create a truss model curve.
        /// </summary>
        /// <param name="start">The start point.</param>
        /// <param name="end">The end point.</param>
        /// <param name="sketchPlane">The sketch plane for the new curve.</param>
        /// <param name="type">The type of truss curve.</param>
        /// <returns>the created truss model curve.</returns>
        private ModelCurve MakeTrussCurve(Autodesk.Revit.DB.XYZ start, Autodesk.Revit.DB.XYZ end, SketchPlane sketchPlane, TrussCurveType type)
        {
            Line       line       = Line.CreateBound(start, end);
            ModelCurve trussCurve = m_familyCreator.NewModelCurve(line, sketchPlane);

            trussCurve.TrussCurveType = type;
            m_document.Regenerate();

            return(trussCurve);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Utility method to create a truss model curve.
        /// </summary>
        /// <param name="start">The start point.</param>
        /// <param name="end">The end point.</param>
        /// <param name="sketchPlane">The sketch plane for the new curve.</param>
        /// <param name="type">The type of truss curve.</param>
        /// <returns>the created truss model curve.</returns>
        private ModelCurve MakeTrussCurve(Autodesk.Revit.DB.XYZ start, Autodesk.Revit.DB.XYZ end, SketchPlane sketchPlane, TrussCurveType type)
        {
            Line line = m_appCreator.NewLineBound(start, end);
            ModelCurve trussCurve = m_familyCreator.NewModelCurve(line, sketchPlane);
            trussCurve.TrussCurveType = type;
            m_document.Regenerate();

            return trussCurve;
        }