We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Wall Tag Background Fill

Anonymous
Not applicable
Hello All:

I'm having a little difficulty applying a background fill to a wall tag that I'm using. The tag that I'm using is a modified version of Eric Batte's wall tag part. What is the line of code that I can add to this part to add a solid fill inside the rectangle to block out the drawing elements beneath the tag?

Thanks for your help on this!
ww=wall_direction

add2  label_position [2][1]+label_position [3][1],
label_position [2][2]+label_position [3][2]

IF ww = 180 THEN ww = 0
IF ww = 270 THEN ww = 90

ROT2 ww+90

IF mir=1 THEN rot2 180

PEN          LP
SET FILL BP

line2 ell*A_,0,-el*A_,0

HOTSPOT2 ell*A_,0
HOTSPOT2 -el*A_,0

If UDS=1 THEN
    FS=FS1
    ENDIF

PEN OP
rect2 ell*A_,(-s/2)*A_,(ell+s)*A_,(s/2)*A_

HOTSPOT2 0,0
HOTSPOT2 ell*A_, (-s/2)*A_
HOTSPOT2 ell*A_, (s/2)*A_
HOTSPOT2 (ell+s)*A_, (s/2)*A_
HOTSPOT2 (ell+s)*A_, (-s/2)*A_

rot2 -90
add2 0,(ell+s/2)*A_

rot2 -ww
if mir = 1 then ROT2 180

PEN          TP
DEFINE STYLE    "AC_STYLE_1" F, 
        FS*25.4/72,      5,      0
SET STYLE "AC_STYLE_1"
HOTSPOT2 0,0
TEXT2    0, 0, T
14 REPLIES 14
Anonymous
Not applicable
Laura:

Thanks for your reply. I understand what you were saying about the fill error. However, that line was commented out. I have tried to add a solid fill in the parameters list and then reference it in the 2D script, but it only partly works. The background does show up solid, but it shows up solid red (the pen color I've been using throughout the part) instead of white. How can I tell the background fill to be white while the outline and leg of the tag stay red? As I told Peter in an earlier post my GDL ability is basic, so any further spelling-out you can do would be greatly appreciated.

Thanks, Laura.

Brian
Anonymous
Not applicable
Brian,
Laura is right. You need to define a fill for the poly2.
I notice that not only is BP not a fill but you have
commented this line out. In the parameter list you should
create a fill type parameter and write a set fill statement
in the script before the poly2 command that enables this fill
for the poly2 command to use. Also, why are you hiding
some parameters in the parameter list ?
Peter Devlin
Anonymous
Not applicable
Brian,
I just read your post to Laura and understand that your
requirements are more complicated than you initially indicated.
You need to use one of the more advanced poly2 commands.
Please read the descriptions of the various poly2 commands
in the GDL manual. You probably need to use poly2_b.
Or use fill 85 (Empty Fill).
Peter Devlin
Brian:
FILL "empty fill"
POLY2_B 5, 3, 1, BP,
ell*A_, (-s/2)*A_, 1,
(ell+s)*A_, (-s/2)*A_, 1,
(ell+s)*A_,(s/2)*A_, 1,
ell*A_,(s/2)*A_, 1,
ell*A_, (-s/2)*A_, -1
MacBook Pro Apple M2 Max, 96 GB of RAM
AC27 US (5003) on Mac OS Ventura 13.6.2
Started on AC4.0 in 91/92/93; full-time user since AC8.1 in 2004
Anonymous
Not applicable
Laura:

That worked perfectly...thank you. I referred to the GDL manual to attempt it on my own, but I couldn't make the "1" variable make sense. I didn't realize the variable had to appear after each set of coordinates. Seeing your code snippet helped to clear everything up.

Thanks again for your help, Laura.

Brian