This is the main form for user to operate the Rebar creation.
Inheritance: System.Windows.Forms.Form
Beispiel #1
0
        /// <summary>
        /// Present the main dialog for user to prepare the parameters for Rebar creation,
        /// and after that if user click the OK button, a new Rebar will be created.
        /// </summary>
        public void Execute()
        {
            using (NewRebarForm form = new NewRebarForm(m_rvtUIDoc.Document))
            {
                if (DialogResult.OK == form.ShowDialog())
                {
                    RebarBarType barType  = form.RebarBarType;
                    RebarShape   barShape = form.RebarShape;

                    List <Autodesk.Revit.DB.XYZ> profilePoints = m_geometryData.ProfilePoints;
                    Autodesk.Revit.DB.XYZ        origin        = profilePoints[0];
                    Autodesk.Revit.DB.XYZ        yVec          = profilePoints[1] - origin;
                    Autodesk.Revit.DB.XYZ        xVec          = profilePoints[3] - origin;

                    m_createdRebar = Rebar.CreateFromRebarShape(m_rvtUIDoc.Document, barShape, barType, m_rebarHost, origin, xVec, yVec);

                    LayoutRebar();
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Present the main dialog for user to prepare the parameters for Rebar creation,
        /// and after that if user click the OK button, a new Rebar will be created.
        /// </summary>
        public void Execute()
        {
            using (NewRebarForm form = new NewRebarForm(m_rvtUIDoc.Document))
            {
                if (DialogResult.OK == form.ShowDialog())
                {
                    RebarBarType barType = form.RebarBarType;
                    RebarShape barShape = form.RebarShape;

                    List<Autodesk.Revit.DB.XYZ> profilePoints = m_geometryData.ProfilePoints;
                    Autodesk.Revit.DB.XYZ origin = profilePoints[0];
                    Autodesk.Revit.DB.XYZ yVec = profilePoints[1] - origin;
                    Autodesk.Revit.DB.XYZ xVec = profilePoints[3] - origin;

                    m_createdRebar = Rebar.CreateFromRebarShape(m_rvtUIDoc.Document, barShape, barType, m_rebarHost, origin, xVec, yVec);

                    LayoutRebar();
                }
            }
        }