Home › Forums › Problems and solutions in GDL › Informations from the environment › WALL_SKINS_BMAT_NAMES
- This topic has 6 replies, 4 voices, and was last updated 8 years ago by
Gergely Fehér.
-
AuthorPosts
-
-
October 18, 2015 at 23:06 #1755
James Murray
ParticipantWhat’s the correct usage of this global? I assume the content is a string, so I’m trying to assign it to a string variable like so:
stringParam="" stringParam=WALL_SKINS_BMAT_NAMES[1]
But I get a warning of ‘Incompatible Array Definitions’. I can PRINT the global’s content and it reads correctly in the report.
James M
-
October 19, 2015 at 09:57 #1758
Dominika Bobály
KeymasterJames,
this global has one column and a number of rows equal to the skins number, so the form is:
WALL_SKINS_BMAT_NAMES[nSkins][1]The WALL_SKINS_NUMBER global returns the filled rows number of WALL_SKINS_BMAT_NAMES, and you can use it for running the iteration.
Try the following code (copy it to a window’s 2D script):text2 0, 2, "vardim1(WALL_SKINS_BMAT_NAMES) = " text2 7, 2, vardim1(WALL_SKINS_BMAT_NAMES) text2 0, 3, "vardim2(WALL_SKINS_BMAT_NAMES) = " text2 7, 3, vardim2(WALL_SKINS_BMAT_NAMES) text2 0, 4, "WALL_SKINS_NUMBER = " text2 7, 4, WALL_SKINS_NUMBER for ii = 1 to WALL_SKINS_NUMBER text2 10, ii*1, WALL_SKINS_BMAT_NAMES[ii][1] next ii
The PRINT command iterates through any array global without worrying about the array dimensions, that’s why it was working.
Dominika Bobály
Product Manager
GRAPHISOFT SE -
October 19, 2015 at 16:24 #1761
James Murray
ParticipantThank you!
James M
-
December 2, 2015 at 20:33 #1961
Heimo Mooslechner
ParticipantI have some problems with this parameter and the correct usage..
i wrote:
OFT = WALL_SKINS_NUMBER i=1 for ii = 1 to oft WSP[ii] = WALL_SKINS_PARAMS[ii][1] !Schraffur KernSTR = STR(WALL_SKINS_PARAMS[ii][6], 1,0) Kern = WALL_SKINS_PARAMS[ii][6] WSBN[ii]=WALL_SKINS_BMAT_NAMES[ii][1] !Baumaterial add2 0.15,0.02 style links t = REQUEST{2} ("Building_Material_info", WSBN[ii], "gs_bmat_surface", oberflaechen[ii]) !!S378 r = REQUEST ("Name_of_material", oberflaechen[ii], name[ii]) del 1 if ii = 1 then Aussenputz = oberflaechen[ii] if ii = oft then Innenputz = oberflaechen[ii] s=request("Name_of_fill",WALL_SKINS_PARAMS[ii][1],Schichtnamen[ii]) !Schichtnamen[ii]=WSBN[ii] Schichtdicken[ii]=WALL_SKINS_PARAMS[ii][2] !Dicke if KernSTR="3" then WoKern = ii else Gesamtdicke = Gesamtdicke + Schichtdicken[ss] endif add2 0, -0.015 next ii del oft-1 for ss = 1 to WoKern-1 Dickensumme = Dickensumme + Schichtdicken[ss] next ss
in the 2D-Script – i got correct answers from it.
there i wrote:
for ii = 1 to oft add2 0, 0.05 text2 0,0,oberflaechen[ii] Text2 0.2,0, Aussenputz !! nur als Test - schreibt brav 18 hin next ii del oft-1
BUT – in the 3D-Code – i got Just 0 when i tried the same – and there i would need it so badly…
i wrote in 3D:
DEFINE STYLE test "Arial", 10, 1, 0 style test for ii = 1 to oft addy -0.012 addz 0.1 text 0, 0,oberflaechen[ii] - !!nur als Test - da schreibt er gar nichts hin TEXT 0.01, 0, Aussenputz !! sollte überall 18 stehen - aber macht im 3D 0 draus del 1 next ii del oft
Why is it not functional in 3D?
I personal would need it for self made wall-openings with much more editable hotspots than are used in the normal Archicad-library.. for a much better user-experience..
Teacher in HTL-Salzburg
AC5-19, Win and Mac
GDL hobby developer -
December 3, 2015 at 18:31 #1968
Gergely Fehér
KeymasterWALL_SKINS_BMAT_NAMES works only in 2D. In 3D you can use WALL_MAT_A and WALL_MAT_B.
Note: when you paste codes with loops, please use other variables than “i” or “s” as these characters with brackets will be eliminated as they are interpreted as BBCodes. I changed them in your code snippets to “ii” and “ss” for a better understanding. You can read more about BBCodes here: https://gdl.graphisoft.com/forum-functions/
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
December 3, 2015 at 22:45 #1969
Heimo Mooslechner
ParticipantThank You for Your reply. In the meantime – i figured the WALL_MAT_A and WALL_MAT_B out by myself – and took it as a workaround for the limitation of WALL_SKINS_BMAT_NAMES in3D. This should really be changed in further AC-Versions.. i think.
And thanks for the suggestion for using “ii” instead of “i” – i will make it so in future. Do i understand it right – this BBC is limitation for this forum – not for the GDL?
Teacher in HTL-Salzburg
AC5-19, Win and Mac
GDL hobby developer-
December 3, 2015 at 23:38 #1970
Gergely Fehér
KeymasterYes, this limitation with the variable names is only for this forum – in ARCHICAD you can use any variables.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
-
-
-
AuthorPosts
- The forum ‘Informations from the environment’ is closed to new topics and replies.