Creates a fabrication part element from a fabrication item file.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2019
Syntax
C# |
---|
public static FabricationPart Create( Document document, FabricationItemFile itemFile, ElementId levelId ) |
Visual Basic |
---|
Public Shared Function Create ( _ document As Document, _ itemFile As FabricationItemFile, _ levelId As ElementId _ ) As FabricationPart |
Visual C++ |
---|
public: static FabricationPart^ Create( Document^ document, FabricationItemFile^ itemFile, ElementId^ levelId ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document.
- itemFile
- Type: Autodesk.Revit.DB..::..FabricationItemFile
The fabrication item file.
- levelId
- Type: Autodesk.Revit.DB..::..ElementId
The element identifier associated with the Level the FabricationPart will be created on.
Return Value
The new fabrication part.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The item file is not valid for use in Revit. -or- The item file has not been loaded into the configuration. -or- The ElementId levelId is not a Level. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |