Unable to align tags with accurate angle in elevations.

Unable to align tags with accurate angle in elevations.

praveen.cMXB2H
Enthusiast Enthusiast
290 Views
2 Replies
Message 1 of 3

Unable to align tags with accurate angle in elevations.

praveen.cMXB2H
Enthusiast
Enthusiast

I am able to align tags in floors and sections with accurate angle but not able to align tags with accurate angle in elevations(Revit 2020). 

 

double yValue;

int Angle = 60; //To align tag with 60 degrees.

XYZ elboworigin = uiApp.ActiveUIDocument.Selection.PickPoint("Pick the Elbow");

XYZ  leaderEndValue = tag.LeaderEnd;

 

yValue = (elboworigin.Z - leaderEndValue.Z)/(Angle + leaderEndValue.Y)    //To find y value for elbow position 


XYZ ElbowPosition = new XYZ(0, yValue, elboworigin.Z);
tag.LeaderElbow = ElbowPosition;
XYZ headerPnt = new XYZ(0, yValue, elboworigin.Z);
tag.TagHeadPosition = headerPnt;

for all floors and sections above code is working fine but when comes to elevations angle is not matching.

0 Likes
291 Views
2 Replies
Replies (2)
Message 2 of 3

Mohamed_Arshad
Advisor
Advisor

HI @praveen.cMXB2H 


 Have you tried Angle in radians?


Mohamed Arshad K
Software Developer (CAD & BIM)

0 Likes
Message 3 of 3

praveen.cMXB2H
Enthusiast
Enthusiast

Yes i tried angle in radiance,

Angle = Math.Tan((60) * Math.PI / 180);

0 Likes