Message 1 of 9
ElementTransformUtils.RotateElement() not working using horizontal location line.

Not applicable
05-12-2021
02:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to rotate a linear structural Framing family instance around its location line to align it nicely with other elements in order to get "pretty" roll angle values afterward.
My code seems to work ok for vertical members but does not work for horizontal member !!!
// This does not work when line curve is horizontal ...
var beam = Document.Create.NewFamilyInstance(curve, _MemberProfileSymbolType, Level, StructuralType.Beam);
ElementTransformUtils.RotateElement(Document, beam.Id, (Line)curve, Math.PI * .25);
I also tried using the Location.Rotate() method without success.
Any idea ?