<?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: Rebar Location Controlling in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10903991#M21159</link>
    <description>&lt;P&gt;I seem to remember this being discussed here in the past couple of months... I think you can find the answer by searching for "rebar cover". Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 10:08:25 GMT</pubDate>
    <dc:creator>jeremy_tammik</dc:creator>
    <dc:date>2022-01-25T10:08:25Z</dc:date>
    <item>
      <title>Rebar Location Controlling</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10903636#M21158</link>
      <description>&lt;P&gt;Hello Everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp; I try to create rebar using API, I choose CreateFromRebarShape Method for Creation. And I successfully created the rebar&lt;/P&gt;&lt;P&gt;but one thing, rebar which I have created is always placing outside of the host and I can't able to control the location of&amp;nbsp;&lt;/P&gt;&lt;P&gt;rebar and its layout. Can anybody help in solving this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my code and error image below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;#region Create Reabar in Shape Method
            using (Transaction createRebar = new Transaction(revitDoc, "Create Rebar"))
            {
                createRebar.Start();

                //Pick Host Element
                Reference hostElementReference = revitUi.Selection.PickObject(ObjectType.Element);
                Element hostElement = revitDoc.GetElement(hostElementReference);

                //Select Planar Face to Place Rebar
                Reference selectedRefer = revitUi.Selection.PickObject(ObjectType.Face);
                PlanarFace plane=revitDoc.GetElement(selectedRefer).GetGeometryObjectFromReference(selectedRefer) as PlanarFace;

                //Get Rebar Shape
                RebarShape rebarShape = new FilteredElementCollector(revitDoc).OfClass(typeof(RebarShape)).Where(x =&amp;gt; x.Name.Equals("M_08")).FirstOrDefault() as RebarShape;

                //Get Rebar Type
                RebarBarType rebarType = new FilteredElementCollector(revitDoc).OfClass(typeof(RebarBarType)).OfCategory(BuiltInCategory.OST_Rebar).Where(x =&amp;gt; x.Name.Equals("10M")).FirstOrDefault() as RebarBarType;
               
                //Create Rebar
                Rebar bar = Rebar.CreateFromRebarShape(revitDoc, rebarShape, rebarType, hostElement, plane.Origin, plane.XVector, plane.YVector);

                //Create Layout
                RebarShapeDrivenAccessor rebarShapeDrivenAccessor = bar.GetShapeDrivenAccessor();

                rebarShapeDrivenAccessor.SetLayoutAsFixedNumber(10, UnitUtils.ConvertToInternalUnits(1800, DisplayUnitType.DUT_MILLIMETERS), true, true, true);

                createRebar.Commit();
            }

            #endregion&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Images&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arshadk_1-1643095016407.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1015703iE3ABE813EC2C8C8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arshadk_1-1643095016407.png" alt="arshadk_1-1643095016407.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arshadk_2-1643095057283.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1015705i3FB167986CC4CA17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arshadk_2-1643095057283.png" alt="arshadk_2-1643095057283.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631" target="_blank" rel="noopener"&gt;@naveen.kumar.t&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 07:20:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10903636#M21158</guid>
      <dc:creator>arshad.k</dc:creator>
      <dc:date>2022-01-25T07:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar Location Controlling</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10903991#M21159</link>
      <description>&lt;P&gt;I seem to remember this being discussed here in the past couple of months... I think you can find the answer by searching for "rebar cover". Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 10:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10903991#M21159</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-01-25T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar Location Controlling</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10917505#M21160</link>
      <description>&lt;P&gt;Dear &lt;SPAN&gt;Jeremy Tammik&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I searched, But I can't found what exactly I need. Can you guide me how to solve this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 05:10:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10917505#M21160</guid>
      <dc:creator>arshad.k</dc:creator>
      <dc:date>2022-01-31T05:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar Location Controlling</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10917646#M21161</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9736707"&gt;@arshad.k&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested the sample code you attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not getting any such errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used this sample code&lt;BR /&gt;&lt;STRONG&gt;Rebar bar = Rebar.CreateFromRebarShape(doc, rebarShape, rebarType, hostElement, planeF.Origin, new XYZ(1,0,0), new XYZ(0,1,0));&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which Revit version are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please send us a small non-confidential reproducible sample code(I think we already have the sample code) and a simple non-confidential Revit model(rvt file) to recreate the issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, send us the detailed step-by-step instructions for reproducing the issue(i.e)which plane to choose&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 07:08:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10917646#M21161</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2022-01-31T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar Location Controlling</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10941049#M21162</link>
      <description>&lt;P&gt;Please refer to the thread on&amp;nbsp;constraining stirrups to the cover of the host element for a complete answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/problem-with-constraining-stirrups-to-the-cover-of-the-host/td-p/10045899" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/problem-with-constraining-stirrups-to-the-cover-of-the-host/td-p/10045899&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 05:29:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-location-controlling/m-p/10941049#M21162</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-02-10T05:29:13Z</dc:date>
    </item>
  </channel>
</rss>

