UI Page Nav
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-01 04:57 AM
2016-06-01
04:57 AM
I'm getting fairly desperate trying to create page navigation for a UI!
I'm using Acad 15.
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!
The code below is the closest I could get it to work, where manually changing the gs_ui_current_page 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.
In fact clicking
here is a small piece of stand alone code that I'm trying to get working.
Please note i have also tried the ui_next and ui_prev methods with no luck.
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"Help would be appreciated
5 REPLIES 5
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-01 10:44 AM
2016-06-01
10:44 AM
Try to use
....... Gosub "page_2"
....... Gosub "page_1"
!Page 1
"page_1":
.......
return
!Page 2
"page_2":
........
....... Gosub "page_2"
....... Gosub "page_1"
!Page 1
"page_1":
.......
return
!Page 2
"page_2":
........
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-01 12:17 PM
2016-06-01
12:17 PM
Hi johnau,
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 /;
and its respective macro "ui_tabcontrol.gsm" (you must first EXTRACT the "ArchiCAD Library 15.lcf" container)
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 /;
and its respective macro "ui_tabcontrol.gsm" (you must first EXTRACT the "ArchiCAD Library 15.lcf" container)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-02 02:32 AM
2016-06-02
02:32 AM
Hi.
EDIT
Was too fast to respond without completely looking into the problem.
You'll need the gs_ui_current_page integer parameter
and
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:
Best regards.
EDIT
Was too fast to respond without completely looking into the problem.
You'll need the gs_ui_current_page integer parameter
and
VALUES "gs_ui_current_page" 1,2,3in the parameter script.
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:
!===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, "<<", 310, 2, 30, 20, 1 ! Previous UI_BUTTON UI_NEXT, ">>", 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,4It should work.
Best regards.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-03 02:45 AM
2016-06-03
02:45 AM
johnau wrote: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:
Hello,
I'm getting fairly desperate trying to create page navigation for a UI!
I'm using Acad 15.
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!
The code below is the closest I could get it to work, where manually changing the gs_ui_current_page 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.
In fact clickingANYUI_BUTTON object clears the page!!!
here is a small piece of stand alone code that I'm trying to get working.
Please note i have also tried the ui_next and ui_prev methods with no luck.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"Help would be appreciated
PARAMETER SCRIPT
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 endifINTERFACE SCRIPT
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"Best regards
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-03 05:42 AM
2016-06-03
05:42 AM
Thank you nGhost, andro55 and sinceV6.
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).
It turned out for some reason I could not do:
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.
Thanks again.
edit: you guys are legends btw, this GDL stuff is doing my head in
I'm used to PHP and Python
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).
It turned out for some reason I could not do:
PAGE_ONE = 1 PAGE_TWO = 2 UI_PAGE PAGE_ONE ! // code here UI_PAGE PAGE_TWO ! // code herebut instead had to just use
UI_PAGE 1 ! // code here UI_PAGE 2 ! // code hereTo get it working successfully.
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.
Thanks again.
edit: you guys are legends btw, this GDL stuff is doing my head in
