<?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 IsRebarInSection() in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11148854#M19242</link>
    <description>&lt;P&gt;I have place a set of rebars in a viewPlan that only have 1 segment:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiguelGT17_0-1651726217067.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1063324i51F0DFA00855F2E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiguelGT17_0-1651726217067.png" alt="MiguelGT17_0-1651726217067.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was expecting the IsRebarInSection() command to throw a true boolean as the rebars are shown as a cross section. If that is not the case, what this method stands for and which api method should I be looking up instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test code:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;foreach (Element element in rebars) {
				if (element is RebarContainer) {
					
				}
				else if (element is Rebar) {
					
					Rebar el = element as Rebar;
					if (el.IsRebarFreeForm() == true) {
						
					}
					else if(el.IsRebarShapeDriven() == true){
						RebarShapeDrivenAccessor acc=(element as Rebar).GetShapeDrivenAccessor();
						XYZ dir=acc.GetDistributionPath().Direction;
						
						double angle=dir.AngleTo(view.ViewDirection);
						angle=angle*(180/Math.PI); //90,0
						stb.AppendLine(angle.ToString());
						stb.AppendLine(el.IsRebarInSection(view).ToString());

				
				}
			}
			TaskDialog.Show("dd",stb.ToString());&lt;/LI-CODE&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 04:54:08 GMT</pubDate>
    <dc:creator>MiguelGT17</dc:creator>
    <dc:date>2022-05-05T04:54:08Z</dc:date>
    <item>
      <title>IsRebarInSection()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11148854#M19242</link>
      <description>&lt;P&gt;I have place a set of rebars in a viewPlan that only have 1 segment:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiguelGT17_0-1651726217067.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1063324i51F0DFA00855F2E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiguelGT17_0-1651726217067.png" alt="MiguelGT17_0-1651726217067.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was expecting the IsRebarInSection() command to throw a true boolean as the rebars are shown as a cross section. If that is not the case, what this method stands for and which api method should I be looking up instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test code:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;foreach (Element element in rebars) {
				if (element is RebarContainer) {
					
				}
				else if (element is Rebar) {
					
					Rebar el = element as Rebar;
					if (el.IsRebarFreeForm() == true) {
						
					}
					else if(el.IsRebarShapeDriven() == true){
						RebarShapeDrivenAccessor acc=(element as Rebar).GetShapeDrivenAccessor();
						XYZ dir=acc.GetDistributionPath().Direction;
						
						double angle=dir.AngleTo(view.ViewDirection);
						angle=angle*(180/Math.PI); //90,0
						stb.AppendLine(angle.ToString());
						stb.AppendLine(el.IsRebarInSection(view).ToString());

				
				}
			}
			TaskDialog.Show("dd",stb.ToString());&lt;/LI-CODE&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 04:54:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11148854#M19242</guid>
      <dc:creator>MiguelGT17</dc:creator>
      <dc:date>2022-05-05T04:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: IsRebarInSection()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11149036#M19243</link>
      <description>&lt;P&gt;And yet again:&amp;nbsp;This sounds like a request for some in-depth rebar API expertise beyond my limited ken, so I&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://autodesk.slack.com/archives/C0SR6NAP8/p1651735070039959" target="_blank" rel="nofollow noopener noreferrer"&gt;asked&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the devteam for you. I hope we can find an efficient way to address your very valid questions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 07:24:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11149036#M19243</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-05-05T07:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: IsRebarInSection()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11150011#M19244</link>
      <description>&lt;P&gt;Appreciate the reply Jeremy, I'll be more than&amp;nbsp; glad to hear from the team&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 14:46:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11150011#M19244</guid>
      <dc:creator>MiguelGT17</dc:creator>
      <dc:date>2022-05-05T14:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: IsRebarInSection()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11152039#M19245</link>
      <description>&lt;P&gt;IsRebarInSection(View view) returns true only if the view is a section or elevation and the view plane is cutting at least one of the rebar curves, false otherwise.&lt;/P&gt;
&lt;P&gt;This API function is the correspondent of this UI option:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IsRebarInSection.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1063889iA66B49BD12AD5BCE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IsRebarInSection.png" alt="IsRebarInSection.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case,&amp;nbsp; to see that the straight bar is shown as a point you can verify this on your own. You can get the centerline curves like this rebar.GetTransformedCenterlineCurves(false, true, true, MultiplanarOption.IncludeOnlyPlanarCurves, 0);, You will get only one line. If the line’s direction is parallel with view’s direction it means that the bar is shown as a cross section, false otherwise.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 10:34:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11152039#M19245</guid>
      <dc:creator>StefanDobre</dc:creator>
      <dc:date>2022-05-06T10:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: IsRebarInSection()</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11153479#M19246</link>
      <description>&lt;P&gt;Thanks for your prompt reply!, I will explore what you've suggested this weekend&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 23:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isrebarinsection/m-p/11153479#M19246</guid>
      <dc:creator>MiguelGT17</dc:creator>
      <dc:date>2022-05-06T23:53:21Z</dc:date>
    </item>
  </channel>
</rss>

