ElevationMarker does not Rotate 180 deg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I'm working on a room elevation add-in. Discovered that rotating elevation markers by 180 deg results in an extra 180 deg being added by the API. In fact, rotating the marker within the range greater than 160 and less than 200 deg will result in the angle being automatically adjusted by 180 deg. My workaround has been to catch angles in this range, halve it, and perform two rotations. All other angles rotate fine as demonstrated in the image.
Line lineAsAxis = Line.CreateBound(rb.ElevationPoint, new XYZ(rb.ElevationPoint.X, rb.ElevationPoint.Y, rb.ElevationPoint.Z + 1));
if (angle > 160 && angle < 200)
{
angle = angle / 2;
ElementTransformUtils.RotateElement(doc, elevMarker.Id, lineAsAxis, angle * App.TO_RADIANS);
}
ElementTransformUtils.RotateElement(doc, elevMarker.Id, lineAsAxis, angle * App.TO_RADIANS);
Of course I'm not 100% sure of the exact tipping points but 160-200 are the rough limits. More detailed image attached.
Just thought I would mention this limitation. Was also raised in another post about a year ago with no reply:
https://forums.autodesk.com/t5/revit-api-forum/rotate-elevation-mark-180-issues/td-p/7234149
This was tested in 2018.
Thanks.