ImportXml Method


Import an external property set library into a Revit document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2012

Syntax

C#
public static PropertySetLibrary ImportXml(
	Document document,
	string fileName,
	bool overwriteExisting
)
Visual Basic
Public Shared Function ImportXml ( _
	document As Document, _
	fileName As String, _
	overwriteExisting As Boolean _
) As PropertySetLibrary
Visual C++
public:
static PropertySetLibrary^ ImportXml(
	Document^ document, 
	String^ fileName, 
	bool overwriteExisting
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
fileName
Type: System String
Full path to a file containing a property set library definition.
overwriteExisting
Type: System Boolean
If true, any name conflicts will be resolved by overwriting existing libraries in the document with those being imported.

Return Value

The new PropertySetLibrary.

Remarks

If overwriteExisting is false and a name conflict occurs, Revit will throw an InvalidOperationException.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions FileArgumentNotFoundException The given fileName does not exist.
Autodesk.Revit.Exceptions InvalidOperationException Attempting to import a property set library with a name that already exists in the document.

See Also