We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-11-20 11:14 PM - last edited on 2024-09-26 01:33 PM by Doreena Deng
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
Solved! Go to Solution.
2023-11-21 08:13 AM
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
2023-11-21 08:13 AM
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
2023-11-21 07:26 PM
Thank you so much, that solves it! Most appreciated A_Smith!
2023-12-08 02:30 PM
You can also do it with parvalue_description if using values{2}.
2023-12-08 09:46 PM
That is a new peice of code for me, thank you Peter for introducing me to it!
Many thanks, Matt