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

Man seeking Component

Rick Thompson
Expert
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"

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Rick Thompson
Mac Sonoma AC 26
http://www.thompsonplans.com
Mac M2 studio w/ display
4 REPLIES 4
Anonymous
Not applicable
Hi Rick,

If you upload a AC12 .pla file with the related objects and lists people here could give a try...
Rick Thompson
Expert
Braza wrote:
Hi Rick,

If you upload a AC12 .pla file with the related objects and lists people here could give a try...
Thanks for the suggestion, and any help. I have uploaded a zip with 2 small archive files of a roof with framing. One is labeled floor12_stock, which is just that, and outputs in inches (run "framing list".. there is a screen shot on the pln). The other has the older roof library from AC8 and the modified lumbercomponents.gsm. What's weird, saving the stock 12 as an archive went fine, but saving the modified version would not save properly, but said it could not find the lumbercomponents.gsm file, even though it is in the library folder (roofmaker) just like the other one??? So, when you open the modified version you will need to manually load the missing script, which is in the zip file also.

http://www.thompsonplans.com/files/LCtest.zip

thanks

The link is here.. and is about 2mb.
Rick Thompson
Mac Sonoma AC 26
http://www.thompsonplans.com
Mac M2 studio w/ display
Anonymous
Not applicable
Rick,

I've just opened the file and managed to replicate the issue.
Seems that the problem is a wrong CALL statement...

Right -> Call "LumberComponents" Parameters B=B, L=L, H=H, QTY=1
Wrong -> Call LumberComponents Parameters B=B, L=L, H=H, QTY=1

You will have to repeat this fix in all objects that refer to this property, ok?

Hope that helps.
Screen_01.jpg
Rick Thompson
Expert
Thank you:))) That's great.
Rick Thompson
Mac Sonoma AC 26
http://www.thompsonplans.com
Mac M2 studio w/ display