[英]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 : 例如 :
In preceding image, trying to rotate wall to 90 Degree. 在上图中,尝试将墙旋转到90度。
In below Image, after rotating 90 Degree 在下图中,旋转90度后
Need to get the rotated angle of the wall. 需要获取墙的旋转角度。
如果您的墙曲线是一条直线,则可以从该线抓取角度:设V为从墙曲线起点到终点的矢量,并确定其与X轴的角度:angle = V.AngleTo(XYZ.BasisX)
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.