Create Method (Document, ElementId, View)


Creates a new instance of an existing DWG link type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since: 2018

Syntax

C#
public static ImportInstance Create(
	Document document,
	ElementId typeId,
	View DBView
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	typeId As ElementId, _
	DBView As View _
) As ImportInstance
Visual C++
public:
static ImportInstance^ Create(
	Document^ document, 
	ElementId^ typeId, 
	View^ DBView
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which to create the new instacne of DWG link type.
typeId
Type: Autodesk.Revit.DB ElementId
The element id of the existing DWG link type.
DBView
Type: Autodesk.Revit.DB View
The view into which the new instance of DWG link type will be created.

Return Value

The new instance of the given DWG link type.

Remarks

This function regenerates the input document.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException document has is in an edit mode or is in family mode. -or- The view is not printable. -or- The element id is not of a valid CADLinkType.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
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.

See Also