Reply To: WALL_​​​SKINS_​​​BMAT_​​​NAMES

Home Forums Problems and solutions in GDL Informations from the environment WALL_​SKINS_​BMAT_​NAMES Reply To: WALL_​​SKINS_​​BMAT_​​NAMES

#1758
Dominika Bobály
Keymaster

James,
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