<?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: Create dimension between rebars in set in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12473643#M7907</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rebarsInSetRef count is equal to rebar.Quantity...&lt;/P&gt;&lt;P&gt;I took 2 of those references, and still get the&amp;nbsp;&lt;SPAN&gt;"Invalid number of references".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Method B seems to be the right way&lt;/STRONG&gt;. I've been trying to use this for DAYS, but only got a single line. Suddenly yesterday, it worked out and I got a lot of curves. I don't know if Revit has automatic updates or something(I am using 2024.2.0) , or just a memory leak bug in Revit, But I noticed that all the recent projects on the Revit home screen were gone, so something happened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I saw here in the forum other users who complained that they only get one line.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 08:04:12 GMT</pubDate>
    <dc:creator>atir5UTNF</dc:creator>
    <dc:date>2024-01-03T08:04:12Z</dc:date>
    <item>
      <title>Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12469454#M7905</link>
      <description>&lt;P&gt;I have rebars set and I need to create between all/selected of them.&lt;/P&gt;&lt;P&gt;The result I need:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atir5UTNF_0-1704009245610.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1309104iDECFA6F138D83A0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atir5UTNF_0-1704009245610.png" alt="atir5UTNF_0-1704009245610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method A - Use Reference to SubElements&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;List&amp;lt;Reference&amp;gt; rebarsInSetRef = rebar.GetSubelements().Where(s =&amp;gt; s.Element is Rebar).Select(s =&amp;gt;s.GetReference()).Cast&amp;lt;Reference&amp;gt;().ToList();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when I tried to use those references to create the dimension it throws an Exception:&lt;/P&gt;&lt;P&gt;"Invalid number of references".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method B - Compute References for Geometry&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Options options = new Options();
options.ComputeReferences = true;
options.IncludeNonVisibleObjects = true;
options.View= curView;
GeometryElement geometryElement = rebar.get_Geometry(options);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but geometryElement has only single line element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method C - Create reference to rebars&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ReferenceArray referenceArray = new ReferenceArray();
List&amp;lt;Rebar&amp;gt; rebars = rebar.GetSubelements().Where(s =&amp;gt; s.Element is Rebar).Select(s =&amp;gt; s.Element as Rebar).ToList();
referenceArray.Append(new Reference(rebars[0]));
referenceArray.Append(new Reference(rebars[1]));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when I tried to use those references to create the dimension it throws an Exception:&lt;/P&gt;&lt;P&gt;"The references are not geometric references".&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 09:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12469454#M7905</guid>
      <dc:creator>atir5UTNF</dc:creator>
      <dc:date>2023-12-31T09:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12473029#M7906</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12639127"&gt;@atir5UTNF&lt;/a&gt;Seems like Method A would be your best bet. First what is the count of references in rebarInSetRef? Are you getting 10 as your image shows? Last, please post your code for dimensioning in Method A.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 21:33:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12473029#M7906</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2024-01-02T21:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12473643#M7907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rebarsInSetRef count is equal to rebar.Quantity...&lt;/P&gt;&lt;P&gt;I took 2 of those references, and still get the&amp;nbsp;&lt;SPAN&gt;"Invalid number of references".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Method B seems to be the right way&lt;/STRONG&gt;. I've been trying to use this for DAYS, but only got a single line. Suddenly yesterday, it worked out and I got a lot of curves. I don't know if Revit has automatic updates or something(I am using 2024.2.0) , or just a memory leak bug in Revit, But I noticed that all the recent projects on the Revit home screen were gone, so something happened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I saw here in the forum other users who complained that they only get one line.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 08:04:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12473643#M7907</guid>
      <dc:creator>atir5UTNF</dc:creator>
      <dc:date>2024-01-03T08:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12474608#M7908</link>
      <description>&lt;P&gt;Interesting. Its very possible that patching up to 2024.2 fixed whatever was happening, pre that version 2024 has issues...so much we refused to use it, and are still very wary of it even after that patch. Glad to hear its working, please mark your solution as the solution for others to find.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 16:35:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12474608#M7908</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2024-01-03T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12475923#M7909</link>
      <description>&lt;P&gt;I'm still waiting for an official answer from an Autodesk employee.&lt;/P&gt;&lt;P&gt;I want to know how they do it when user create dimension in the UI.&lt;BR /&gt;Is it normal that I can't use sub-elements references?&amp;nbsp;What are they used for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 07:56:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/12475923#M7909</guid>
      <dc:creator>atir5UTNF</dc:creator>
      <dc:date>2024-01-04T07:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create dimension between rebars in set</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/14074669#M85434</link>
      <description>&lt;P&gt;Tôi cũng đang gặp vấn đề tương tự, hy vọng khi có kết quả bạn có thể chia sẻ để mọi người cùng biết!&amp;nbsp;&lt;BR /&gt;Trân trọng cảm ơn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2026 04:22:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-dimension-between-rebars-in-set/m-p/14074669#M85434</guid>
      <dc:creator>duytan59nuce</dc:creator>
      <dc:date>2026-04-02T04:22:25Z</dc:date>
    </item>
  </channel>
</rss>

