简体   繁体   中英

How do i get rotation of wall using revit api?

If an Element is family instance then:

(FamilyInstance.Location as LocationPoint).Rotation;

I can easily get a rotation easily for family instance.

If I try for wall

Curve curve = ((Wall).Location as LocationCurve).Curve;

Or anything like that.

For example :

  1. In preceding image, trying to rotate wall to 90 Degree. 普通墙

  2. In below Image, after rotating 90 Degree 旋转后的墙

Need to get the rotated angle of the wall.

如果您的墙曲线是一条直线,则可以从该线抓取角度:设V为从墙曲线起点到终点的矢量,并确定其与X轴的角度:angle = V.AngleTo(XYZ.BasisX)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM