<?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: Access to unit distribution in Forma Site Design Developer Forum</title>
    <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12886986#M224</link>
    <description>&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer. However, I try it on the building or the floor element and I only have this result, whereas I have some units :&lt;BR /&gt;{id: 'unit_count', name: 'Number of units', unitOfMeasurement: 'COUNT', value: 0}&lt;/P&gt;&lt;P&gt;Do you have an idea ?&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;Lucas&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2024 15:30:36 GMT</pubDate>
    <dc:creator>helpBJ5T4</dc:creator>
    <dc:date>2024-07-09T15:30:36Z</dc:date>
    <item>
      <title>Access to unit distribution</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12849679#M221</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to access the information contained in Area metrics &amp;gt; Units &amp;gt; Unit distribution ? I have checked the whole documentation about &lt;A href="https://app.autodeskforma.com/forma-embedded-view-sdk/docs/index.html" target="_blank" rel="noopener"&gt;forma-embedded-view-sdk&lt;/A&gt; but I can't find a way to access this information.&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="helpBJ5T4_0-1718811876292.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1377815iB5014AB1F8C92DEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="helpBJ5T4_0-1718811876292.png" alt="helpBJ5T4_0-1718811876292.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your answer!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:45:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12849679#M221</guid>
      <dc:creator>helpBJ5T4</dc:creator>
      <dc:date>2024-06-19T15:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Access to unit distribution</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12853441#M222</link>
      <description>&lt;P&gt;Hei&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12360625"&gt;@helpBJ5T4&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe you can find them under the &lt;A href="https://app.autodeskforma.com/forma-embedded-view-sdk/docs/classes/areaMetrics.AreaMetricsApi.html" target="_blank" rel="noopener"&gt;AreaMetrics API&lt;/A&gt;. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;const currentlySelected = await Forma.selection.getSelection()
const areaMetrics = await Forma.areaMetrics.calculate({
  paths: currentlySelected
})

console.log(areaMetrics.unitStatistics)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 09:45:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12853441#M222</guid>
      <dc:creator>md_amjad_hossain</dc:creator>
      <dc:date>2024-07-10T09:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Access to unit distribution</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12886981#M223</link>
      <description>&lt;P&gt;Hi !&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your answer. However, I try it on the building or the floor element and I only have this result, whereas I have some units :&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;'unit_count'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;'Number of units'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;unitOfMeasurement&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;'COUNT'&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Do you have an idea ?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot !&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 15:28:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12886981#M223</guid>
      <dc:creator>helpBJ5T4</dc:creator>
      <dc:date>2024-07-09T15:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Access to unit distribution</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12886986#M224</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer. However, I try it on the building or the floor element and I only have this result, whereas I have some units :&lt;BR /&gt;{id: 'unit_count', name: 'Number of units', unitOfMeasurement: 'COUNT', value: 0}&lt;/P&gt;&lt;P&gt;Do you have an idea ?&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;Lucas&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 15:30:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12886986#M224</guid>
      <dc:creator>helpBJ5T4</dc:creator>
      <dc:date>2024-07-09T15:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Access to unit distribution</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12888648#M225</link>
      <description>&lt;P&gt;Hei&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12360625"&gt;@helpBJ5T4&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe the whole point of API is to give you the information already available on the screen. So, If you want to produce/get the information regarding the unit distribution, I would recommend&amp;nbsp;&lt;STRONG&gt;drawing a House Under Building tool&lt;/STRONG&gt;. Now If I select that building and then perform the below operations -&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;const currentlySelected = await Forma.selection.getSelection()&lt;/LI-CODE&gt;
&lt;P&gt;Then I would get something like&amp;nbsp;&lt;STRONG&gt;['root/12bdf6d'],&amp;nbsp;&lt;/STRONG&gt;the path of that selected building/element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;const areaMetrics = await Forma.areaMetrics.calculate({
  paths: currentlySelected
})&lt;/LI-CODE&gt;
&lt;P&gt;Now, this will give me an array of objects -&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;{customMetrics: Array(3), builtInMetrics: {…}, unitStatistics: {…}, parkingStatistics: {…}}&lt;/LI-CODE&gt;
&lt;P&gt;And from that object, one can retrieve the `UnitStatistics`.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;And, the whole point here is, does the information available on the screen/proposal?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:16:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/access-to-unit-distribution/m-p/12888648#M225</guid>
      <dc:creator>md_amjad_hossain</dc:creator>
      <dc:date>2024-07-10T10:16:40Z</dc:date>
    </item>
  </channel>
</rss>

