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.

help with text code

Anonymous
Not applicable
Here is code in an object and I can't get the text to show up. I copied the code from another object where the text works just fine. I added dd_x and dd_y to the parameters. Can anyone tell from the my code what I did wrong?? Thanks in advance,

Michele



1100: !square
PEN gs_cont_pen
RECT2 0,0,a_size,b_size
PEN 91
DEFINE STYLE STYLE_12 "Arial", 35 * MIN (a, b), 7, 2

!!!!!THis is moveable text hotspot and text for more_text

STYLE STYLE_12
PEN cpen
rot2 -symb_rotangle!!This rotate text to follow object
unID = 1

HOTSPOT2 0, dd_y,unID, dd_x,1+128 : unID=unID+1!!!THis is moveable hotspot placement
HOTSPOT2 -1, dd_y,unID, dd_x,3 : unID=unID+1
HOTSPOT2 dd_x,dd_y,unID, dd_x,2 : unID=unID+1

HOTSPOT2 dd_x, 0,unID, dd_y,1+128 : unID=unID+1
HOTSPOT2 dd_x, -1,unID, dd_y,3 : unID=unID+1
HOTSPOT2 dd_x,dd_y,unID, dd_y,2 : unID=unID+1

ADD2 dd_x, dd_y
TEXT2 0", 0",(descrip_equip)!!the 0",0" is text hotspot placement
DEL 2


PEN pen_clear
SET LINE_TYPE "TRI Demolition"
SET FILL "Air Space" !1' is a_size 2' is b_size
POLY2_B{2} 5, 3, 0, 0,
0'-0.0000", 0'-0.0000", 0'-0.0000",
0'-0.0000"-left, 0'-0.0000"-bottom_, 1,
a_size + right, 0'-0.0000"-bottom_, 1,
a_size+right, b_size+top_, 1,
0'-0.0000"-left, b_size+top_, 1,
0'-0.0000"-left, 0'-0.0000"-bottom_, 1
RETURN
12 REPLIES 12
Anonymous
Not applicable
Are dd_x and dd_y defined in the parameters list?
Barry Kelly
Moderator
Michele,
I just copied your code and created all the necessary parameters and it all worked fine.
I'd be guessing it is a problem with your parameters.
i.e. something missing or the wrong parameter type?
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Thanks for saying that you started from scratch and it worked. I tried it from scratch and it worked too. I guess copying and modifying something isn't always better (& faster) than just starting from scratch and re entering parameters that you know you'll need.
Thanks again,
Michele