Reply To: How to insert a new Tab on default ArchiCad windows/Doors

Home Forums Problems and solutions in GDL Doors and windows How to insert a new Tab on default ArchiCad windows/Doors Reply To: How to insert a new Tab on default ArchiCad windows/Doors

Dominika Bobály

The screenshots were taken in AC18, right? If so, do the following steps:

  1. from the master script of the door, open “gs_general_lt_door_macro” macro
  2. look for ! Tabpage Structure Definition part of the UI script in the macro
  3. find the last tabpage definition (which is the Parameters for Listing in general, displayed in every DW object):
    gs_stUI[i] = titleListing:				gs_icoUI[i] = "ui_tabpage_listing(13)":				gs_idUI[i] = 0: i=i+1
  4. duplicate it with copy-paste, and fill up according to your new tabpage, for example:
    gs_stUI[i] = “My Tabpage Title”: gs_icoUI[i] = “nameOfMyPageIcon”: gs_idUI[i] = 0: i=i+1
    Leave the gs_idUI[i] with 0 value. The “GS Door Functions” macro handles the pages with fix IDs (non zero), while the rest of the pages get their ID in the returned parameters of the macro call in variables like myPage_9. There are 20 slots for extra pages. Just add a new return value for your new page, myPage_10 in doors, for example. That will be the last used index.
  5. look for the variable myPage_ListingId in the script, and wherever you find it with value assignation, do the following (in cases you want to insert your page, depending on the existing conditions):
    myPage_ListingId			= myPage_9
    myPage_NewPageId			= myPage_10 !always the next index after the listing one
  6. Do this in all the needed places. This ensures the continuous indexing of pages, so the Prev-Next buttons will work for your new page as well. I think the best is to include it into every condition to make sure (7 or 8 places alltogether).
  7. look for the line if myPage_ListingId > 0 then. This is a condition to show the Parameter for Listing page. Copy-paste the whole condition, and modify to fit your new page:
    if myPage_NewPageId > 0 then
    	ui_page myPage_NewPageId
    	! your UI script here
  8. You can either code the content of the page there, or create a macro and call it from within the condition.

    This should work for AC18. Look for similarities in window macros as well (almost the same).
    If you need solution for AC19, let me know, because that is a lot different (and a bit more flexible).

Dominika Bobály
Product Manager