I have multiple blocks (always) containing an attribute (called type) and (sometimes) a visibility (called kleur).
All blocknames start with ID-, EX-, EP- or EW-. I use these blocks to make an assembly. After assembling I need to export the number of blocks per block, the attribute and the visibility to excel. To accomplish that I use the data extraction tool:
It's a lot of clicks for everytime the same settings. Is it possible to do this faster?
Solved! Go to Solution.
Solved by Rick_Tolleshaug_TSC. Go to Solution.
Solved by gbG5A5W. Go to Solution.
Attached is update of ExportAV.lsp - now only counts nested blocks in active visibility states. It was an easy fix.
Test it out please, just to confirm, but my tests show it now working properly.
If you confirm this as well, please indicate issue as Solved, it would be much appreciated.
@Rick_Tolleshaug_TSC thank you so much, this is exactly how I wanted it to work. Can't thank you (and everyone who made an effort to solve this) enough for this!
Hmmm... Hate to say so, but I found something strange.
When starting a new drawing we start with the block wand. It's a system line with already two blocks to start with. In the vis state we select the correct type and we build on.
When I select vis state 091 and place two additional blocks 091 on the system line, the export counts 4 blocks 091. So that's correct. Same for vis states 121, 141 and 241. But when I export vis state 261 it counts 3 blocks 261. I checked the block, and vis state 261 has two visible blocks 261
To test I tried without additional blocks (so the count should be two), it comes with 1. When I place two blocks (count should be 4) it comes with 3. It consequently misses 1 block. Weird.
Just to be sure I attached the drawing I tested with.
I will work for more permanent solution, but here is temporary fix...
Problem lies within block "wand" and the dimension object - its right extension line grip is currently associated with the block 261 (and only block 261) on the right. Meaning, merely moving block 261 on the right will make the dimension object's right extension line/point move accordingly. I don't believe you need this to be association and for some related reason, ExportAV is not counting this block. This association existed in previous shared drawings so I don't understand why this is an issue now. Anyway...
To break association, open "wand" in block editor, pick dimension and slide its right extension grip up or down, then move it back, then save. This breaks the association and on my end fixes issue.
I'll look for more permanent solution, with hopes one exists.
Attached is updated ExportAV.lsp with fix for issue block associated with dimension object is not counted. For such blocks, their entity data has two entries using same group# and routine was evaluating wrong one. It now evaluates correct one.
What specific software/tool are you referring? Meaning, which AutoCAD platform application?
The user seeks a method to export visibility settings and attributes from a project into Excel, aiming for a clean and organized format for further analysis.
To export visibility and attributes to Excel:
Visual LISP and AutoLISP are scripting languages for customizing AutoCAD. AutoLISP focuses on automating tasks, while Visual LISP adds debugging and a user-friendly interface. Use them to create custom commands, automate workflows, or integrate with external data.
Can't find what you're looking for? Ask the community or share your knowledge.