<?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 Re: How to Create Line based on Angle in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/9219251#M56160</link>
    <description>&lt;P&gt;Hi, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1257478"&gt;@aignatovich&lt;/a&gt;&amp;nbsp;how about creating a reference plane at a particular angle say &lt;STRONG&gt;33 degrees&lt;/STRONG&gt;. Do we have a direct method, where we can pass desired angle as an argument.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2019 07:39:52 GMT</pubDate>
    <dc:creator>strsuraj</dc:creator>
    <dc:date>2019-12-25T07:39:52Z</dc:date>
    <item>
      <title>How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7372827#M56157</link>
      <description>&lt;P&gt;I have element&amp;nbsp;line location in Revit code (first line).&lt;/P&gt;&lt;P&gt;Then i need to add second line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second line start point is any point on the line which is 90 degrees from the first line on X/Y Axis.&lt;/P&gt;&lt;P&gt;I cant get method to create second line based on angle.&lt;/P&gt;&lt;P&gt;Below is the example of the line i need.&lt;/P&gt;&lt;P&gt;I have been playing around with method CreateTransformed,&amp;nbsp;CreateRotationAtPoint and CrossProduct but i still don't get the result i want.&lt;/P&gt;&lt;P&gt;Thanks.&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="Line.png" style="width: 616px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/400387i36711B947E9A400A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Line.png" alt="Line.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 10:35:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7372827#M56157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-12T10:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7372910#M56158</link>
      <description>&lt;P&gt;Hi! It is simple, just get a) line direction b) line sketch plane normal&lt;BR /&gt;&lt;BR /&gt;Then normal.CrossProduct(direction) should be your second line direction or, may be, you need -1*normal.CrossProduct(direction)&lt;BR /&gt;&lt;BR /&gt;Take any point on first line, for example, pt1 = fistLine.Evaluate(0.5, true), pt2 = pt1 + length * direction, then create the second line Line.CreateBound(pt1, pt2), then create model curve on the first line sketch plane, base on this second line&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 11:23:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7372910#M56158</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2017-09-12T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7375404#M56159</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;SPAN&gt;Ignatovich.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code based on your solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line line1 = Line.CreateBound(XYZ.Zero, new XYZ(10, 10, 10));&lt;BR /&gt;XYZ pntCenter = line1.Evaluate(0.5, true);&lt;BR /&gt;XYZ normal = line1.Direction.Normalize();&lt;BR /&gt;XYZ dir = new XYZ(0, 0, 1);&lt;BR /&gt;XYZ cross = normal.CrossProduct(dir);&lt;BR /&gt;XYZ pntEnd = pntCenter + cross.Multiply(10);&lt;BR /&gt;Line line2 = Line.CreateBound(pntCenter, pntEnd);&lt;BR /&gt;Debug.Print("line1: " + line1.Direction.ToString());&lt;BR /&gt;Debug.Print("line2: " + line2.Direction.ToString());&lt;BR /&gt;Debug.Print("line1: Start " + line1.GetEndPoint(0).ToString() + " End " + line1.GetEndPoint(1).ToString());&lt;BR /&gt;Debug.Print("line2: Start " + line2.GetEndPoint(0).ToString() + " End " + line2.GetEndPoint(1).ToString());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 02:05:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/7375404#M56159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-13T02:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/9219251#M56160</link>
      <description>&lt;P&gt;Hi, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1257478"&gt;@aignatovich&lt;/a&gt;&amp;nbsp;how about creating a reference plane at a particular angle say &lt;STRONG&gt;33 degrees&lt;/STRONG&gt;. Do we have a direct method, where we can pass desired angle as an argument.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2019 07:39:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/9219251#M56160</guid>
      <dc:creator>strsuraj</dc:creator>
      <dc:date>2019-12-25T07:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/10936058#M56161</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1257478"&gt;@aignatovich&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you please show me how to get the &lt;SPAN&gt;&amp;nbsp;line sketch plane normal:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when I create it a plane by a normal ( my line direction) and an origin line origin.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The cross product plane.Normal(line.Direction) Will be equal to (0,0,0) because the two vectors have the same direction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 11:50:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/10936058#M56161</guid>
      <dc:creator>joldman473</dc:creator>
      <dc:date>2022-02-08T11:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Line based on Angle</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/10938185#M56162</link>
      <description>&lt;LI-CODE lang="csharp"&gt;sketchPlane.GetPlane().Normal&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Feb 2022 07:08:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-create-line-based-on-angle/m-p/10938185#M56162</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2022-02-09T07:08:28Z</dc:date>
    </item>
  </channel>
</rss>

