ImportInstanceCreate(Document, ElementId, View) Method |
Creates a new instance of an existing DWG link type.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static ImportInstance Create(
Document document,
ElementId typeId,
View DBView
)
Public Shared Function Create (
document As Document,
typeId As ElementId,
DBView As View
) As ImportInstance
public:
static ImportInstance^ Create(
Document^ document,
ElementId^ typeId,
View^ DBView
)
static member Create :
document : Document *
typeId : ElementId *
DBView : View -> ImportInstance
Parameters
- document Document
-
The document in which to create the new instacne of DWG link type.
- typeId ElementId
-
The element id of the existing DWG link type.
- DBView View
-
The view into which the new instance of DWG link type will be created.
Return Value
ImportInstance
The new instance of the given DWG link type.
ExceptionsException | Condition |
---|
ArgumentException |
document is not a project document.
-or-
document is in an edit mode.
-or-
The view is not printable.
-or-
The element id is not of a valid CADLinkType.
|
ArgumentNullException |
A non-optional argument was null
|
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.
|
ModificationOutsideTransactionException |
The document has no open transaction.
|
RemarksThis function regenerates the input document.
See Also