/// <summary> /// default constructor /// </summary> /// <param name="wallGeo"> /// the mapped wall geometry information /// </param> public WallDrawing(WallGeometry wallGeo) { m_coordinateFont = new Font("Verdana", 10, FontStyle.Regular); m_wallLine2D = new WallBaseline2D(); m_myDocument = wallGeo.MyDocument; m_refGeometry = wallGeo; }
/// <summary> /// constructor /// </summary> /// <param name="myDoc"> /// store the document of this sample /// </param> public GridForm(MyDocument myDoc) { m_myDocument = myDoc; if (null == m_myDocument.UIDocument) { this.Close(); } InitializeComponent(); InitializeCustomComponent(); }
/// <summary> /// constructor /// </summary> /// <param name="myDoc"> /// the document of this sample /// </param> /// <param name="drawing"> /// the GridDrawing data used in the dialog /// </param> public GridCoordinates(MyDocument myDoc, GridDrawing drawing) { m_myDocument = myDoc; if (null == drawing) { TaskDialog.Show("Revit", "Error! There's no grid information in the curtain wall."); } m_drawing = drawing; drawing.Coordinates = this; }
/// <summary> /// constructor /// </summary> /// <param name="myDoc"> /// the document of the sample /// </param> public GridGeometry(MyDocument myDoc) { m_myDocument = myDoc; m_commandData = myDoc.CommandData; m_activeDocument = myDoc.Document; m_gridProperties = new GridProperties(); //m_activeGrid = grid; m_drawing = new GridDrawing(myDoc, this); m_uGridLines = new List <CurtainGridLine>(); m_vGridLines = new List <CurtainGridLine>(); m_GridVertexesXYZ = new List <Autodesk.Revit.DB.XYZ>(); }
/// <summary> /// The entrance of this example, implements the Execute method of IExternalCommand /// </summary> #region IExternalCommand Members Implementation /// <summary> /// Implement this method as an external command for Revit. /// </summary> /// <param name="commandData">An object that is passed to the external application /// which contains data related to the command, /// such as the application object and active view.</param> /// <param name="message">A message that can be set by the external application /// which will be displayed if a failure or cancellation is returned by /// the external command.</param> /// <param name="elements">A set of elements to which the external application /// can add elements that are to be highlighted in case of failure or cancellation.</param> /// <returns>Return the status of the external command. /// A result of Succeeded means that the API external method functioned as expected. /// Cancelled can be used to signify that the user cancelled the external operation /// at some point. Failure should be returned if the application is unable to proceed with /// the operation.</returns> public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements) { MyDocument myDoc = new MyDocument(commandData); using (GridForm gridForm = new GridForm(myDoc)) { // The form is created successfully if (null != gridForm && false == gridForm.IsDisposed) { gridForm.ShowDialog(); } } return(Autodesk.Revit.UI.Result.Succeeded); }
/// <summary> /// default constructor /// </summary> /// <param name="myDoc"> /// the document of the sample /// </param> public WallGeometry(MyDocument myDoc) { m_myDocument = myDoc; m_drawing = new WallDrawing(this); }