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

help w/ GLOB_ELEVATION

Anonymous
Not applicable
I have this code (the following is just a section of it). It works fine unless I put the object on a basement story. The object looks to see if it is located 18" above the story foor and if it is then the height (18") is not shown. If the object is located at a height not equal to 18" then it lists the height in inches. But when I put the object on the basement floor it gives me the height of 18". How come and how can I fix it so that it doesn't show me the height when it is 18" above any story?

Thanks for any help,
Michele
THe code is as follows:


!GLOB_ELEVATION!to each story
!SYMB_POS_Z!to project zero
IF ddoutlet=1 and SYMB_POS_Z<18" OR GLOB_ELEVATION>18" THEN GOSUB 200
IF ddoutlet=0 and SYMB_POS_Z<18" OR GLOB_ELEVATION>18" THEN GOSUB 100
IF ddoutlet=1 and GLOB_ELEVATION=18" THEN GOSUB 400
IF ddoutlet=0 and GLOB_ELEVATION=18" THEN GOSUB 300
!IF out=1 and GLOB_ELEVATION=18" THEN GOSUB 500!220 outlet on
!IF out=0 and GLOB_ELEVATION=18" THEN GOSUB 550!220 outlet off

FRAGMENT2 ALL, 0

END:


100:!!OUTLET

DEFINE STYLE STYLE_1 "Arial", 35 * MIN (a, b), 7, 0

STYLE STYLE_1
PEN cpen
rot2 -symb_rotangle
unID = 1

HOTSPOT2 0, d_y,unID, d_x,1+128 : unID=unID+1
HOTSPOT2 -1, d_y,unID, d_x,3 : unID=unID+1
HOTSPOT2 d_x,d_y,unID, d_x,2 : unID=unID+1

HOTSPOT2 d_x, 0,unID, d_y,1+128 : unID=unID+1
HOTSPOT2 d_x, -1,unID, d_y,3 : unID=unID+1
HOTSPOT2 d_x,d_y,unID, d_y,2 : unID=unID+1


ADD2 d_x, d_y
TEXT2 0, 0, STR("%fi", GLOB_ELEVATION)
DEL 2
3 REPLIES 3
Anonymous
Not applicable
IF ddoutlet=1 and SYMB_POS_Z<18" OR GLOB_ELEVATION>18" THEN GOSUB 200
The SYMB_POS_Z<18" condition means that when your outlet is below 18" relative to project zero GOSUB 200 runs.

The basement is presumably below +18" elevation.
Anonymous
Not applicable
So how do I state that I want it to look at the story zero. It works when I put the object on a second or 3rd story and that is more than 18" above project zero.

Thanks,
Michele
Anonymous
Not applicable
If I understand what to want to do, then:

IF ddoutlet=1 and GLOB_ELEVATION#18" THEN GOSUB 200

Should do the trick.

I assume your subroutine at line 200 is the symbol with the non-standard elevation text shown ("unless otherwise noted", right?). So all you should need is the test to see if the elevation above the home story is 18" or not. I honestly don't understand the purpose to the test for being below 18" to project zero.