Imports a Green-Building XML file into the document.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- file
- Type: SystemString
Full path of the file to import. File must exist.
- options
- Type: Autodesk.Revit.DBGBXMLImportOptions
Various options applicable to GBXml import. If a null reference (Nothing in Visual Basic), all options will be set to their respective default values.
Return Value
True if successful, otherwise False.Remarks
This method is available only in MEP. Though the 'options' argument is not currently used, an object still must be provided (may be a null reference (Nothing in Visual Basic)). The method will return False if not succeed. e.g when the input xml file does not contain any result elements.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentNullException | Thrown when file argument is a null reference (Nothing in Visual Basic) or empty. |
Autodesk.Revit.ExceptionsFileNotFoundException | Thrown when the file specified does not exist. |
Autodesk.Revit.ExceptionsArgumentException | Thrown when no file is specified or if the file is not a valid gbXML file or does not contain any result elements. |