<?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: UI Page Nav in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288425#M7560</link>
    <description>Try to use &lt;BR /&gt;
....... Gosub "page_2"&lt;BR /&gt;
....... Gosub "page_1"&lt;BR /&gt;
&lt;BR /&gt;
!Page 1&lt;BR /&gt;
"page_1":&lt;BR /&gt;
.......&lt;BR /&gt;
return&lt;BR /&gt;
&lt;BR /&gt;
!Page 2&lt;BR /&gt;
"page_2":&lt;BR /&gt;
........</description>
    <pubDate>Wed, 01 Jun 2016 08:44:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-01T08:44:43Z</dc:date>
    <item>
      <title>UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288424#M7559</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hello,&lt;BR /&gt;
I'm getting fairly desperate trying to create page navigation for a UI!&lt;BR /&gt;
I'm using Acad 15.&lt;BR /&gt;
&lt;BR /&gt;
I have tried a number of different methods I have found around the net, but I cannot get any of them working and it is driving me up the wall!&lt;BR /&gt;
&lt;BR /&gt;
The code below is the closest I could get it to work, where manually changing the&lt;B&gt; gs_ui_current_page&lt;/B&gt; parameter will display the desired page.  Clicking the button related to changing page DOES update the gs_ui_current_page parameter, but it doesn't change the page.&lt;BR /&gt;
In fact clicking &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ANY&lt;E&gt;&lt;/E&gt; &lt;B&gt;UI_BUTTON&lt;/B&gt; object clears the page!!!&lt;BR /&gt;
&lt;BR /&gt;
here is a small piece of stand alone code that I'm trying to get working.&lt;BR /&gt;
Please note i have also tried the ui_next and ui_prev methods with no luck.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;values "gs_ui_current_page", 1, 2

! parameter script
if GLOB_UI_BUTTON_ID = 1 then
        parameters gs_ui_current_page = 1
endif
if GLOB_UI_BUTTON_ID = 2 then
        parameters gs_ui_current_page = 2
endif

UI_CURRENT_PAGE gs_ui_current_page

ui_page 1
	UI_BUTTON UI_FUNCTION, "2", 0,50, 70,20, 2
	UI_BUTTON UI_LINK, "Visit", 200,180, 100,20, 0,
        "http://www.graphisoft.com"

ui_page 2
	UI_BUTTON UI_FUNCTION, "1", 0,50, 70,20, 1
	UI_BUTTON UI_LINK, "website", 200,180, 100,20, 0,
        "http://www.graphisoft.com"
&lt;/PRE&gt;

Help would be appreciated&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Jun 2016 02:57:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288424#M7559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-01T02:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288425#M7560</link>
      <description>Try to use &lt;BR /&gt;
....... Gosub "page_2"&lt;BR /&gt;
....... Gosub "page_1"&lt;BR /&gt;
&lt;BR /&gt;
!Page 1&lt;BR /&gt;
"page_1":&lt;BR /&gt;
.......&lt;BR /&gt;
return&lt;BR /&gt;
&lt;BR /&gt;
!Page 2&lt;BR /&gt;
"page_2":&lt;BR /&gt;
........</description>
      <pubDate>Wed, 01 Jun 2016 08:44:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288425#M7560</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-01T08:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288426#M7561</link>
      <description>Hi johnau,&lt;BR /&gt;
take a look at the "Interface" script in the object "Material Legend 15.gsm" in the Archicad 15 Library... 1.7 2D Elements 15 / Graphic Symbols 15 /;&lt;BR /&gt;
and its respective macro "ui_tabcontrol.gsm" (you must first EXTRACT the "ArchiCAD Library 15.lcf" container)</description>
      <pubDate>Wed, 01 Jun 2016 10:17:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288426#M7561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-01T10:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288427#M7562</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
EDIT&lt;BR /&gt;
&lt;BR /&gt;
Was too fast to respond without completely looking into the problem.&lt;BR /&gt;
You'll need the gs_ui_current_page integer parameter&lt;BR /&gt;
and
&lt;PRE&gt;VALUES "gs_ui_current_page" 1,2,3&lt;/PRE&gt;
in the parameter script.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Check this code and modify to your needs in the interface script. Is a basic interface script I created for a library globals object some time ago:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
!===PAGES==========
DIM pages[]
pages[1] = 'Some settings'
pages[2] = '2D Representation'
pages[3] = '3D options'
!================================================================================

UI_DIALOG "TITLE", 444, 296
UI_CURRENT_PAGE gs_ui_current_page

UI_PAGE gs_ui_current_page

UI_INFIELD{3} "gs_ui_current_page", 0,0, 300, 25,
	2, "",
	0, 0,
	1, 1, 1, 1,
	"",	pages[1], 1,
	"",	pages[2], 2,
	"", pages[3], 3

UI_BUTTON UI_PREV, "&amp;lt;&amp;lt;", 310, 2, 30, 20, 1	! Previous
UI_BUTTON UI_NEXT, "&amp;gt;&amp;gt;", 340, 2, 30, 20, 2	! Next

UI_STYLE 0,0


!*********************
UI_PAGE 1
!*********************
UI_OUTFIELD "SOME PARAMETERS", 0, 30, 0, 1,4

!*********************
UI_PAGE 2
!*********************
UI_OUTFIELD "OTHER", 0, 30, 0, 1,4

!*********************
UI_PAGE 3
!*********************
UI_OUTFIELD "SOME MORE PARAMETERS", 0, 30, 0, 1,4

&lt;/PRE&gt;

It should work.&lt;BR /&gt;
Best regards.</description>
      <pubDate>Thu, 02 Jun 2016 00:32:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288427#M7562</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2016-06-02T00:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288428#M7563</link>
      <description>&lt;BLOCKQUOTE&gt;johnau wrote:&lt;BR /&gt;Hello,&lt;BR /&gt;
I'm getting fairly desperate trying to create page navigation for a UI!&lt;BR /&gt;
I'm using Acad 15.&lt;BR /&gt;
&lt;BR /&gt;
I have tried a number of different methods I have found around the net, but I cannot get any of them working and it is driving me up the wall!&lt;BR /&gt;
&lt;BR /&gt;
The code below is the closest I could get it to work, where manually changing the&lt;B&gt; gs_ui_current_page&lt;/B&gt; parameter will display the desired page.  Clicking the button related to changing page DOES update the gs_ui_current_page parameter, but it doesn't change the page.&lt;BR /&gt;
In fact clicking &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ANY&lt;E&gt;&lt;/E&gt; &lt;B&gt;UI_BUTTON&lt;/B&gt; object clears the page!!!&lt;BR /&gt;
&lt;BR /&gt;
here is a small piece of stand alone code that I'm trying to get working.&lt;BR /&gt;
Please note i have also tried the ui_next and ui_prev methods with no luck.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;values "gs_ui_current_page", 1, 2

! parameter script
if GLOB_UI_BUTTON_ID = 1 then
        parameters gs_ui_current_page = 1
endif
if GLOB_UI_BUTTON_ID = 2 then
        parameters gs_ui_current_page = 2
endif

UI_CURRENT_PAGE gs_ui_current_page

ui_page 1
	UI_BUTTON UI_FUNCTION, "2", 0,50, 70,20, 2
	UI_BUTTON UI_LINK, "Visit", 200,180, 100,20, 0,
        "http://www.graphisoft.com"

ui_page 2
	UI_BUTTON UI_FUNCTION, "1", 0,50, 70,20, 1
	UI_BUTTON UI_LINK, "website", 200,180, 100,20, 0,
        "http://www.graphisoft.com"
&lt;/PRE&gt;

Help would be appreciated&lt;/BLOCKQUOTE&gt;

As for your code, it works; provided you have the gs_ui_current_page integer parameter and put the bits of code in the corresponding scripts:&lt;BR /&gt;
&lt;BR /&gt;
PARAMETER SCRIPT
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;values "gs_ui_current_page" 1, 2 !You had an extra comma here

if GLOB_UI_BUTTON_ID = 1 then
        parameters gs_ui_current_page = 1
endif
if GLOB_UI_BUTTON_ID = 2 then
        parameters gs_ui_current_page = 2
endif
&lt;/PRE&gt;

INTERFACE SCRIPT
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;UI_CURRENT_PAGE gs_ui_current_page

ui_page 1
	UI_BUTTON UI_FUNCTION, "2", 0,50, 70,20, 2
	UI_BUTTON UI_LINK, "Visit", 200,180, 100,20, 0,
        "http://www.graphisoft.com"

ui_page 2
	UI_BUTTON UI_FUNCTION, "1", 0,50, 70,20, 1
	UI_BUTTON UI_LINK, "website", 200,180, 100,20, 0,
        "http://www.graphisoft.com"
&lt;/PRE&gt;

Best regards</description>
      <pubDate>Fri, 03 Jun 2016 00:45:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288428#M7563</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2016-06-03T00:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: UI Page Nav</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288429#M7564</link>
      <description>Thank you nGhost, andro55 and sinceV6.&lt;BR /&gt;
As some of you mentioned, some refactoring was required (moved the UI to the interface area, and also added the values to the gs_ui_current_page param (thanks sinceV6).&lt;BR /&gt;
&lt;BR /&gt;
It turned out for some reason I could not do:
&lt;PRE&gt;PAGE_ONE = 1
PAGE_TWO = 2

UI_PAGE PAGE_ONE

! // code here

UI_PAGE PAGE_TWO

! // code here&lt;/PRE&gt;

but instead had to just use
&lt;PRE&gt;UI_PAGE 1
! // code here

UI_PAGE 2
! // code here&lt;/PRE&gt;

To get it working successfully.&lt;BR /&gt;
Anyway, thanks for your tips, it is now working enough to use, I will see if I can get things working a bit better by further breaking down your responses.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
edit: you guys are legends btw, this GDL stuff is doing my head in &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_razz.gif" style="display : inline;" /&gt;  I'm used to PHP and Python</description>
      <pubDate>Fri, 03 Jun 2016 03:42:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Page-Nav/m-p/288429#M7564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T03:42:00Z</dc:date>
    </item>
  </channel>
</rss>

