Ms. Kirsten Jones of Vancouver, BC, Canada, requested a routine that calculates plant quantities from landscape architecture drawings to produce a plant list for contractors. Kirsten uses a block KEY-PLANT that has two attributes, PLANTTYPE and QUANTITY. The Eattext command doesn't add up the total quantities for each species of plant named in the PLANTTYPE attribute, so it's cumbersome to get the totals after extracting the attribute values. The AutoLISP solution is PLANT-LIST.LSP, which creates a text file with total quantities separated by plant species. I wrote the code in AutoCAD 2006 and have tested it in both 2006 and 2007, although it also should run in earlier versions such as 2004 and 2005. The program's execution speed depends on the complexity of the drawing. The example drawing that Kirsten Jones sent me took about five seconds to extract the results.
|