TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: coulteri on March 28, 2017, 03:27:20 PM

Title: Batch block construction from csv or excel
Post by: coulteri on March 28, 2017, 03:27:20 PM
Hi all,

I have an information database of plants in excel. I would like to make tool palletes for my design work in ZWCAD so I need to create a large number of blocks with unique names. In fact these blocks are the same, but have only unique name (e.g. number) but different attributes value. They consist of graphic symbol, one centerpoint and few attributes such as "plant name", "plant shortcut", "density of plants per square meter" and so on. There are plenty of possibilities how to construct large number of blocks with one block instance. But is it possible to make plenty of the same blocks (e.g. using one existing block as an example) with unique names and different attribute values in one step?

Thanks for your reply!

Lukas
Title: Re: Batch block construction from csv or excel
Post by: Crank on April 02, 2017, 04:30:16 PM
I haven't tried this (and I don't know if you want this), but is you modify the block definition so that it's an unnamed block in theory the block names are unique and they still would have attributes.

Every copy you'll make of the block will be another unique block.
Title: Re: Batch block construction from csv or excel
Post by: BIGAL on April 06, 2017, 11:15:09 PM
If you have a excel of the data then you could script the making of the blocks.
Blkname, parentblock, scalex,scaley, att1 ,att2 att3 and so on

Using a blank drawing create a script
insert parent 0,0 add attributes, rescale, use "burst.lsp" remake new block erase or move and repeat.