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

GDL object related to zone

Anonymous
Not applicable
My fellow GDL gurus,
I need to develop a Room Tag that is separate from the Room Tag that comes with zone placement. I took the current "Room Identifier_NCS" GDL object in ArchiCAD 9 and tweaked it to allow me to place it on a separate layer and drag it between different rooms and have it still pick up the room name and number. The problem I am running into is that in some case our rooms are too small for the object to fit inside the room. I would like to be able to place the tag outside the room, and have some type of anchor that remains in the room. Can anyone help me understand what part of the object knows what zone it is in? I found that my object uses the center point.

See attached object:

Thanks,
Ben
2 REPLIES 2
Anonymous
Not applicable
try this:


cu_name="Room Name"
cu_number="CU mirco"

pen cu_pen
IF cu_fontsize = "1/8" THEN cu_fontsizeMM = 3.18
IF cu_fontsize = "3/32" THEN cu_fontsizeMM = 2.39
DEFINE STYLE "LabelStandard" Arial, cu_fontsizeMM, 5, 0
style LabelStandard

rrr2 = REQUEST ("Story", "", index, story_name)
rrr3 = REQUEST ("Height_of_style", LabelStandard, CU_Style_Height)
rrr4 = REQUEST ("Zone_relations", "", cu_cat_name, cu_code, cu_name, cu_number)
cu_len3 = cu_number

IF story_name = "Sub Basement" THEN story_name = "S1"
IF story_name = "Sub Sub Basement" THEN story_name = "S2"
cu_len = stw(story_name)
cu_len1 = stw(cu_name)
cu_len2 = stw(cu_len3)

TOT_Len = MAX (cu_len,cu_len1,cu_len2)* GLOB_SCALE /1000
HSico = CU_Style_Height* GLOB_SCALE /1000/2

HOTSPOT2 0,0
HOTSPOT2 HSico,HSico : HOTSPOT2 -HSico,HSico
HOTSPOT2 -HSico,-HSico: HOTSPOT2 HSico,-HSico

!Don't erase this "silly" code
ADD2 -Posizione[1][1],-Posizione[1][2]
HOTSPOT2 0,0 !;@)
DEL 1

unID = 1 + unID : HOTSPOT2 Posizione[1][1],0,unID,Posizione[1][2],129
unID = 1 + unID : HOTSPOT2 Posizione[1][1],-1000,unID,Posizione[1][2],3
unID = 1 + unID : HOTSPOT2 Posizione[1][1],Posizione[1][2],unID,Posizione[1][2],2
unID = 1 + unID : HOTSPOT2 0,Posizione[1][2],unID,Posizione[1][1],129
unID = 1 + unID : HOTSPOT2 -1000,Posizione[1][2],unID,Posizione[1][1],3
unID = 1 + unID : HOTSPOT2 Posizione[1][1],Posizione[1][2],unID,Posizione[1][1],2

ADD2 Posizione[1][1],Posizione[1][2]

!--------------Room Name------------------------

text2 0,0,cu_name
ADD2 0,-CU_Style_Height * GLOB_SCALE /1000

!--------------Story Name------------------------
text2 0,0,story_name
ADD2 0,-CU_Style_Height* GLOB_SCALE /1000

!--------------Zone Name-------------------------
text2 0,0,cu_len3

!--------------Box-------------------------
RECT2 -TOT_Len/2,-(CU_Style_Height* GLOB_SCALE /1000)/2 ,TOT_Len/2,(CU_Style_Height* GLOB_SCALE /1000)*5/2
Hotspot2 -TOT_Len/2,-(CU_Style_Height* GLOB_SCALE /1000)/2
Hotspot2 -TOT_Len/2,(CU_Style_Height* GLOB_SCALE /1000)*5/2
Hotspot2 TOT_Len/2,-(CU_Style_Height* GLOB_SCALE /1000)/2
Hotspot2 TOT_Len/2,(CU_Style_Height* GLOB_SCALE /1000)*5/2

DEL 3

!============== END

Parameter ----- type ----------------description
Posizione ------ lengh (matrix [1][1] and [1][2]) ---- XY Label position


CU mirco sorgato
www.CAD3D.it
Anonymous
Not applicable
!!!!!??????

Have you delete your post?

BTW thx for the replay.

This is another way for "silly" ;@) solution

EPS = .0001
PEN 91
LINE2 -Posizione[1][1],-Posizione[1][2],-Posizione[1][1]+eps,-Posizione[1][2]


cu_name="Room Name"
cu_number="CU mirco"
.......


CU mirco

www.3dsmile.it