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

GDL text with fill

Anonymous
Not applicable
I am kind of new to GDL and have learned a fair amount so far but I have ran into a snag and have not been able to find any information on the issue that I have come across. I have a library part that I have made with three text fields but I need to be able to have a fill behind the text. Can anyone help me with that?
thanks
SP
6 REPLIES 6
Anonymous
Not applicable
scoobypaul wrote:
I am kind of new to GDL and have learned a fair amount so far but I have ran into a snag and have not been able to find any information on the issue that I have come across. I have a library part that I have made with three text fields but I need to be able to have a fill behind the text. Can anyone help me with that?
thanks
SP
SP
Here's a snippet of one of my 2d scripts where I use a poly2_b to make the background mask you're asking about. Note how I use STW to determine width of the text and a REQUEST to determine the height.

HTH,
Dan K

fill 85
add2 aa,bb

dims=STR("%0.1ffi",xx-dwall)+'x '+STR("%0.1ffi",yy-dwall)
width=STW(dims)/1000 * A_
REQUEST("Height_of_style","Rm_Size",height2)
height2=height2/1000*A_

poly2_b 5,2,1,-1,
-width/2,0,1,
-width/2,-height2,1,
width/2,-height2,1,
width/2,0,1,
-width/2,0,1
Anonymous
Not applicable
Thank you so much...I have it figured out...

I really appreciate the input and I can now move on to another item.

Anonymous
Not applicable
scoobypaul wrote:
Thank you so much...I have it figured out...

I really appreciate the input and I can now move on to another item.

Great!, glad I could help
Anonymous
Not applicable
I was attempting to implement a similar bit of code in a gdl object and received the following error message: "Unused function return value".

! Background Fill
SET FILL "Solid Fill"
Width=STW(u_text)/1000*glob_scale
Request ("Height_Of_Style", "AC_STYLE_1", Height)
Height=Height/1000*Glob_Scale

Poly2_b 5,2,1,-1,
-Width/2,0,1,
-Width/2,-Height,1,
Width/2,-Height,1,
Width/2,0,1,
-Width/2,0,1
Anonymous
Not applicable
Hello,

As an error it is not a fatal one. Request always
returns a value and you have not assigned one.

Just add;

dummyValue= request...
and you are done.
Anonymous
Not applicable
Thank you!