2022-09-29 10:31 AM - edited 2022-09-29 10:57 AM
I'm developing a skin label.
and feel little bit difficult to sum the thicknesses of the two complexes into one.
I mean if they are same type of complex, make sum the thickness together.
for example, I wanna get the label display "THK 200.0 GENERIC - INTERNAL CLADDING".
I put this in 2D script. and then I got 2 error messages .
how can I solve this problem? I'm happy to someone reply that.
Solved! Go to Solution.
2022-09-30 11:26 AM
Hey Soo, now I understand. You need to check for adjacent BMATs that are the same, and not for skin types.
But again, your code does not work, because you are running out of bounds of the array.
Do something like this:
dim thk_added_skins[]
k=1 ! current skin number
j=1 ! simple counter for inner while
i=1 ! counter skin type, thk array
while (k <= WALL_SKINS_NUMBER) do
thk_added_skins[i] = WALL_SKINS_PARAMS[k][2]
while (k+j <= WALL_SKINS_NUMBER) &\
(WALL_SKINS_PARAMS[k][18] = WALL_SKINS_PARAMS[k+j][18]) \
do
thk_added_skins[i] = thk_added_skins[i] + WALL_SKINS_PARAMS[k+j][2]
j=j+1 ! check next one
endwhile
k=k+j ! next skin number to check
j=1 ! reset counter of inner while
i=i+1 ! next group of type
endwhile
2022-09-29 04:22 PM
Now there is something to know about Archicad composite walls:
You can't have "two" or more cores (That's why setting the reference line according to the core works), but you can have none at all. Skins set to "core" (in opposition to "finish" and "other") must be adjacent.
Also be reminded that the global "WALL_SKINS_PARAMS" will list the skins from outside to inside.
The last "core" skin (if one is defined as such) will have the core status set to "3", the other ones will be "1". You can't differentiate between "finish" and "other" as far as I can see.
I am not sure why you would need to add those claddings, I probably would have found it more interesting to see "outer skins thicknes – core thickness – inner skins thickness", but what you want is really easy to achieve.
You have to explicitely check the bounds of an array. For us this number lives already in the WALL_SKINS_NUMBER global.
Also, because a wall could have up to 127 skins, you should do your calculations in a loop.
thk_non_core_skins = 0.0
for i=1 to WALL_SKINS_NUMBER
if WALL_SKINS_PARAMS[i][6] = 0 then
thk_non_core_skins = thk_non_core_skins + WALL_SKINS_PARAMS[i][2]
endif
next i
2022-09-30 09:00 AM - edited 2022-09-30 09:01 AM
sometimes I need to put wire mesh line between concrete at skin complex menu for cross section expression.
So in this picture, actually the concrete's thickness is 70mm.
but when I use a label object, that can express only 35mm.
that's why I wanna get sum 2 skin complex's thickness into 1.
and I wanna make them automatically.
I put this one into <2D Script> but it's not working.
for n=1 to WALL_SKINS_NUMBER if stFinish[n] = stFinish[n+1] then next n |
thanks for your reply.
Soo.
2022-09-30 11:26 AM
Hey Soo, now I understand. You need to check for adjacent BMATs that are the same, and not for skin types.
But again, your code does not work, because you are running out of bounds of the array.
Do something like this:
dim thk_added_skins[]
k=1 ! current skin number
j=1 ! simple counter for inner while
i=1 ! counter skin type, thk array
while (k <= WALL_SKINS_NUMBER) do
thk_added_skins[i] = WALL_SKINS_PARAMS[k][2]
while (k+j <= WALL_SKINS_NUMBER) &\
(WALL_SKINS_PARAMS[k][18] = WALL_SKINS_PARAMS[k+j][18]) \
do
thk_added_skins[i] = thk_added_skins[i] + WALL_SKINS_PARAMS[k+j][2]
j=j+1 ! check next one
endwhile
k=k+j ! next skin number to check
j=1 ! reset counter of inner while
i=i+1 ! next group of type
endwhile