BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

WALL_FILL_PEN global variable for 2d door symbol

David Collins
Advocate
I'm working on a door object with slanted side reveals. This has to be specially scripted because it also features a canted arch at the head. The 3d script inserts a MASS into a WALLHOLE and seems to be behaving itself, but the 2d symbol script for the added wall bits has me stuck.

In a good old "basic" wall with one material I can add fills for the side wall bits that match the wall fill using the global variables:

fill WALL_FILL
poly2_b{5} 6, 2, 0, 3, WALL_FILL_PEN, WALL_FBGD_PEN,
0, 0, 1, 0, 0, 1, 0,
A/2, 0.00, 1,
A/2, -frd, 1,
(A/2)+spl, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, 0.00, 1,
A/2, 0.00, 1

But in a composite wall with skins, the WALL_FILL_PEN and WALL_FBGD_PEN global variables no longer work. It looks like WALL_FILL will match the fill pattern of the first exterior skin, which I could live with. But I have no idea how to match the fill pen and background color of that first skin (or where the colors that do display are coming from) I can always hardwire the pen colors to match the skin, but it would be nice if the script did that for me.

Can anyone point me in the right direction here? I see there's something called WALL_SKINS_PARAMS but oh dear, maybe life is too short ...
David Collins

Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
9 REPLIES 9
Anonymous
Not applicable
Hi,
what you need is in wall parameters:
wall_skins-number
wall_skin_params

The fist is the number of the skins, the second is an array in which you will find parameters for each of the skins, if i remember [1] is the fill, [4] is tha fill pen and [5] is the bkground pen.

You can search the reference guide for the correct syntax.

Hope it helps
Barry Kelly
Moderator
I use this to put all the wall parameters into an array variable.
Then I can use any value from that array variable when I need it.


    DIM wallarray [127][17]    !!sets array size
    PUT WALL_SKINS_PARAMS
    
    FOR k=1 TO WALL_SKINS_NUMBER !Main array
    FOR x = 1 to 16
    wallarray =GET(1)
    NEXT x
    x = 1
    NEXT k

There can be up to 127 skin in a composite wall I believe.
Each skin has 17 values (this changes from version to version - in version 17 there was only 16 values - in version 18 there are 17.
So you will need to adjust your script to suit.

WALL_SKINS_PARAMS parameters of the composite or complex wall skins
array with 17 columns: [1] fill, [2] thickness, [3] (old contour pen), [4] pen of fill, [5] pen of fill background, [6] core status, [7] upper line pen, [8] upper line type, [9] lower
line pen, [10] lower line type, [11] end face pen, [12] fill orientation, [13] skin type, [14] end face line type, [15] finish skin status, [16] oriented fill status and with arbitrary
number of rows, [17] trapezoid/double slanted status.


So you are looking for value 1 for the fill type , value 4 for the fill pen and value 5 for the background pen.
So to match the first skin properties ...

fill wallarray [1][1]
poly2_b{5} 6, 2, 0, 3, wallarray [1][4], wallarray [1][5],
0, 0, 1, 0, 0, 1, 0,
A/2, 0.00, 1,
A/2, -frd, 1,
(A/2)+spl, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, 0.00, 1,
A/2, 0.00, 1


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
David Collins
Advocate
Ilder & Barry,
Seems like ArchiCAD 17 pretty much blew a self-taught GDL cookbooker like me out of the water!

Many thanks for the beyond-the-call-of-duty WALL_SKINS_PARAMS tutorial. The array variable solution is really elegant (my way of saying I haven't a clue of how that works, but nevermind...) I should be able to get it to fly now.

I now find I have a similar problem when the door object is cut in 3d:
In a simple (basic) wall, WALL_MAT_EDGE will match the cut surface of the MASS to that of the wall. But this doesn't work for Composite walls. I suspect it's the same issue: How can I reference the material surface of a wall skin?
David Collins

Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
Erwin Edel
Rockstar
That is one awesome bit of 2d script. I shall have to remember this!

Regarding the 3d surfaces, I believe this is sadly impossible to call from the different sides. What I can see is that any wall opening resorts to either an override or whatever surface material the bottom 'hits'. Hooray for photoshop for artist impressions
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Laszlo Nagy
Community Admin
Community Admin
Barry wrote:
There can be up to 127 skin in a composite wall I believe.
Barry, there can be up to 48 skins in Composites.
So the Array can be smaller:
DIM wallarray [48][17]
Otherwise it is a nice piece of coding indeed.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Barry Kelly
Moderator
laszlonagy wrote:
Barry, there can be up to 48 skins in Composites.
So the Array can be smaller:
DIM wallarray [48][17]
I was just going by what I saw in the GDL manual.
I've never actually tested how many skins you can actually have.
Maybe composites can only have 48 and complex profiles 127.

From the manual ...

WALL_SKINS_NUMBER number of composite or complex wall skins
range of 1to 127, 0 if single fill applied

WALL_SKINS_PARAMS parameters of the composite or complex wall skins
array with 16 columns: fill, thickness, (old contour pen), pen of fill, pen of fill background, core status, upper line pen, upper line type, lower line pen, lower line type, end face pen,
fill orientation, skin type, end face line type, finish skin status, oriented fill status and with arbitrary number of rows.
core status: 0 - not part, 1 - part, 3 - last skin of core, fill orientation: 0 - global, 1 - local, skin type: 0 - cut, 1 - below cutplane, 2 - above cutplane (all skin types are 0 for simple walls).
For D/W in complex walls on the floor plan this variable contains the data of all cut skins, for wall ends on the floor plan the data of all skins. finish skin status: 0 - not finish skin,
1 - finish skin, oriented fill status: 0 - global or local fill orientation as set in the "fill orientation" column, 1 - fill orientation and size match with the wall skin direction and thickness
For D/W and wall ends in the 3D window contains the data of the skins actually cut by the D/W or wall end.


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
David wrote:
I now find I have a similar problem when the door object is cut in 3d:
In a simple (basic) wall, WALL_MAT_EDGE will match the cut surface of the MASS to that of the wall. But this doesn't work for Composite walls. I suspect it's the same issue: How can I reference the material surface of a wall skin?
The WALL_MAT_EDGE does match the wall edge but now in 17 & 18 you might be displaying the Building Materials for each skin rather than using the wall edge override - so they may not match visually.
The problem is that GDL objects cannot use Building Materials so they still need to use WALL_MAT_EDGE or WALL_MAT_A or WALL_MAT_B

You can however find the Building Material for each skin – you just can’t use it.
For the Building Material of the skins you need WALL_SKINS_BMAT_NAMES

For the first skin you want WALL_SKINS_BMAT_NAMES [1]


The number in square brackets just represents the number of the skin you want the Building Material for.

I can’t see any way of finding out the surface (material) associated with a Building Material – which is what is needed here.
Maybe someone else has an idea?



I am not sure why I fed the values of the WALL_SKINS_PARAMS into an array before.
This was all scripted many years ago and seems to be working so I just left it as it is.
I tried to do the same with the WALL_SKINS_BMAT_NAMES but couldn't because it is a text output and not numeric like WALL_SKINS_PARAMS.

So I realised it is already an array itself and you can just choose the bits you want by adding the correct values in square brackets afterwards.

So for your splayed reveal you just need ...

fill WALL_SKINS_PARAMS [1][1]
poly2_b{5} 6, 2, 0, 3, WALL_SKINS_PARAMS [1][4], WALL_SKINS_PARAMS [1][5],
0, 0, 1, 0, 0, 1, 0,
A/2, 0.00, 1,
A/2, -frd, 1,
(A/2)+spl, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, -WALL_THICKNESS, 1,
(A/2)+spl+0.04, 0.00, 1,
A/2, 0.00, 1

No need at all for the code I posted before.
I seem to like doing things the hard way.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
David Collins
Advocate
Barry wrote:
So for your splayed reveal you just need ...
fill WALL_SKINS_PARAMS [1][1]
Barry.
I discovered this purely by accident (deleted the array loop by mistake) but from there I realized I could insert an integer parameter for the skin number :
WALL_SKINS_PARAMS [skinmatch][5]
Which lets me select which skin to match: useful since this object will be used in several different composite walls.

In the spirit of Keeping It Simple, Stupid, I just added a material parameter for the MASS side, which gave me control of the 3d cut display. Good to go!

Thanks again to all.
David Collins

Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
Barry Kelly
Moderator
David wrote:
I discovered this purely by accident (deleted the array loop by mistake) but from there I realized I could insert an integer parameter for the skin number :
WALL_SKINS_PARAMS [skinmatch][5]
Which lets me select which skin to match: useful since this object will be used in several different composite walls.

In the spirit of Keeping It Simple, Stupid, I just added a material parameter for the MASS side, which gave me control of the 3d cut display. Good to go!

Thanks again to all.
Excellent.
There will be no stopping you now.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!