Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2015
Syntax
C# |
---|
public static RevisionCloud Create( Document document, View view, ElementId revisionId, IList<Curve> curves ) |
Visual Basic |
---|
Public Shared Function Create ( _ document As Document, _ view As View, _ revisionId As ElementId, _ curves As IList(Of Curve) _ ) As RevisionCloud |
Visual C++ |
---|
public: static RevisionCloud^ Create( Document^ document, View^ view, ElementId^ revisionId, IList<Curve^>^ curves ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document in which the RevisionCloud should be created.
- view
- Type: Autodesk.Revit.DB..::..View
The View in which the RevisionCloud should appear.
- revisionId
- Type: Autodesk.Revit.DB..::..ElementId
The Revision to associate with the new RevisionCloud.
- curves
- Type: System.Collections.Generic..::..IList<(Of <(<'Curve>)>)>
The curves that will form the RevisionCloud's sketch.
Return Value
The newly created RevisionCloud.
Remarks
RevisionClouds can be created in most graphical Views, excepting 3D views and graphical column schedules. Unlike most other Elements, RevisionClouds can be created directly on a ViewSheet.
RevisionClouds are created based on a series of sketched curves. There is no requirement that the curves form closed loops and self-intersections are also permitted. The curves will be automatically projected onto the appropriate plane for the View. The list of curves cannot be empty and any lines cannot be perpendicular to the View's plane. If the View is a model View, the coordinates specified for the curves will be interpreted in model space. If the View is a non-model View (such as a ViewSheet) then the coordinates will be interpreted in the View's space.
The cloud graphics will be attached to the curves under the assumption that each curve is oriented in a clockwise direction. For lines, this means that the outside of the cloud is in the direction of the line's normal vector within the View's plane. Any closed loops should therefore be oriented clockwise to create the typical cloud shape.
Examples

private void CreateRevisionCloudInActiveView(Document document, Revision revision, IList<Curve> curves) { using (Transaction newRevisionCloud = new Transaction(document, "Create Revision Cloud")) { newRevisionCloud.Start(); // Can only create revision cloud for revision that is not issued if (revision.Issued == false) { RevisionCloud.Create(document, document.ActiveView, revision.Id, curves); newRevisionCloud.Commit(); } else { newRevisionCloud.RollBack(); } } }

Private Sub CreateRevisionCloudInActiveView(document As Document, revision As Revision, curves As IList(Of Curve)) Using newRevisionCloud As New Transaction(document, "Create Revision Cloud") newRevisionCloud.Start() ' Can only create revision cloud for revision that is not issued If revision.Issued = False Then RevisionCloud.Create(document, document.ActiveView, revision.Id, curves) newRevisionCloud.Commit() Else newRevisionCloud.RollBack() End If End Using End Sub
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | document is not a project document. -or- revisionId is not a valid Revision. -or- This operation cannot be performed because revisionId is an issued Revision. -or- view is not a View that can support RevisionClouds. -or- The provided Curves curves cannot be used as the basis for a RevisionCloud. Either the list is empty or one or more of the Curves could not be projected onto the View's plane. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |