Got a minute? We appreciate your feedback:

Graphisoft Learn survey
GDL
About building parametric objects with GDL.

Passing Weblinks between values{2} list and Interface

GDL Enthusiast
Enthusiast

Hi, 

 

I would like to provide interface weblinks that change based on a values{2} list i.e.,

 

values{2} "WbLnk",  0, `www.google.com:`,

                    1, `www.youtube.com:`,

                    2, `www.facebook.com:`

 

UI_PICT_BUTTON UI_LINK, "", "Icon", 250, 100, 18, 18, 0, "WbLnk"

 

But that doesn't work...

 

My messy solution has multiple IF THEN statements in the interface script, each with their own weblink and text i.e.

 

IF WbLnk = 0 THEN     gosub "LinkA"

IF WbLnk = 1 THEN     gosub "LinkA"

! and so on...

 

end

 

"LinkA":
UI_PICT_BUTTON UI_LINK, "", "Weblink_Icon", 250, 100, 18, 18, 0, "www.google.com"
return


! and so on...

 

Is there a way to have UI_OUTFIELD and UI_PICT_BUTTON UI_LINK fed "www" address info from the values{2} list? 

 

Many thanks, Matt

1 ACCEPTED SOLUTION
2 REPLIES 2

Solution
A_ Smith
Expert

Because you are inserting WbLnk value, which is INTEGER. Just change in Parameters tab it to STRING (Abc) type and of course in Parameter script change values{2} to simply values

AC 22, 24 | Win 10

Thank you so much, that solves it! Most appreciated A_Smith!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!