// // (C) Copyright 2003-2013 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // using System; using System.Collections.Generic; using System.Linq; using System.Text; using Autodesk.Revit.DB; using Autodesk.Revit.DB.CodeChecking.Engineering; namespace CodeCheckingConcreteExample.Engine { /// /// Base interface for the main loop class. Parameter of the constructor of the cref="Engine" class. /// public interface IEngineData { /// /// Gets the unit system /// /// cref="DisplayUnit" DisplayUnit GetInputDataUnitSystem(); /// /// Gets number of available threads or processors. /// /// Service data. /// Number of threads int GetNumberOfThreads(Autodesk.Revit.DB.CodeChecking.ServiceData data); /// /// /// Creates user imlementation of cref="ICalculationScenario" which consists list of calculation objects cref="ICalculatinObject". /// /// Instance of base class with common parameters. /// The new instance of cref="ICalculationScenario" ICalculationScenario CreateCalculationScenario(CommonParametersBase parameters); /// /// /// Creates new instance of a class with common parameters. /// /// Acces to cref="ServiceData". /// Instance of base class with common parameters. /// New instance of user implementation of class derived from cref="CommonParametersBase". CommonParametersBase CreateCommonParameters(Autodesk.Revit.DB.CodeChecking.ServiceData data, CommonParametersBase parameters); /// /// Creates new instance of class with list of calculation points. /// /// Acces to cref="ServiceData". /// User object with common parameters. /// Id of an element. /// List of calculation points. List CreateCalcPointsForElement(Autodesk.Revit.DB.CodeChecking.ServiceData data, CommonParametersBase parameters, ElementId elementId); /// /// Creates new instance of user class which represents a section of a structure element. /// /// Instance of base class for the section. /// New instance of user implementation of section class derived from cref="SectionDataBase". SectionDataBase CreateSectionData(SectionDataBase sectionDataBase); /// /// Creates new instance of user class which represents a structure element. /// /// Instance of base class for the element. /// New instance of user implementation of element class derived from cref="ElementDataBase". ElementDataBase CreateElementData(ElementDataBase elementDataBase); /// /// Creates new instance of class with results for the element. /// /// Category of the element. /// Material of the element. /// User result schema object for the element. Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass CreateElementResult(Autodesk.Revit.DB.BuiltInCategory category, StructuralAssetClass material); /// /// Reads calculation parameters from revit data base. /// /// Acces to cref="ServiceData". /// User calculation parameters schema object. Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass ReadCalculationParameter(Autodesk.Revit.DB.CodeChecking.ServiceData data); /// /// Reads parameters of user element label. /// /// Category of the element. /// Material of the element. /// Acces to the Revit storage with labels." /// Acces to cref="ServiceData". /// User label of the element. Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass ReadElementLabel(Autodesk.Revit.DB.BuiltInCategory category, StructuralAssetClass material, Autodesk.Revit.DB.CodeChecking.Storage.Label label, Autodesk.Revit.DB.CodeChecking.ServiceData data); /// /// Verify parameters of user element label. /// /// Category of the element. /// Material of the element. /// Element label." /// Reference to element's status". void VerifyElementLabel(Autodesk.Revit.DB.BuiltInCategory category, StructuralAssetClass material, Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass label, ref Autodesk.Revit.DB.CodeChecking.Storage.ResultStatus status); /// /// Filters list of elements due to e.g. a result status for calculation purposes. /// /// List of user element objects. /// Filtered list of user element objects. List FilterElementForCalculation(List listElementData); /// /// Gives possibility to read data from Revit data base and puts them into user element's objects and into user section's objects and into user common parameters. /// /// List of user element objects. /// User common parameters. /// Acces to cref="ServiceData". void ReadFromRevitDB(List listElementData, CommonParametersBase parameters, Autodesk.Revit.DB.CodeChecking.ServiceData data); /// /// Gives possibility to write data to Revit data base. /// /// List of user element objects. /// User common parameters. /// Acces to cref="ServiceData". void SaveToRevitDB(List listElementData, CommonParametersBase parameters, Autodesk.Revit.DB.CodeChecking.ServiceData data); } }