ViewSectionCreateReferenceCallout Method

Creates a new reference callout.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static void CreateReferenceCallout(
	Document document,
	ElementId parentViewId,
	ElementId viewIdToReference,
	XYZ point1,
	XYZ point2
)

Parameters

document  Document
The document to which the new reference callout will be added.
parentViewId  ElementId
The view in which the callout symbol appears. Callouts can be created in FloorPlan, CeilingPlan, StructuralPlan, Section, Elevation, Drafting, and Detail views.
viewIdToReference  ElementId
The view which will be referenced. The ViewFamilyType of the referenced view will be used by the new reference callout. Only cropped views can be referenced, unless the referenced view is a Drafting view. Drafting views can always be referenced regardless of the parent view type. Elevation views can be referenced from Elevation and Drafting parent views. Section views can be referenced from Section and Drafting parent views. Detail views can be referenced from all parent views except for in FloorPlan, CeilingPlan and StructuralPlan parent views where only horizontally-oriented Detail views can be referenced. FloorPlan, CeilingPlan and StructuralPlan views can be referenced from FloorPlan, CeilingPlan and StructuralPlan parent views.
point1  XYZ
One corner of the callout symbol in the parent view.
point2  XYZ
The other diagonally opposed corner of the callout symbol in the parent view.
Exceptions
ExceptionCondition
ArgumentException The ElementId viewIdToReference does not correspond to a View. -or- The ElementId parentViewId does not correspond to a View. -or- The parent view and the referenced view must be different views. -or- The parent view does not support reference callouts to views of the ViewFamily used by viewIdToReference. -or- point1 and point2 do not differ when projected onto a plane perpendicular to the view direction. -or- Callout view creation is not allowed in this family.
ArgumentNullException A non-optional argument was null
ModificationForbiddenException 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.
ModificationOutsideTransactionException The document has no open transaction.
Remarks
The reference callout will assume the ViewFamilyType of the view it references. The corners of the callout symbol will be determined by the two point arguments. The sides of the callout symbol will be aligned to the sides of the parent view's crop region.
See Also