I apologize up front, but I doubt I will learn GDL enough to work this out myself, so if someone can assist, I would appreciate it.
My library, by necessity, has to maintain a deep connection with the past. I have pln's that have been brought along for many years (started in the mid 90's). So, my library doesn't have many new part.. but, I am trying to change that. Currently I have most of the AC12 library, and a few "custom" folder containing past objects, and past macros.
The one issue I am having is in generating a material list with the roof library parts in AC12. I have a modified "LumberComponents.gsm" (not done my me) that rounds the length to the next even length. This condenses the list to something usable, eliminating the long unnecessary rafters in every inch length. It want work in the AC12 Roofmaker library (I put the adjusted Lumbercomponent script in AC12 library and removed the AC12's Lumbercomponent script). When I generate a list it can't find what it wants at line 20 (at least for Rafter2_1 12.gsm). So, unless I can make the AC12 macro adjust for the rounded up even lengths, I am forced to stick with the AC8 version I have been using. It works, so it's not the end of the world, but I would like to be using AC12 as much as I can.
So, if someone can spot the change in the old version, and help me change the AC12 version, I would appreciate it, and pass it on. It is a worthwhile change as the listing is ridiculous without it.
thanks for any advice
ADJUSTED AC8 Lumbercomponents script
!
! Property script for Lumber Pack calculation
! Parameters BxHxL
!
!print l
SQUOT="'"
DQUOTE='"'
TOL=0.0625 ! cut length tolerance is 1/16 in. 05/21 fl
MTI=1000/25.4 ! meter to inches
MTF=MTI/12 ! meter to feet
!
WI=B*MTI
HI=H*MTI
if (WI-INT(WI))>TOL THEN WI=INT(WI)+1 ! width is rounded up to nearest inch
if (HI-INT(HI))>TOL THEN HI=INT(HI)+1 ! height is rounded up to nearest inch
!++++
LINFT=L*MTF
LININ=LINFT-int(LINFT)
LINFT=int(LINFT)
if LININ>0.001 then LINFT=LINFT+1
if (LINFT-2*int(LINFT/2))>0.5 then LINFT=LINFT+1
!++++
BDFT=HI*WI*LINFT/12*QTY
WSTR=STR(WI,2,0)
HSTR=STR(HI,2,0)
LSTRF=STR(LINFT,2,0)
CUTSTR=WSTR+" x"+HSTR+" x "+LSTRF+SQUOT
COMPONENT "LUMBER OVERALL",BDFT,"Bdft",1,"01","80000"
COMPONENT CUTSTR,QTY,"ea.",1,CUTSTR,"80000"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
AC12 Lumbercomponents
!
! Property script for Lumber Pack calculation
! Parameters BxHxL
!
!print l
SQUOT="'"
DQUOTE='"'
TOL=0.0625 ! cut length tolerance is 1/16 in. 05/21 fl
MTI=1000/25.4 ! meter to inches
MTF=MTI/12 ! meter to feet
!
WI=B*MTI
HI=H*MTI
if (WI-INT(WI))>TOL THEN WI=INT(WI)+1 ! width is rounded up to nearest inch
if (HI-INT(HI))>TOL THEN HI=INT(HI)+1 ! height is rounded up to nearest inch
!++++
LINFT=L*MTF
LININ=LINFT-int(LINFT)
LININ=LININ*12
LFRAC=LININ-INT(LININ)
!print linft,linin,lfrac
!
! cut length is rounded up to the nearest quarter in.
!
IF LFRAC>(0.75+TOL) THEN
IF LININ > 10.5 THEN !05/21 FL
LININ=0
LINFT=LINFT+1
ELSE
LININ=INT(LININ)+1
ENDIF
LQTR=""
ELSE
IF LFRAC>(0.5+TOL) THEN
LININ=INT(LININ)
LQTR=" 3/4"
ELSE
IF LFRAC>(0.25+TOL) THEN
LININ=INT(LININ)
LQTR=" 1/2"
ELSE
IF LFRAC>(TOL) THEN
LININ=INT(LININ)
LQTR=" 1/4"
ELSE
LININ=INT(LININ)
LQTR=""
ENDIF
ENDIF
ENDIF
ENDIF
!++++
BDFT=HI*WI*LINFT/12*QTY
WSTR=STR(WI,2,0)
HSTR=STR(HI,2,0)
LSTRF=STR(LINFT,2,0)
LSTRI=STR(LININ,2,0)
CUTSTR=WSTR+" x"+HSTR+" x "+LSTRF+SQUOT+"-"+LSTRI+LQTR+DQUOTE
COMPONENT "LUMBER OVERALL",BDFT,"Bdft",1,"01","80000"
COMPONENT CUTSTR,QTY,"ea.",1,CUTSTR,"80000"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!