Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2018
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- resourceReference
- Type: Autodesk.Revit.DB ExternalResourceReference
An ExternalResourceReference giving the location of the link. This method can be used to load the link from a file on disk. See [!:Autodesk::Revit::DB::ExternalResourceReference::CreateLocalResource()] .
Return Value
An object containing the ElementId of the link and an enum value indicating any errors which occurred while trying to load.Remarks
If the link is currently loaded, any changes made in-memory to the link's shared coordinates will be discarded.
Graphic overrides will be preserved on reload.
If the original view used to bring in this link has been deleted, Revit will cancel the load.
If there is already another link, not current link itself, using the given external resource reference, the loading will not happen. The element id of the link using the external resource reference will be contained in the LinkLoadResult.
This function checks the actual resource path that the IExternalResourceServer returns. If the link type identified by the resource path doesn't match DWG, the load will not proceed.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The server referenced by the ExternalResourceReference does not exist or does not implement IExternalResourceServer. -or- The server referenced by the ExternalResourceReference cannot support CAD links. -or- The ExternalResourceReference (resourceReference) is not in a format that is supported by its server. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions InvalidOperationException | This CADLinkType represents an import and cannot be used as a link. -or- The element "this CADLinkType" is in a read-only document. -or- The link does not represent a DWG. |