Example #1
0
        GetWorldPlane(Autodesk.Revit.UI.UIApplication app)
        {
            Plane       plane       = app.Application.Create.NewPlane(GeomUtils.kZAxis, GeomUtils.kOrigin);
            SketchPlane sketchPlane = SketchPlane.Create(app.ActiveUIDocument.Document, plane);

            return(sketchPlane);
        }
Example #2
0
 TestGeometry(Autodesk.Revit.UI.UIApplication app)
     : base(app)
 {
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Ellipse", "Hardwire a simple Ellipse", typeof(ModelEllipse), new RevitLookupTestFuncInfo.TestFunc(EllipseHardwire), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Elliptical Arc", "Hardwire a simple Elliptical Arc", typeof(ModelEllipse), new RevitLookupTestFuncInfo.TestFunc(EllipticalArcHardwire), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Create Helix", "Create Helix with Model Curves", typeof(ModelCurve), new RevitLookupTestFuncInfo.TestFunc(CreateHelix), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Build Tower", "Build Tower with Model Curves", typeof(ModelCurve), new RevitLookupTestFuncInfo.TestFunc(BuildTower), RevitLookupTestFuncInfo.TestType.Create));
 }
Example #3
0
        /// <summary>
        /// Add methods to add entities to selected elements or delete them as necessary here.
        /// Note that each method that adds an entity and schema is implemented in a separate class in
        /// .\EStroageSchemaDefinitions.  See EStorageBundle1.cs for an example.
        /// </summary>
        /// <param name="app"></param>
        public TestEStorage(Autodesk.Revit.UI.UIApplication app)
            : base(app)
        {
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Add entity of Schema_1 to the current selection.", "Add entity of Schema_1 to the current selection", typeof(Entity), new RevitLookupTestFuncInfo.TestFunc(AddSchema1andEntity), RevitLookupTestFuncInfo.TestType.Modify));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Add entity of Schema_2 to the current selection.", "Add entity of Schema_2 to the current selection", typeof(Entity), new RevitLookupTestFuncInfo.TestFunc(AddSchema2andEntity), RevitLookupTestFuncInfo.TestType.Modify));

            m_testFuncs.Add(new RevitLookupTestFuncInfo("Delete all EStorage from the document.", "Delete all EStorage from the document", typeof(Entity), new RevitLookupTestFuncInfo.TestFunc(DeleteAllEStorage), RevitLookupTestFuncInfo.TestType.Modify));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Delete all EStorage from the selected elements.", "Delete all EStorage from the selected elements", typeof(Entity), new RevitLookupTestFuncInfo.TestFunc(DeleteAllEStorageFromSelectedElements), RevitLookupTestFuncInfo.TestType.Modify));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Delete all EStorage from the selected elements with prompting.", "Delete all EStorage from the selected elements with prompting.", typeof(Entity), new RevitLookupTestFuncInfo.TestFunc(DeleteAllEStorageFromSelectedElementsWithPrompting), RevitLookupTestFuncInfo.TestType.Modify));
        }
Example #4
0
        public TestImportExport(Autodesk.Revit.UI.UIApplication app)
            : base(app)
        {
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Export to DWG", "Write out a set of Views to DWG format", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(ExportToDwg), RevitLookupTestFuncInfo.TestType.Other));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Export to 2D DWF", "Write out a set of Views to 2D DWF format", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(ExportTo2dDwf), RevitLookupTestFuncInfo.TestType.Other));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Export to 3D DWF", "Write out a set of Views to 3D DWF format", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(ExportTo3dDwf), RevitLookupTestFuncInfo.TestType.Other));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Import DWG", "Import a file of type DWG", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(ImportDwg), RevitLookupTestFuncInfo.TestType.Other));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Import Image", "Import an Image file", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(ImportImage), RevitLookupTestFuncInfo.TestType.Other));

            m_testFuncs.Add(new RevitLookupTestFuncInfo("Publish XML", "Write out an XML file with project data", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(PublishToXML), RevitLookupTestFuncInfo.TestType.Other));
            m_testFuncs.Add(new RevitLookupTestFuncInfo("Snoop XML DOM Document", "Exercise XML DOM API", "Import/Export", new RevitLookupTestFuncInfo.TestFunc(SnoopXML), RevitLookupTestFuncInfo.TestType.Query));
        }
Example #5
0
 TestDocument(Autodesk.Revit.UI.UIApplication app)
     : base(app)
 {
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Delete SelSet", "Delete the current SelSet", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(Delete), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Move SelSet --> (10', 10', 0')", "Move the current SelSet", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(Move), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Rotate SelSet by 45 degrees", "Rotate the current SelSet", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(Rotate), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Load Family", "Load a .rfa file", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(LoadFamily), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Linear Array SelSet (Number = 4)", "Linearly array the current SelSet", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(LinearArray), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Radial Array SelSet by 30 degrees (Number = 4)", "Radially array the current SelSet", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(RadialArray), RevitLookupTestFuncInfo.TestType.Modify));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Linear Array SelSet without associate", "Linearly array the current SelSet without associate", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(ArrayWithoutAssociate), RevitLookupTestFuncInfo.TestType.Modify));
     //m_testFuncs.Add(new RevitLookupTestFuncInfo("Mirror", "Mirror current SelSet", typeof(Revit.Document), new RevitLookupTestFuncInfo.TestFunc(Mirror), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Boundary Lines", "Draw lines to sketch the Room Boundary", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(SketchBoundary), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Room Area", "Insert Area Value textnotes for all available rooms", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(RoomArea), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Filter Element types", "Filter for selected element types", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(FilterElementTypes), RevitLookupTestFuncInfo.TestType.Query));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Add family types and parameters", "Use family manager for adddition of types/params", typeof(Document), new RevitLookupTestFuncInfo.TestFunc(AddFamilyParameterAndType), RevitLookupTestFuncInfo.TestType.Create));
 }
 TestGraphicsStream(Autodesk.Revit.UI.UIApplication app)
     : base(app)
 {
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Graphics Stream (Element, Xform)", "Select an Element and stream out its graphics as Model Lines, offset by an Xform", "Graphics Streams", new RevitLookupTestFuncInfo.TestFunc(GraphicsStreamElementXform), RevitLookupTestFuncInfo.TestType.Create));
     m_testFuncs.Add(new RevitLookupTestFuncInfo("Curtain System to Wireframe", "Convert a Curtain System to Wireframe", "Graphics Streams", new RevitLookupTestFuncInfo.TestFunc(CurtainSystemToWireframe), RevitLookupTestFuncInfo.TestType.Create));
 }