Making reference planes in Revit API

Making reference planes in Revit API

antonFFF2V
Participant Participant
1,235 Views
5 Replies
Message 1 of 6

Making reference planes in Revit API

antonFFF2V
Participant
Participant

Hello everyone! 
I am making a command which will create reference planes. 
If I make horizontal reference plane manually, I will see it on all levels (from basement to roof),
If I make horizontal reference plane by Plug-in (what I could create), references planes will have only 9144 mm height and I don't see them on all level, but it is important.
How is it possible to solve this? I want to create reference planes with heights from basement to roof or have possibility changes height.

P.S. I would solve it with "Maximize 3D extents" but the command maximize reference plane vertically and horizontally. I need maximize only vertical and fix horizontal length.

 

0 Likes
Accepted solutions (1)
1,236 Views
5 Replies
Replies (5)
Message 2 of 6

Mohamed_Arshad
Advisor
Advisor

HI @antonFFF2V 

    You need to created planes with use-defined input and it should be visible ? Is my understanding is correct.

 


Mohamed Arshad K
Software Developer (CAD & BIM)

0 Likes
Message 3 of 6

antonFFF2V
Participant
Participant

I am not sure that it is use-defined input.
For example, I have point A and point B. Of I open Revit and create reference plane from A to B manually, the result will be OK (I will see this horizontal reference plane on all levels)
If I create reference plane by NewReferencePlaneMethod from A to B, I will see reference plane only on this level and 2 levels above because height of reference plane, which I check on section, is 9144 mm (30 feet).

I tried to find key property for my problem and checked properties of reference plane after changing height of reference plane manually.
I've noticed that only BoundingBOX changed.



0 Likes
Message 4 of 6

Mohamed_Arshad
Advisor
Advisor

I think by Extending BoundingBox your problem get solved. Here what do want to automate ?

 


Mohamed Arshad K
Software Developer (CAD & BIM)

0 Likes
Message 5 of 6

antonFFF2V
Participant
Participant

I'll try evening at home, but I am afraid that changing BoundingBox does not change element (Refplanes) itself.

In our company we use refplanes for our work planes. We make contours of walls on typical floor with reference planes, and we can see them when work on ground level and basement level. Placement of walls are different on all these floors and using refplanes help up to see loads. Before that, we made contours manually for all edges of walls one by one. I want to automatize it.

Now I also have ideas not create but copy reference plane. For example, if we have one reference planes with correct height, we can just try to copy it.

0 Likes
Message 6 of 6

antonFFF2V
Participant
Participant
Accepted solution

I've solved it.
I created Reference Plane, then I maximize extents and after that I moved ends to wall border. 
My code:


XYZ startPoint = curve.GetEndPoint(0);
XYZ endPoint = curve.GetEndPoint(1);
if (startPoint.Z == endPoint.Z)
{ ReferencePlane newReferencePlane = doc.Create.NewReferencePlane(startPoint, endPoint, XYZ.BasisZ, activeView);
newReferencePlane.Maximize3DExtents();
newReferencePlane.BubbleEnd = new XYZ(startPoint.X, startPoint.Y, newReferencePlane.BubbleEnd.Z); newReferencePlane.FreeEnd = new XYZ(endPoint.X, endPoint.Y, newReferencePlane.FreeEnd.Z);

Note: after maximizing extents you choose Z-coordinate correct, because it was changed,

0 Likes