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

User avatar
By Red
#6946
Basically I have four different types of windows here. Right now when listing them for B.O.M. as you can see 1 and 2 both true for HLH_Color_Known so thats cause a conflict. Can someone explain a way for substituting code or just a better way to script. Any help would be great.



if HLH_provider = 'NORCO' then
--1-- if HLH_wintype = 'Safety' and HLH_Color_Known = 1 then
COMPONENT "SCDH" + HLH_unwidc + HLH_unhgtc + "-" + HLH_unnum + " SAFETY", 1, 'pcs',1, HLH_cs + HLH_unnum + HLH_wintypec + HLH_unwidc + HLH_unhgtc + HLH_Color_Code,'000.005'
else
--2-- if HLH_wintype = 'Safety' and HLH_DP_50 = 1 and HLH_Color_Known = 1 then
COMPONENT "SCDH" + HLH_unwidc + HLH_unhgtc + "-" + HLH_unnum + " SAFETY", 1, 'pcs',1, HLH_cs + HLH_unnum + HLH_wintypec + HLH_unwidc + HLH_unhgtc + HLH_Color_Code + "-" + "DP-50",'000.005'
else
--3-- if HLH_wintype = 'Safety' and HLH_DP_50 = 1 then
COMPONENT "SCDH" + HLH_unwidc + HLH_unhgtc + "-" + HLH_unnum + " SAFETY", 1, 'pcs',1, HLH_cs + HLH_unnum + HLH_wintypec + HLH_unwidc + HLH_unhgtc + "-" + "DP-50",'000.005'
else
--4-- if HLH_wintype = 'Safety' then
COMPONENT "SCDH" + HLH_unwidc + HLH_unhgtc + "-" + HLH_unnum + " SAFETY", 1, 'pcs',1, HLH_cs + HLH_unnum + HLH_wintypec + HLH_unwidc + HLH_unhgtc,'000.005'
endif
endif
endif
endif
endif
#6960
It would help if I knew paramterers like HLH_Color_Known were boolean or interger but if you have a complex matrix of options, try assigning codes to each parameter choice in the master script. This way each configuration gets it's own unique code that you can identify it with in the property script.

!Master Script
IF hlh_provider = 'NORCO' THEN pcode = '01'
IF hlh_provider = 'Others' THEN pcode = '02'

IF HLH_wintype = 'Safety' THEN wcode = '01'
IF HLH_wintype = 'option 2' THEN wcode = '02'

IF HLH_Color_Known = 1 THEN ckcode = '01'
IF HLH_Color_Known = 0 THEN ckcode = '00'

IF HLH_DP_50 = 1 THEN dpcode = '01'
IF HLH_DP_50 = 2 THEN dpcode = '02'

prodcode = pcode + wcode + ckcode+ dpcode


!property script
IF prodcode = '01010101' THEN COMPONENT xxxxxx
IF prodcode = '01000000' THEN COMPONENT yyyyyy
IF prodcode = '01020101' THEN COMPONENT zzzzzzz