cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

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

GDL text with fill

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
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
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.

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
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
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.
Not applicable
Thank you!