Esempio n. 1
0
        /// <summary>
        /// create beam system according to given profile and property
        /// </summary>
        public void CreateBeamSystem()
        {
            Autodesk.Revit.Creation.Document docCreation = m_data.CommandData.Application.ActiveUIDocument.Document.Create;
            // create CurveArray and insert Lines in order
            CurveArray curves = new CurveArray();

            foreach (Line line in m_data.Lines)
            {
                curves.Append(line);
            }
            // create beam system takes closed profile consist of lines
            BeamSystem aBeamSystem = docCreation.NewBeamSystem(curves, m_data.CommandData.Application.ActiveUIDocument.Document.ActiveView.SketchPlane);

            // set created beam system's layout rule and beam type property
            aBeamSystem.LayoutRule = m_data.Param.Layout;
            aBeamSystem.BeamType   = m_data.Param.BeamType;
        }