2025.3 Method
Changes 0
M

RevitLinkInstance.Create

Description:
Creates a new instance of a linked Revit project (RevitLinkType).
Remarks:
Instances will be placed origin-to-origin. This function cannot be used to create instances of nested links.
Overloads (2):
Create(Document,ElementId)
public static RevitLinkInstance Create(
	Document document,
	ElementId revitLinkTypeId
)
  • document
    The document in which the new instance should be created.
  • revitLinkTypeId
    The element id of the RevitLinkType.
Return Value RevitLinkInstance The newly-created RevitLinkInstance.
  • revitLinkTypeId isn't a RevitLinkType. -or- revitLinkTypeId is not a top-level link. -or- revitLinkTypeId is not a loaded RevitLinkType -or- document is not a project document.
  • A non-optional argument was null
  • 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.
  • The document has no open transaction.