@Anonymous wrote:
hi Danny
I took your previous lisp code and used the AutoScript tool i have on my machine to execute on multiple drawings.
It works perfectly thank you.
I do have a question on it. Some blocks on some drawings that were returned occur more than once in the output. Do you know why this would be? It's not a problem, i can filter them out, but i am curious why that would be.
Thanks
That's because it's normal.
You can insert a block multiple times. Each one will get a unique Handle. This handle will remain unchanged.
So you can always find that one block INSERT it belongs to. If you can't find it, it has been deleted.
Perfect for reading out hundreds of terminals, across many dwg's. Although each terminal is the same block, they ALL have their own handle.
You could renumber the terminals using excel an then write back the new numbers to each terminal block based on these unique handles.
You can also use it to manage a database with materials.
But it's not something they all share. That's just the blockname (unless it's dynamic)
You can not use the handle to see if a certain block (definition) is present, as the handle will be different for each of them.
Just to find a specific instance of the block within a specific drawing.
Hence, if there's more as one insert of the block, they all show up (with each it's own unique handle)
If this is not what you want/expected, i wonder what exactly it is you use the handle for. Hopefully not to identify the block (definition) in general.