2021 Method
Changes 0
M

RevitLinkType.LoadFrom

Description:
Loads or reloads the Revit link. The link will be loaded from the location given in the input ExternalResourceReference.
Remarks:

If the link is currently loaded, Revit must unload the link before reloading it. Any changes made in-memory to the link's shared coordinates will be discarded.

Revit does not try to validate that the input represents the "same" document. You can load a completely different document, which may invalidate references to linked elements.

This function regenerates the document.

The document's Undo history will be cleared by this command. As a result, this command and others executed before it cannot be undone. All transaction phases (e.g. transactions transaction groups and sub-transaction) that were explicitly started must be finished prior to calling this method.

Overloads (2):
LoadFrom(ExternalResourceReference,WorksetConfiguration)
public LinkLoadResult LoadFrom(
	ExternalResourceReference resourceReference,
	WorksetConfiguration config
)
  • resourceReference
    An external resource reference describing the source of the linked Revit document.
  • config

    A WorksetConfiguration object indicating which worksets in the link to open.

    If you want to load the same set of worksets the link previously had, leave this argument as nulla null reference (Nothing in Visual Basic).

Return Value LinkLoadResult An object containing the ElementId of the link and an enum value indicating any errors which occurred while trying to load.