We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Interface page navigation

Bruce
Advisor
I'm developing a fairly complex object that will have many pages in the UI. I'm trying to mimic the ArchiCAD door page selection method (to keep it familiar for users) but can't figure out how to get the drop-down page selection working with the PREV and NEXT buttons.

(I've tried to figure out how Graphisoft do it, but have gotten completely lost amongst all their macro calls.)

If I set the UI_CURRENT_PAGE via the drop down selection, the UI_PREV and UI_NEXT don't work, and vice versa.

Any hints?

Thanks
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
5 REPLIES 5
Anonymous
Not applicable
If I understand correctly, here's a simple example with reference to the standard macro = "ui_tabcontrol"
You create a parameter = "gs_ui_current_page"
tabTitles - You can also create a parameter or make the array directly in the script interface.
!!!PARAMETERS SCRIPT 
!!! You must create the parameter named=gs_ui_current_page

VALUES "gs_ui_current_page" 1,2,3	

IF GLOB_UI_BUTTON_ID > 2 and GLOB_UI_BUTTON_ID < 2.1 THEN
	PARAMETERS gs_ui_current_page = GLOB_UI_BUTTON_ID - 2
ENDIF

!!! INTERFACE SCRIPT
UI_DIALOG "SL-GDL" ! Your any text

UI_CURRENT_PAGE gs_ui_current_page
UI_PAGE gs_ui_current_page

DIM tabTitles[3]
	tabTitles[1] = " Parameters"
	tabTitles[2] = " Represent"
	tabTitles[3] = " Info"

UI_BUTTON ui_prev, "<<", 295+10,2, 32,21, gs_ui_current_page - 1 !!!! Previous
UI_BUTTON ui_next, ">>", 295+10+33,2, 32,21, gs_ui_current_page + 1 !!! Next page

!!! HEAD
!!! Example without icons
CALL "ui_tabcontrol" parameters	controlType = 1,
		nTabs = 3,
		gs_ui_current_page = gs_ui_current_page,
		tabTitles = tabTitles,
		drawBox = 1

!!! PAGES

  UI_PAGE 1 
  UI_PAGE 2
  UI_PAGE 3
Gergely Feher
Graphisoft
Graphisoft
Her is a sample for handling ui pages: http://gdl.graphisoft.com/tips-and-tricks/how-to-set-up-tabpage-controlling-in-ui/
_________________
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
Anonymous
Not applicable
Standard macros is a good thing, but there is always the danger that in a new release of version of the GS change the script (or remove some parameters) so that the element will stop working. Well if this is a basic macro that you give a link CALL "...", but if it happens in other levels? Eg. windows - doors, a large number of macros. Modern elements are so complex and they have a CALL "..." a few times (possibly in a circle inside).
Bruce
Advisor
Thanks guys - a great help. Don't understand it yet, but I'll get there. Ta
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Bruce
Advisor
Got it working. Turns out the key was adding the "gs_ui_current_page - / + 1" in the UI_BUTTON command.
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb