<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ElementTransformUtils.RotateElement() not working using horizontal location line. in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10307630#M26021</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to rotate a linear structural Framing family instance around its location line&amp;nbsp; to align it nicely with other elements in order to get "pretty" roll angle values afterward.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code seems to work ok for vertical members but does not work for &lt;STRONG&gt;horizontal&lt;/STRONG&gt; member !!!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// 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);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I also tried using the Location.Rotate() method without success.&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 09:25:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-12T09:25:24Z</dc:date>
    <item>
      <title>ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10307630#M26021</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to rotate a linear structural Framing family instance around its location line&amp;nbsp; to align it nicely with other elements in order to get "pretty" roll angle values afterward.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code seems to work ok for vertical members but does not work for &lt;STRONG&gt;horizontal&lt;/STRONG&gt; member !!!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// 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);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I also tried using the Location.Rotate() method without success.&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 09:25:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10307630#M26021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T09:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10307996#M26022</link>
      <description>&lt;P&gt;I did try the rotate command and I got the same problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STR :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create an linear horizontal Structural Framing element.&lt;/P&gt;&lt;P&gt;Switch to an elevation view normal to the Structural Framing element direction.&lt;/P&gt;&lt;P&gt;Try to rotate the element.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I am using Revit 2021.1.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VinnyCout_1-1620820792648.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/917976i28B6F5980D206AE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VinnyCout_1-1620820792648.png" alt="VinnyCout_1-1620820792648.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 12:07:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10307996#M26022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T12:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310329#M26023</link>
      <description>&lt;P&gt;The section rotation can be set via the instance parameter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STRUCTURAL_BEND_DIR_ANGLE -1001586&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is noted as 'Cross Section Rotation' in the UI for English language Revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 11:09:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310329#M26023</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-05-13T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310514#M26024</link>
      <description>&lt;P&gt;@&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859" target="_self"&gt;&lt;SPAN class=""&gt;RPTHOMAS108&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;STRUCTURAL_BEND_DIR_ANGLE is what I call the Roll Angle.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;I want to combine the &lt;STRONG&gt;Roll Angle and Rotation transform&lt;/STRONG&gt; in order to get to the correct orientation. I know this could be achieved by only manipulating&amp;nbsp; the&amp;nbsp;&lt;STRONG&gt;STRUCTURAL_BEND_DIR_ANGLE&lt;/STRONG&gt; value however my aim is to position the members (Beams/Braces) so that the &lt;STRONG&gt;Roll Angle&lt;/STRONG&gt; does not end up being to "complex".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Imagine placing&amp;nbsp; studs and braces to form the wall structural framing, it is much better to rotate the member relative to the wall direction rather than world coordinate system. My aim is to set the initial member transform (&lt;STRONG&gt;Roll Angle&lt;/STRONG&gt; == 0) so that the &lt;STRONG&gt;Roll Angle&lt;/STRONG&gt; (&lt;STRONG&gt;STRUCTURAL_BEND_DIR_ANGLE&lt;/STRONG&gt;) can be set to pretty angle values ( 0, 90, 180 etc)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;As I said in my initial post, I managed to achieve this for vertical members but for horizontal members the rotate operation does not work if the rotation axis is parallel to the location curve/ line.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;The program seems to do something special when the location line is horizontal which causes different behaviour when rotation the member along its axis.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Advisor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;I hope this clarifies things.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 12:34:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310514#M26024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-13T12:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310982#M26025</link>
      <description>&lt;P&gt;Not following what your objectives are perhaps a visual example would help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your structural framing is likely hosted to a level (with that family instance creation overload) and so the range of orientations you get by manipulating the ends will be limited (to offsets from level).&lt;/P&gt;&lt;P&gt;A location line unlike a location point doesn't have a rotation orientation, it is just a line with infinite possible normal directions.&lt;/P&gt;&lt;P&gt;When member is vertical on it's hosted level the section can be rotated because the member direction angle (Yaw) coincides with section rotation angle (Roll). You are not changing the parametric section rotation parameter this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does rotating the member around it's length direction work when it has a 45 degree pitch?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure the Yaw, Pitch, Roll analogy is a good one because they are local to element. However I'm using them to define the three angle rotations that define orientation from a global starting point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 15:57:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10310982#M26025</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-05-13T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10311130#M26026</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an illustration. I am showing the family instance coordinate system and the cross section rotation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can see that the roll angle is 0 but the member is not aligned with the world coordinate system but it is aligned with the wall.&lt;/P&gt;&lt;P&gt;I achieved this by using&amp;nbsp;ElementTransformUtils.RotateElement() method using the location line of the member as rotation axis and applied the appropriate angle to align the section with the wall without changing the the roll angle of the member.&amp;nbsp; Result : it is easier to manipulate the roll angle in relation to the wall line...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to do this on a horizontal member does not work.&amp;nbsp;ElementTransformUtils.RotateElement() fails ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VinnyCout_0-1620922941376.png" style="width: 685px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/918464i224793A03647EE75/image-dimensions/685x491?v=v2" width="685" height="491" role="button" title="VinnyCout_0-1620922941376.png" alt="VinnyCout_0-1620922941376.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 16:35:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10311130#M26026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-13T16:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10311160#M26027</link>
      <description>&lt;P&gt;You should probably be using structural columns for your vertical members (structural framing wasn't really intended to be put in vertical). In the past I find these kinds of modelling choices are the things that tend to go wrong when files are upgraded (or even sometimes when you open the same file later).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a vertical wall then your horizontal members will have a section rotation of 90. If your wall is slanted your horizontal member section rotation will be set to suit the rake angle of the wall.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an extreme you could host the framing on a surface of the wall to forget about the section angle, perhaps (if you find suitable reference).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 16:56:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10311160#M26027</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-05-13T16:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10370041#M26028</link>
      <description>&lt;P&gt;I would expect to be able to place brace Structural Framing&amp;nbsp; elements in any orientation/position I want via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These differences in behaviours depending on the Curve location make the API almost impossible to use to perform advanced operations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noted that, in the case of non horizontal members, I needed to use the move function using zero displacement in order to get a correct transform matrix...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is really frustrating to have to find silly tiny workaround to get things to work as anyone would expect.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 14:00:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10370041#M26028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-07T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: ElementTransformUtils.RotateElement() not working using horizontal location line.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10757413#M26029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encountered this problem today as well.&lt;/P&gt;&lt;P&gt;So basically, horizontal members can't be rotated around its Location Line (the Roll Axis) by using the&amp;nbsp;&lt;SPAN&gt;ElementTransformUtils.RotateElement()? And the only way is to set the rotation angle to the&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;STRUCTURAL_BEND_DIR_ANGLE BuiltInParameter?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I wonder why the method can't be applied to rotate the horizontal members around its Roll angle? is it because of the reasons stated in&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;'s comment here:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Your structural framing is likely hosted to a level (with that family instance creation overload) and so the range of orientations you get by manipulating the ends will be limited (to offsets from level).&lt;/P&gt;&lt;P&gt;A location line unlike a location point doesn't have a rotation orientation, it is just a line with infinite possible normal directions.&lt;/P&gt;&lt;P&gt;When member is vertical on it's hosted level the section can be rotated because the member direction angle (Yaw) coincides with section rotation angle (Roll). You are not changing the parametric section rotation parameter this way.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 08:43:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-rotateelement-not-working-using-horizontal/m-p/10757413#M26029</guid>
      <dc:creator>kevin.anggrek</dc:creator>
      <dc:date>2021-11-15T08:43:37Z</dc:date>
    </item>
  </channel>
</rss>

