Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Script

Red
Enthusiast
Hopefully this is possible. Once I’m completely finished with Interface it will probably be about 10 pages. So what I wondering is there a wait to setup the first page as a menu with buttons that would take you to each page. Also each page would need a menu button to take you back to the menu. If this is possible does anyone have an example?
Thanks,
Red

i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
19 REPLIES 19

Anonymous
Not applicable
Hello Red

Take a look to the Olivier Dentan' library to see his way to manage his interface script You can download here http://perso.wanadoo.fr/archilib.od/ac8eng.html —for the english version—.

When he have several pages he use a variable — by example "npage" for his Window "Fen_XVT_OD"— which always present in his interface and which permit to switch from a page to an other —the first like the other…—.

The remainder of the page is conditioned by this variable and changes each time the parameter "npage" varies.

Take a look and try, I hope that that will help you more than my explanations…

Anonymous
Not applicable
Another approach I have used is to use only one "Page" but use buttons to select the code with subroutines.

There was a thread in the german GDL-Talk of the ArchiCAD-Forum some years ago, where I described different methods for UI-Pageturn.

www.a-null.com/ubb/ultimatebb.php?ubb=get_topic;f=6;t=000041
Joachim Suehlo . AC12-25 . MAC OSX 10.15 . WIN10

Anonymous
Not applicable
Joachim wrote:
There was a thread in the german GDL-Talk of the ArchiCAD-Forum some years ago, where I described different methods for UI-Pageturn.
Danke sehr Joachim

Great tip and GDL Lesson from a great forum that I know but where I don't go enough…
It is hard to speak —write…— English for me and I promise to make effort to speak—read… in a first time…— german too.

Anonymous
Not applicable
One can use ui_infield{2} to build UI. I don't think there is a perfect solution. Each one has advantages and objections.
Pro : allows to see the complete page list and access to any page in one click. Fast
Cons : reduces the space allowed for each page.
No way to get rid of the right scroll bar, when not desired, to get more free space.
More time consuming to create and adjust the buttons image.

Despite limitations, i like this one. Example below
http://perso.wanadoo.fr/archilib.od/Sporting_Pool.pdf

Other ways exist. Look at Joachim Suehlo's tutorial.

Last, API programers can define the size of their UI window, i would like the same for GDL scripters. 443 x 266 is too much limited.
May be this is for the whishlist.

Olivier,
interesting page turning in your pdf-file. I like it.

How do you use UI_INFIELD{2} for pageturning?
That interests me much.

The ui dimension is not limited in width since ArchiCAD 8; it is not documented but it works.
See example below:

(You have to deactivate the left parts of the object settings dialog, then you can stretch the remainig window to size and the ui gets wider too.)
Joachim Suehlo . AC12-25 . MAC OSX 10.15 . WIN10

Anonymous
Not applicable
Hello Joachim,

I will answer you privately tomorrow, if you agree, too late for me tonight.
I, too, have some technical questions about your tutorial.
Because it is in German, may be i am missing some points.

About ui_infield{2}, i guess i am not the only one to use it.
There was a great example from LiHigh on this forum, and i feel other people can do the same.

For the second part of your post, yes, i remember a previous thread from yourself.
But this looks a bit like a workaround, don't you agree? I would like just more freedom in UI size for GDL scripters.
See you later.

F_ Beister
Booster
But this looks a bit like a workaround,...
which GS could stop anytime and your objects will not work anymore.

Anonymous
Not applicable
Joachim wrote:
There was a thread in the german GDL-Talk of the ArchiCAD-Forum some years ago, where I described different methods for UI-Pageturn.

www.a-null.com/ubb/ultimatebb.php?ubb=get_topic;f=6;t=000041
Hi Joachim,

I did a try with your method. Thanks for your explanations.
I used dummy ui_buttons, instead of ui_pict images, easy and fast to script.
Just added an ui_pict frame macro to "highlight" the buttons, because they are not grayed when clicked.
The turn page function is the same one as you describe in your tutorial, background boolean ui_infields.
This seems to me a good compromise.

Anonymous
Not applicable
Attached, a UI PageTurn object.
Explanations inside the object, for AC 8.1 & 9.

This is a variation around the original idea from Joachim Suehlo.
The main advantage of Joachim's method : one can jump directly from page 1 to page 5.

Fast and easy to script, if you don't need images to illustrate buttons.
Enjoy.


Attachment deleted by the author: see next posts

Anonymous
Not applicable
An image, showing the result.
UI PageTurn.jpg

Rob
Graphisoft
Graphisoft
Olivier,

I quite like your concept with buttons as it is really easy to code that crossplatformly but you're getting a bit ugly artefacts when double-clicking on a button (see attached image)...and that makes me wonder if it's worth it...
::rk

Anonymous
Not applicable
Rob wrote:
Olivier,

I quite like your concept with buttons as it is really easy to code that crossplatformly but you're getting a bit ugly artefacts when double-clicking on a button (see attached image)...and that makes me wonder if it's worth it...
Hi Rob,

Why to click twice? Once is enough.
You are right, in case of double-click the background button remains.
I did a small rectification, surely one can do better. Any idea is welcome.

Joachim just remembers to me that the UI pageturn method with booleans is from Roberto Corona.
That's true. My apologies to Roberto. I have rectified this too, into the object.
Joachim did the adaptation with ui_pict for masking the boolean buttons.


Attachment deleted by the author: see next post

Anonymous
Not applicable
Finaly i got it !!!

A simple (one pixel) ui_pict "pix_red", 0, 0
placed anywhere in the script, but WITHOUT x & y dimensions, and this does the trick.
In case of double-clicking, all is fine.

This is so weird, but it works. Mysteries of GDL.

Rob
Graphisoft
Graphisoft
sorry Olivier,

I didn't get back to you after my initial comment because I've got absolutely hammered at work. I'll test this one for sure...
::rk

gerd
Newcomer
great !

here are some ideas to make it work in archicad 7 (I think it will also work in archicad 6.5).
here are some differences betwenn 7.0 and later versions:
- In archiCAD 7 the width of the user interface is smaller and if we place elements outside, nothing is displayed (even not the elements inside). so we need to make the buttons smaller (see below)
- couriously the button placed in the negative space makes no problem, so we can leave this like it is now.
- the problem with the grayed out button (the first one) didn't occure in 7.0, so (if we want) we can leave it, but like mentioned above, it makes no problems
- to avoid the ckeckbox, if a button is double clicked: the method with the 0x0 pixel gif does not work in 7.0, so we need to use the more complicate method shown in the UI_pageturn2.zip

to check, if archicad 7 or 6.5 is in use, we can do it this way:
!!! additional method for usage in archicad 7 by gerd schneider
!!! change size of buttons for archicad versions 7.0 and maybe 6.5
!!! maybe the limit value for the gdl version is not correct

gdlv = req("GDL_Version")
if gdlv < 1.279 and bpos = 0 then      ! archicad 7.0r3 gdlv1.278
	xx = 44    ! button length 
	yy = 22    ! button height 
else
	xx = 63    ! button length
	yy = 22    ! button height
endif
the same method can be used in the script changing the parameters of but1, but2...

ok, maybe it is too complicated to make one object working well in several archicad versions,
I don't know, how many people work with the 7.0 and the startedition and if it is really necessary to develop gdl's working with older versions, but perhaps it is interesting for some of you.

best regards, gerd

gerd
Newcomer
one additional remark to the methods used to change the page
(the part from roberto corona) and cover the ckeckboxes with buttons (olivier dentan): when i use it in archicad 7 with the modifications I told, the doubleclick on another button than the selected one
- page 1 gets active (method from ui---2 :parameterscript)
- the double clicked button gets active (better!), but the ckeckbox gets visible (method from ui---3 :parameterscript)

but with one klick it works well.
best regards, gerd

Anonymous
Not applicable
Danke Gerd,

I have deleted the two previous versions, to avoid confusion.
Using the third and last version, you don't jump to another page in case of double-clic.
Same thing if you adapt the UI for AC 7.

To clarify a point, the checkbox (boolean) shows through the button during a fraction of second,
the time during which it is clicked or double clicked, but it disapears after.
This happens too, with Joachim's method, one can't avoid it.
One may don't like that, for myself, it is a minor desagreement, compared to the flexibility.

I did a try on AC 7, and your script works.
The first button is not greyed on 7, that's true.

On Mac, with AC 7, if i delete the (ui_pict "pix_red", 0, 0), i get the same artefact pointed by Rob.
Curiously, if i delete it, it works fine only for the double button, when i double-click it.
Still weird.

Anonymous
Not applicable
Following my investigations, i have found this.
For ui_infield using arrays, there is no way to add a title on the button (in place of the four squares).

Using the "dummy" ui_button command, one can add a title overlapping the original button.
It works the same. See code with attachment.

Of course, i know that it is the kind of feature that GS can change at any time.
If they do, for next release, i hope they will replace this workaround by a new "official" feature, allowing the same result.

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!