<?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 COLU_CORE_BMAT_NAME remains empty when writing to TXT via Label in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/COLU-CORE-BMAT-NAME-remains-empty-when-writing-to-TXT-via-Label/m-p/695888#M8344</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m struggling with a Label script associated with Column elements (used as pile foundations). I am trying to sync data between these Labels and a "Legend Object" by writing to an external text file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Goal:&lt;/STRONG&gt; Each associative Label on a pile (Column tool) writes its Building Material (&lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt;) to a &lt;CODE&gt;.txt&lt;/CODE&gt; file. A separate Legend Object then reads this file to automatically list only the pile types actually used in the project.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Issue:&lt;/STRONG&gt; The variable &lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt; returns an empty string in the exported &lt;CODE&gt;.txt&lt;/CODE&gt; file, even though the Label displays the information correctly on the floor plan.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Observed Behavior:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The value is &lt;STRONG&gt;only&lt;/STRONG&gt; written to the TXT file if I manually open the &lt;STRONG&gt;Label Selection Settings&lt;/STRONG&gt; or the &lt;STRONG&gt;Column Settings&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;On a regular Floor Plan rebuild, library reload, or initial placement, the output file is updated, but the material name field is blank (while other strings/numbers in the same &lt;CODE&gt;OUTPUT&lt;/CODE&gt; line are written correctly).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;It seems the Global Variable isn't "fetched" or initialized in the Master Script's I/O context unless the element is explicitly activated in a dialog.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;The Code (Master Script):&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Codefragment&lt;/SPAN&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE class=""&gt;&lt;CODE class=""&gt;FILEstabiliteit = open("data", "ATstabiliteit.txt", "separator='\t', mode=wa, Library")

! 'test' and '1' are written, but COLU_CORE_BMAT_NAME is empty
output FILEstabiliteit, COLU_CORE_BMAT_NAME, 1, "test"

close FILEstabiliteit&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt; How can I force the Label to access the Column's &lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt; during a background rebuild? Is there a more reliable &lt;CODE&gt;REQUEST&lt;/CODE&gt; or a specific &lt;CODE&gt;GLOB_CONTEXT&lt;/CODE&gt; trick to ensure the associative data is available when the &lt;CODE&gt;OUTPUT&lt;/CODE&gt; command executes?&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated as this is the final link in my automated legend workflow!&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2026 13:02:12 GMT</pubDate>
    <dc:creator>DNU</dc:creator>
    <dc:date>2026-03-13T13:02:12Z</dc:date>
    <item>
      <title>COLU_CORE_BMAT_NAME remains empty when writing to TXT via Label</title>
      <link>https://community.graphisoft.com/t5/GDL/COLU-CORE-BMAT-NAME-remains-empty-when-writing-to-TXT-via-Label/m-p/695888#M8344</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m struggling with a Label script associated with Column elements (used as pile foundations). I am trying to sync data between these Labels and a "Legend Object" by writing to an external text file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Goal:&lt;/STRONG&gt; Each associative Label on a pile (Column tool) writes its Building Material (&lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt;) to a &lt;CODE&gt;.txt&lt;/CODE&gt; file. A separate Legend Object then reads this file to automatically list only the pile types actually used in the project.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Issue:&lt;/STRONG&gt; The variable &lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt; returns an empty string in the exported &lt;CODE&gt;.txt&lt;/CODE&gt; file, even though the Label displays the information correctly on the floor plan.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Observed Behavior:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The value is &lt;STRONG&gt;only&lt;/STRONG&gt; written to the TXT file if I manually open the &lt;STRONG&gt;Label Selection Settings&lt;/STRONG&gt; or the &lt;STRONG&gt;Column Settings&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;On a regular Floor Plan rebuild, library reload, or initial placement, the output file is updated, but the material name field is blank (while other strings/numbers in the same &lt;CODE&gt;OUTPUT&lt;/CODE&gt; line are written correctly).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;It seems the Global Variable isn't "fetched" or initialized in the Master Script's I/O context unless the element is explicitly activated in a dialog.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;The Code (Master Script):&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Codefragment&lt;/SPAN&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE class=""&gt;&lt;CODE class=""&gt;FILEstabiliteit = open("data", "ATstabiliteit.txt", "separator='\t', mode=wa, Library")

! 'test' and '1' are written, but COLU_CORE_BMAT_NAME is empty
output FILEstabiliteit, COLU_CORE_BMAT_NAME, 1, "test"

close FILEstabiliteit&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt; How can I force the Label to access the Column's &lt;CODE&gt;COLU_CORE_BMAT_NAME&lt;/CODE&gt; during a background rebuild? Is there a more reliable &lt;CODE&gt;REQUEST&lt;/CODE&gt; or a specific &lt;CODE&gt;GLOB_CONTEXT&lt;/CODE&gt; trick to ensure the associative data is available when the &lt;CODE&gt;OUTPUT&lt;/CODE&gt; command executes?&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated as this is the final link in my automated legend workflow!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 13:02:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/COLU-CORE-BMAT-NAME-remains-empty-when-writing-to-TXT-via-Label/m-p/695888#M8344</guid>
      <dc:creator>DNU</dc:creator>
      <dc:date>2026-03-13T13:02:12Z</dc:date>
    </item>
  </channel>
</rss>

