RevitLinkTypeAttachmentType Property

The attachment/overlay status of this link.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public AttachmentType AttachmentType { get; set; }

Property Value

AttachmentType
AttachmentType.Overlay if this link is an overlay, AttachmentType.Attachment if this link is an attachment.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException When setting this property: A value passed for an enumeration argument is not a member of that enumeration
InvalidOperationException When setting this property: This RevitLinkType is not a top-level link. -or- When setting this property: This operation is not supported for scenario-based Revit links. Scenario-based Revit links are read-only and their source is managed by the scenario system.
Remarks

"Attachment" links are considered to be part of their parent link and will be brought along if their parent is linked into another document. "Overlay" links are only visible when their parent is open directly.

For example: A user has a file B which contains a link C, and they wish to link B into another file, A. If C is an overlay, C will not be loaded into A. If C is an attachment, then C will be loaded into A along with B.

Setting this property is blocked for Revit links that originate from a scenario. Scenario-based Revit links are read-only and cannot have their attachment type changed.

See Also