Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.
2016-06-01 04:57 AM
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
2016-06-01 10:44 AM
2016-06-01 12:17 PM
2016-06-02 02:32 AM
VALUES "gs_ui_current_page" 1,2,3in the parameter script.
!===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.
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
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
2016-06-03 05:42 AM
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.