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.
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.