2023 Method
Changes 0
M

RevitLinkType.LoadFrom

Description:
Loads or reloads the Revit link from disk or cloud. The link will be loaded from the input path.
Remarks:

The input path must be absolute. Revit will store an absolute or relative path internally, according to the link's settings. Revit Server paths or cloud paths are acceptable.

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 path 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(ModelPath,WorksetConfiguration)
public LinkLoadResult LoadFrom(
	ModelPath path,
	WorksetConfiguration config
)
  • path
    A ModelPath indicating where to load the link from. This may be a path of local disk, Revit Server or Cloud. This must be an absolute path for local path.
  • 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.