/// <summary> /// constructor /// </summary> /// <param name="commandData"> /// object which contains reference of Revit Application /// </param> public MyDocument(ExternalCommandData commandData) { if (null != commandData.Application.ActiveUIDocument) { m_commandData = commandData; m_uiDocument = m_commandData.Application.ActiveUIDocument; m_document = m_uiDocument.Document; m_views = new List <Autodesk.Revit.DB.View>(); m_wallTypes = new List <WallType>(); m_wallGeometry = new WallGeometry(this); m_wallCreated = false; m_gridGeometry = new GridGeometry(this); // get all the wall types and all the view plans InitializeData(); // get the length unit type of the active Revit document GetLengthUnitType(); // initialize the curtain grid operation type m_activeOperation = new LineOperation(LineOperationType.Waiting); } }
/// <summary> /// constructor /// </summary> /// <param name="geometry"> /// the referred parent geometry of the curtain grid /// </param> public GridDrawing(MyDocument myDoc, GridGeometry geometry) { m_myDocument = myDoc; if (null == geometry) { MessageBox.Show("Error! There's no grid information in the curtain wall."); } else { m_geometry = geometry; m_coordinates = new GridCoordinates(myDoc, this); m_uGridLines2D = new List<GridLine2D>(); m_vGridLines2D = new List<GridLine2D>(); m_boundLines2D = new List<GridLine2D>(); m_uLinePathList = new List<GraphicsPath>(); m_uSegLinePathListList = new List<List<GraphicsPath>>(); m_vSegLinePathListList = new List<List<GraphicsPath>>(); m_vLinePathList = new List<GraphicsPath>(); m_boundPath = new List<GraphicsPath>(); m_drawObject = new DrawObject(); } }