TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CAD_guru on January 31, 2023, 05:05:46 AM

Title: How to generate an excel list with all block names from multiple drawings?
Post by: CAD_guru on January 31, 2023, 05:05:46 AM
How to generate by a LISP routine an Excel list with all block names from multiple drawings? :idea:
As result:

colum              |        block name
------------------------------------
.dwg name       |        ..
                       |        ..
                       |        ..
.dwg name       |        ..
                       |        ..
                       |        ..
Title: Re: How to generate an excel list with all block names from multiple drawings?
Post by: dexus on January 31, 2023, 05:18:14 AM
You can start here, this might help:

Write to excel (csv): http://www.lee-mac.com/writecsv.html

Execute on multiple drawings: https://www.cad-notes.com/run-a-script-on-multiple-dwg-with-scriptpro/
Title: Re: How to generate an excel list with all block names from multiple drawings?
Post by: BIGAL on January 31, 2023, 09:11:41 PM
My approach I write direct to excel, open a excel file and fill in 1st dwg block details. When you open next dwg get last cell address and then fill in details, keep repeating.

The write to a csv may be easier the only difference is to use "A" not "W" when you open file this will append to an existing file.

I would look into accoreconsole to process a lot of dwg's else just a script open a dwg, run a lisp, then close.

Title: Re: How to generate an excel list with all block names from multiple drawings?
Post by: Lee Mac on February 01, 2023, 08:30:25 AM
Have you considered using DATAEXTRACTION for this task?