Imports a Green-Building XML file into the document.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- file
- Type: System String
Full path of the file to import. File must exist.
- options
- Type: Autodesk.Revit.DB GBXMLImportOptions
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.Exceptions ArgumentNullException | Thrown when file argument is a null reference ( Nothing in Visual Basic) or empty. |
Autodesk.Revit.Exceptions FileNotFoundException | Thrown when the file specified does not exist. |
Autodesk.Revit.Exceptions ArgumentException | Thrown when no file is specified or if the file is not a valid gbXML file or does not contain any result elements. |