CoordinationModelLinkUtilsLink3DViewFromAutodeskDocs Method |
Creates a Coordination Model instance based on the information provided by the specified Autodesk Docs data and linking options.
Namespace: Autodesk.Revit.DB.ExternalDataAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static Element Link3DViewFromAutodeskDocs(
Document document,
string accountId,
string projectId,
string fileId,
string viewName,
CoordinationModelLinkOptions linkOptions
)
Public Shared Function Link3DViewFromAutodeskDocs (
document As Document,
accountId As String,
projectId As String,
fileId As String,
viewName As String,
linkOptions As CoordinationModelLinkOptions
) As Element
public:
static Element^ Link3DViewFromAutodeskDocs(
Document^ document,
String^ accountId,
String^ projectId,
String^ fileId,
String^ viewName,
CoordinationModelLinkOptions^ linkOptions
)
static member Link3DViewFromAutodeskDocs :
document : Document *
accountId : string *
projectId : string *
fileId : string *
viewName : string *
linkOptions : CoordinationModelLinkOptions -> Element Parameters
- document Document
-
The document.
- accountId String
-
The id of the Autodesk Docs account.
- projectId String
-
The id of the Autodesk Docs project.
- fileId String
-
The id of the Autodesk Docs file.
A valid file id should start with "urn:WIPENVIRONMENT:dm.lineage:", followed by an unique identifier.
The WIPENVIRONMENT varies from Region to Region.
For example, for an account created in US Region, WIPENVIRONMENT = adsk.wipprod and a valid file id would be urn:adsk.wipprod:dm.lineage:AoV26TGqRjuNs4ANq84ncQ.
- viewName String
-
View name.
- linkOptions CoordinationModelLinkOptions
-
Options for linking.
Return Value
Element
Returns the newly added Coordination Model instance of the 3D view from Autodesk Docs.
Exceptions| Exception | Condition |
|---|
| ArgumentException |
Failed to validate file id.
-or-
document is not a project document.
|
| ArgumentNullException |
A non-optional argument was null
|
| InvalidOperationException |
Failed to validate web services environment.
-or-
Failed to validate authentication.
-or-
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-
Failed to create Coordination Model instance using specified data or an internal error occured.
|
| 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.
|
Remarks Authentication in Revit is a prerequisite for linking Coordination Models from Autodesk Docs.
The Autodesk Docs data projectId, fileId and viewName can be retrieved from the web URL of the 3D view.
The Autodesk Docs account id can be retrieved from the Autodesk Docs Account settings.
This data can also be retrieved via the Data Management API or Autodesk Construction Cloud API.
See Also