Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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

Property Script Help (looking for a better way)

Red
Advocate
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
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
3 REPLIES 3
Anonymous
Not applicable
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
Red
Advocate
Thanks for the advice. BTW I noticed you work for Trus Joist I just wanted to praise you on the GDL object it kicks @$$. Keep up the good work!!!
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
Anonymous
Not applicable
Thanks. If you're heading to ACU West, you can tell me in person.