<?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: Robot API - Get section color in Robot Structural Analysis Forum</title>
    <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14241989#M86960</link>
    <description>&lt;P&gt;&lt;STRONG&gt;What's new&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Faster, more robust, and theme-independent: the active theme, font, and text color are automatically detected from Robot's configuration files.&lt;/P&gt;
&lt;P&gt;Parallel processing: OCR and image analysis run in parallel on captured images while Robot continues capturing the next batches.&lt;/P&gt;
&lt;P&gt;Large legends are handled automatically: items are split into batches, captured successively, and the results are then merged.&lt;/P&gt;
&lt;P&gt;Result: reliable color extraction across any theme, with support for large models and no manual configuration required.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Workbook + tool attached to msg #5&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2026 14:01:00 GMT</pubDate>
    <dc:creator>Stephane.kapetanovic</dc:creator>
    <dc:date>2026-09-01T14:01:00Z</dc:date>
    <item>
      <title>Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14237456#M86936</link>
      <description>&lt;P&gt;I have a VBA code to export bar data to excel. I'm trying to add a feature to color the cell with the same color as the section, but I'm having trouble with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've managed to get the weight/m before, with&amp;nbsp;barsecdata.GetValue(I_BSDV_WEIGHT)&lt;/P&gt;&lt;P&gt;but there seems to be no label to get the color of the section...&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2026 16:05:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14237456#M86936</guid>
      <dc:creator>geralA8ZZM</dc:creator>
      <dc:date>2026-08-18T16:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14237629#M86939</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8834392"&gt;@geralA8ZZM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no Color property in IRobotBarSectionData.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2026 19:06:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14237629#M86939</guid>
      <dc:creator>Stephane.kapetanovic</dc:creator>
      <dc:date>2026-08-18T19:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14238041#M86941</link>
      <description>&lt;P&gt;And no workaround? No way to check what color is assigned to a section via API?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2026 07:10:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14238041#M86941</guid>
      <dc:creator>geralA8ZZM</dc:creator>
      <dc:date>2026-08-19T07:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14238154#M86943</link>
      <description>&lt;P&gt;There is no documented method for this, so you are essentially on your own.&lt;/P&gt;
&lt;P&gt;If you are creating a collection of sections from scratch, you could use an iterator to increment the color for each new section.&lt;/P&gt;
&lt;P&gt;The colors (AppSec_) are defined in the preference files according to the selected theme (e.g. Color.ini)&lt;/P&gt;
&lt;P&gt;There are other approaches by OCR and pixel-scanning of the legend image, but they are more verbose and complex to explain here.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2026 13:04:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14238154#M86943</guid>
      <dc:creator>Stephane.kapetanovic</dc:creator>
      <dc:date>2026-08-21T13:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14239761#M86950</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8834392"&gt;@geralA8ZZM&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;As a follow-up to this thread, I put together a small demo tool that solves this the "hard way" reading the color directly from the rendered legend, since there's no API property for it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stephanekapetanovic_0-1787243851497.png" style="width: 404px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1657411iCF5939E79D109B47/image-dimensions/404x213?v=v2" width="404" height="213" role="button" title="Stephanekapetanovic_0-1787243851497.png" alt="Stephanekapetanovic_0-1787243851497.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stephanekapetanovic_1-1787243892824.png" style="width: 158px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1657412i22171C207A2808E7/image-dimensions/158x213?v=v2" width="158" height="213" role="button" title="Stephanekapetanovic_1-1787243892824.png" alt="Stephanekapetanovic_1-1787243892824.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How it works&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open a Robot project containing bars with sections&lt;/LI&gt;
&lt;LI&gt;Open the attached Excel workbook and click the "Run" button.&lt;/LI&gt;
&lt;LI&gt;The program captures the active view as an image, locates the color legend in the bottom-right corner, and calibrates the scan width from the detected color swatches.&lt;/LI&gt;
&lt;LI&gt;It runs OCR on that calibrated legend area to read each section name, then writes a CSV (section name + RGB values) to your temp folder.&lt;/LI&gt;
&lt;LI&gt;The Excel macro reads that CSV back and lists each section with its color.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Before running it&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The .exe is unsigned, so most antivirus software will flag or quarantine it on first run, this is a not an actual detection. You'll need to add the extracted folder to your antivirus exclusion list before running it (Windows Security → Virus &amp;amp; threat protection → Manage settings → Exclusions → add the folder).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current limitation&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The software automatically detects the active theme, font, and text color. If the legend does not fit in the available space, as many views as necessary are created.&lt;/P&gt;
&lt;P&gt;With font sizes below 8 pt, some entries may be omitted if OCR cannot read them reliably or if they fail to meet the 7/15-character matching threshold.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using it in your own workflow&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The macro is meant as a starting point, not a finished tool, since the CSV gives you the section name and its RGB color side by side, you can match it against your own bar export by section name, and apply the color to whichever cell/column makes sense for your export.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Extra option (advanced)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The tool also supports extracting materials or member types instead of section colors, via a command-line flag:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/s&lt;/STRONG&gt; — bar sections (default, used by the demo workbook)&lt;BR /&gt;&lt;STRONG&gt;/m&lt;/STRONG&gt; — materials&lt;BR /&gt;&lt;STRONG&gt;/t&lt;/STRONG&gt; — member types&lt;/P&gt;
&lt;P&gt;If you want to try one of these from the macro, just append the flag to the Run call&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;ws.Run """" &amp;amp; exePath &amp;amp; """ /t", 0, True&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Honest caveat&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is a prototype built to solve the simple, common case, not a general-purpose solution for every theme, every view configuration, or very large models. If you run into a case it doesn't handle, feel free to reach out and I'll see what can be done.&lt;/P&gt;
&lt;P&gt;Workbook + tool attached below. &lt;FONT size="2" color="#0000FF"&gt;Updated 26/08/26&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2026 09:00:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14239761#M86950</guid>
      <dc:creator>Stephane.kapetanovic</dc:creator>
      <dc:date>2026-08-26T09:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14241989#M86960</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What's new&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Faster, more robust, and theme-independent: the active theme, font, and text color are automatically detected from Robot's configuration files.&lt;/P&gt;
&lt;P&gt;Parallel processing: OCR and image analysis run in parallel on captured images while Robot continues capturing the next batches.&lt;/P&gt;
&lt;P&gt;Large legends are handled automatically: items are split into batches, captured successively, and the results are then merged.&lt;/P&gt;
&lt;P&gt;Result: reliable color extraction across any theme, with support for large models and no manual configuration required.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Workbook + tool attached to msg #5&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2026 14:01:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14241989#M86960</guid>
      <dc:creator>Stephane.kapetanovic</dc:creator>
      <dc:date>2026-09-01T14:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Robot API - Get section color</title>
      <link>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14243835#M86976</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8834392"&gt;@geralA8ZZM&lt;/a&gt;&lt;/SPAN&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing good! We wanted to follow up and see if you had a chance to review Stéphane Kapetanovic's reply. Did the information provided answer your question? If you need any further clarification or are still working through the issue, please let us know. We look forward to hearing from you.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2026 07:48:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-api-get-section-color/m-p/14243835#M86976</guid>
      <dc:creator>bhavani_sankuratri</dc:creator>
      <dc:date>2026-08-25T07:48:01Z</dc:date>
    </item>
  </channel>
</rss>

