Пример #1
0
        /// <summary>
        /// Set Solid In View
        /// </summary>
        /// <param name="rebarContainer">Rebar Container</param>
        /// <param name="view">3D View</param>
        /// <param name="solid">Solid</param>
        public static void SetSolidInView(RebarContainer rebarContainer, Revit.Elements.Views.View3D view, bool solid)
        {
            Autodesk.Revit.DB.Document document = DocumentManager.Instance.CurrentDBDocument;
            TransactionManager.Instance.EnsureInTransaction(document);

            Autodesk.Revit.DB.Structure.RebarContainer rebarElement = (Autodesk.Revit.DB.Structure.RebarContainer)rebarContainer.InternalElement;
            Autodesk.Revit.DB.View3D viewElement = (Autodesk.Revit.DB.View3D)view.InternalElement;
            rebarElement.SetSolidInView(viewElement, solid);

            TransactionManager.Instance.TransactionTaskDone();
        }
Пример #2
0
        /// <summary>
        /// Set Solid In View
        /// </summary>
        /// <param name="rebarContainer">Rebar Container</param>
        /// <param name="view">3D View</param>
        /// <param name="solid">Solid</param>
        public static void SetSolidInView(RebarContainer rebarContainer, Revit.Elements.Views.View3D view, bool solid)
        {
            Autodesk.Revit.DB.Document document = DocumentManager.Instance.CurrentDBDocument;
            TransactionManager.Instance.EnsureInTransaction(document);

            Autodesk.Revit.DB.Structure.RebarContainer rebarElement = (Autodesk.Revit.DB.Structure.RebarContainer)rebarContainer.InternalElement;
            Autodesk.Revit.DB.View3D viewElement = (Autodesk.Revit.DB.View3D)view.InternalElement;
            rebarElement.SetSolidInView(viewElement, solid);

            TransactionManager.Instance.TransactionTaskDone();
        }