Issue with PickBox and Revision Cloud Orientation in Elevation View

Issue with PickBox and Revision Cloud Orientation in Elevation View

DesignGroup01
Enthusiast Enthusiast
115 Views
0 Replies
Message 1 of 1

Issue with PickBox and Revision Cloud Orientation in Elevation View

DesignGroup01
Enthusiast
Enthusiast

Hi everyone,

I'm using PickBox(PickBoxStyle.Crossing) to allow users to select a rectangular area and then create a Revision Cloud in Revit. The logic works fine in Plan View, but when I use it in an Elevation View, the resulting Revision Cloud is misaligned—it appears shifted and rotated from the expected position.

Here’s how I handle the coordinate transformation for Elevation Views:

 

if (IsElevationView(activeView))
{
    // 🏗️ Transforming to Elevation View (X-Z system)
    p1 = new XYZ(box.Min.X, box.Min.Z, box.Min.Y);
    p2 = new XYZ(box.Max.X, box.Max.Z, box.Max.Y);
    p3 = new XYZ(p1.X, p1.Y, p2.Z);
    p4 = new XYZ(p2.X, p2.Y, p1.Z);
}
else
{
    // 📏 Plan View (X-Y system)
    p1 = box.Min;
    p2 = box.Max;
    p3 = new XYZ(p1.X, p2.Y, p1.Z);
    p4 = new XYZ(p2.X, p1.Y, p2.Z);
}

 

Then, I create the Revision Cloud using these points:

 

List<Curve> cloudCurves = new List<Curve>
{
    Line.CreateBound(p1, p4),
    Line.CreateBound(p4, p2),
    Line.CreateBound(p2, p3),
    Line.CreateBound(p3, p1)
};

using (Transaction tx = new Transaction(doc, "Create Revision Cloud"))
{
    tx.Start();
    RevisionCloud revCloud = RevisionCloud.Create(doc, activeView, selectedRevision.Id, cloudCurves);
    tx.Commit();
}

 

 

01.jpg

  • I've attached an image where the red-colored revision cloud represents where I want the cloud to appear. However, the actual revision cloud is being placed at the wrong location, towards the end of the image. How can I correctly align the revision cloud with the selected area?

Issue:

  • In Elevation Views, the Revision Cloud does not appear exactly where the user selected.
  • It seems shifted and rotated, possibly due to incorrect coordinate transformation.

Question:

How can I correctly transform the PickBox selection to match the Elevation View's coordinate system and ensure the Revision Cloud aligns properly?

Would appreciate any insights or suggestions! Thanks in advance.

 

0 Likes
116 Views
0 Replies
Replies (0)