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 a 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

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown if view is a null reference ( Nothing in Visual Basic) .

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →