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
Use one of the poly2 commands
not the rect2 command.
Peter Devlin
Anonymous
Not applicable
Peter:

Thanks for your reply. My GDL knowledge is pretty basic, so I'm not sure where to start with your suggestion. How would I modify the current script with the new command to produce the same output only with a solid background?

Thanks for your help!

Brian
Anonymous
Not applicable
Brian,
Looking at your rect2 command, it appears that it will not
draw a rectangle but a straight horizontal line.
Is this what you see when you go to the 2D full view window ?
Both "y" values are the same. They must be different to draw
a rectangle. I do not know what that second
"y" value should be because I do not have the parameter
list or Master script for this object. I also can't write a poly2
command that draws a rectangle for the same reason.
Peter Devlin
Anonymous
Not applicable
Peter:

Thanks for continuing to look into this. I looked at the y values you were mentioning and, correct me if I wrong, but isn't one y value negative? Also, I've attached a couple of screenshots of the parameters list and the 2d full view.

Thanks again, Peter!

Brian
Anonymous
Not applicable
Here is the parameter list...
Picture 3.jpg
Anonymous
Not applicable
Brian,
Right you are. I missed that.
Comment out the rect2 command like this.

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

Write this below it.

poly2 4,7,
ell*A_,(-s/2)*A_,
(ell+s)*A_,(-s/2)*A_,
ell*A_,(-s/2)*A_,(ell+s)*A_,(s/2)*A_,
ell*A_,(ell+s)*A_,(s/2)*A_

Peter Devlin
Anonymous
Not applicable
Brian,
Sorry it should be

poly2 4,7,
ell*A_, (-s/2)*A_,
(ell+s)*A_, (-s/2)*A_,
(ell+s)*A_,(s/2)*A_,
ell*A_,(s/2)*A_

Peter Devlin
Anonymous
Not applicable
Peter:

I incorporated your code into the part, but still no opaque background. I've attached a screenshot in case I've transcribed something incorrectly. Any suggestions?

Thanks,
Brian
Picture 1.jpg
You need to define a fill. The statement 'SET FILL BP' is incorrect: BP is the Pen, not the Fill.
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