Import Method (String, ImageImportOptions, View, Element)
Imports an image (a bitmap) into the document.

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

Syntax

C#
public bool Import(
	string file,
	ImageImportOptions options,
	View view,
	out Element element
)
Visual Basic
Public Function Import ( _
	file As String, _
	options As ImageImportOptions, _
	view As View, _
	<OutAttribute> ByRef element As Element _
) As Boolean
Visual C++
public:
bool Import(
	String^ file, 
	ImageImportOptions^ options, 
	View^ view, 
	[OutAttribute] Element^% element
)

Parameters

file
Type: System..::..String
Full path of the file to import. File must exist.
options
Type: Autodesk.Revit.DB..::..ImageImportOptions
Various options applicable to an image. If nullNothingnullptra null reference (Nothing in Visual Basic), all options will be set to their respective default values.
view
Type: Autodesk.Revit.DB..::..View
The view into which the image is going to be imported.
element
Type: Autodesk.Revit.DB..::..Element%
The imported instance after a successful import. It could be used for further manipulating of that instance.

Return Value

True if successful, otherwise False.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullException Thrown if view is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also