Import Method (String, SKPImportOptions, View)

Imports an SKP file into the document.

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


public ElementId Import(
	string file,
	SKPImportOptions options,
	View pDBView
Visual Basic
Public Function Import ( _
	file As String, _
	options As SKPImportOptions, _
	pDBView As View _
) As ElementId
Visual C++
ElementId^ Import(
	String^ file, 
	SKPImportOptions^ options, 
	View^ pDBView


Type: System String
Full path of the file to link. File must exist and must be a valid SAT file.
Type: Autodesk.Revit.DB SKPImportOptions
Various import options applicable to the SKP format. If a null reference ( Nothing in Visual Basic) , all options will be set to their respective default values.
Type: Autodesk.Revit.DB View
The view into which the file will be linked.

Return Value

Returns the element Id of the linked instance.


Exception Condition
Autodesk.Revit.Exceptions ArgumentException Not a valid file for SKP import (.skp file is valid). -or- ThisViewOnly cannot be true when importing a DWG|DGN drawing into a 3D view -or- One or more strings describing layer selection is invalid or empty. -or- The scale is not valid as a CustomScale for use during import. -or- NullOrEmpty -or- The view is not printable.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions FileArgumentNotFoundException The given file does not exist.
Autodesk.Revit.Exceptions InvalidOperationException Import is temporarily disabled.
Autodesk.Revit.Exceptions ModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document has no open transaction.
Autodesk.Revit.Exceptions OptionalFunctionalityNotAvailableException The SKP Import/Link module is not available in the installed Revit.

See Also