The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, Gergely Feher

By Michele
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,
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




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

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
User avatar
By Matthew Lohden
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.
By Michele
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.

User avatar
By Matthew Lohden
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.