<?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: Empty subroutine breaks Interface Preview in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687258#M8200</link>
    <description>&lt;P&gt;Hi Laurentiu,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also tried it in AC28 on Windows. Got the behavior as you've described.&lt;/P&gt;
&lt;P&gt;It's a weird issue! Maybe the GDL interpreter is stuck in weird state.&lt;/P&gt;
&lt;P&gt;Tried a few things like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;switching object subtype&lt;/LI&gt;
&lt;LI&gt;put "END" command at beginning of UI script&lt;/LI&gt;
&lt;LI&gt;adding "END" and "GOSUB" commands&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;put "END" command in master script&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Nothing resolved the issue. Only saving and reopening works as you've mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I even managed to crash AC by running the GDL debugger with default params on the parameter script.&lt;BR /&gt;Report ID: AC28-2025-12-18-16-16-26-6822&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2025 16:19:03 GMT</pubDate>
    <dc:creator>BerndSchwarzenbacher</dc:creator>
    <dc:date>2025-12-18T16:19:03Z</dc:date>
    <item>
      <title>Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687083#M8189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I've found a bug with the Interface Preview of the GDL interface.&lt;/P&gt;
&lt;P&gt;I've definitely encountered it before many times, but now I can actually reproduce it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In short, whenever I introduce an erroneous subroutine and I run the Preview button it will break all future instances of the Preview even after I remove the problematic code.&lt;/P&gt;
&lt;P&gt;The only way to get the Preview to work afterwards, is to re-open the object and press Preview again. Then it works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running Archicad 28.3.1 (6100) INT&amp;nbsp; on Windows 10.&lt;/P&gt;
&lt;P&gt;Please let me know if it's only me or it's definitely a bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here are 3 steps to reproduce it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! Part one. Make a new object from scratch, and copy the following code in the Interface tab.
! ------------------------------------------------------------------------
ui_page 1, -1, "Page 1 Settings"
ui_outfield "Page 1", 1, 0

ui_page 2, -1, "Page 2 Settings"
ui_outfield "Page 2", 1, 0
! ------------------------------------------------------------------------
! Make sure you have the Hierarchical Pages active.
! You can run Check Script &amp;amp; Preview - all works fine.
! ------------------------------------------------------------------------


! Part Two. Copy the following code, where we introduce a subroutine without anything in it. 
! ------------------------------------------------------------------------
ui_page 1, -1, "Page 1 Settings"
ui_outfield "Page 1", 1, 0
	
ui_page 2, -1, "Page 2 Settings"
ui_outfield "Page 2", 1, 0

"Page1":
return
! ------------------------------------------------------------------------
! Run Check Script.
! You get "Return without Gosub" error.
! Run the Preview once, it looks like it works, but pages don't actually switch (check the text)
! Close the Preview and run again, and it's clearly broken.
! ------------------------------------------------------------------------


! Part three. Ok now let's try and fix it by removing the subroutine.
! Copy this clean code again.
! ------------------------------------------------------------------------
ui_page 1, -1, "Page 1 Settings"
ui_outfield "Page 1", 1, 0
	
ui_page 2, -1, "Page 2 Settings"
ui_outfield "Page 2", 1, 0
! ------------------------------------------------------------------------
! Run Check Script. It's OK.
! Run the Preview, and it's still broken. Idk why.
! To get the Preview working again, save the object &amp;amp; reopen it.
! ------------------------------------------------------------------------
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: I've also tested it on Archicad 29, Windows 11, and it's the same behaviour.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 13:01:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687083#M8189</guid>
      <dc:creator>Laurentiu</dc:creator>
      <dc:date>2025-12-18T13:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687091#M8190</link>
      <description>&lt;P&gt;I have always written it like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;iPageIDRoot 		=-1
iPageIDPage1		= 1
iPageIDPage2		= 2


! ==============================================================================
!UI_PAGES
! ==============================================================================

	UI_PAGE iPageIDPage1, iPageIDRoot, `Page 1 Settings`
		gosub "Page1"

	UI_PAGE iPageIDPage2, iPageIDRoot, `Page 2 Settings`
		gosub "Page2"


! ==============================================================================
END
! ==============================================================================


! ==============================================================================
!SUBROUTINES
! ==============================================================================




"Page1":
return



"Page2":
return
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 00:40:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687091#M8190</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-12-17T00:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687123#M8191</link>
      <description>&lt;P&gt;Thank you Barry, I do understand how to write subroutines for the interface, I've learned it from &lt;A href="https://www.youtube.com/@BarkingDogBIM" target="_self"&gt;Bruce&lt;/A&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My point was that the Interface Preview is bugging after previewing it with empty subroutines (and no "end' statements").&lt;/P&gt;
&lt;P&gt;My expected behaviour would be that the Preview would revert back to normal, and show the interface correctly after the code was fixed.&lt;/P&gt;
&lt;P&gt;I don't think it's expected to have to re-open the object just to preview the interface script.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 10:31:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687123#M8191</guid>
      <dc:creator>Laurentiu</dc:creator>
      <dc:date>2025-12-17T10:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687207#M8195</link>
      <description>&lt;P&gt;The code is not correct without the END statement and does not actually work as it does not allow you to change pages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I do agree it does seem to be a bug that even if you correct the code, you have to close and re-open the object for the preview to work correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 01:13:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687207#M8195</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-12-18T01:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687232#M8197</link>
      <description>&lt;P&gt;Thanks for confirming it Barry.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hopefully someone from Graphisoft&amp;nbsp;can take a look and confirm it as well. Who knows, maybe it's an easy fix.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:14:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687232#M8197</guid>
      <dc:creator>Laurentiu</dc:creator>
      <dc:date>2025-12-18T10:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687258#M8200</link>
      <description>&lt;P&gt;Hi Laurentiu,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also tried it in AC28 on Windows. Got the behavior as you've described.&lt;/P&gt;
&lt;P&gt;It's a weird issue! Maybe the GDL interpreter is stuck in weird state.&lt;/P&gt;
&lt;P&gt;Tried a few things like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;switching object subtype&lt;/LI&gt;
&lt;LI&gt;put "END" command at beginning of UI script&lt;/LI&gt;
&lt;LI&gt;adding "END" and "GOSUB" commands&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;put "END" command in master script&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Nothing resolved the issue. Only saving and reopening works as you've mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I even managed to crash AC by running the GDL debugger with default params on the parameter script.&lt;BR /&gt;Report ID: AC28-2025-12-18-16-16-26-6822&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 16:19:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687258#M8200</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-12-18T16:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Empty subroutine breaks Interface Preview</title>
      <link>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687267#M8201</link>
      <description>&lt;P&gt;Great. Thank you&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527"&gt;@BerndSchwarzenbacher&lt;/a&gt; for testing and confirming this bug.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 16:41:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Empty-subroutine-breaks-Interface-Preview/m-p/687267#M8201</guid>
      <dc:creator>Laurentiu</dc:creator>
      <dc:date>2025-12-18T16:41:47Z</dc:date>
    </item>
  </channel>
</rss>

