Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

export visibility and attribute to excel

50 REPLIES 50
SOLVED
Reply
Message 1 of 51
gbG5A5W
3209 Views, 50 Replies

export visibility and attribute to excel

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:

gbG5A5W_0-1729866848196.png

It's a lot of clicks for everytime the same settings. Is it possible to do this faster?

50 REPLIES 50
Message 41 of 51

I'll look into this. I agree, should only report nested blocks in active visibility states.
Message 42 of 51

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.

 

Message 43 of 51
gbG5A5W
in reply to: gbG5A5W

@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!

Message 44 of 51

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.

Message 45 of 51

I will examine and see what's up.
Message 46 of 51

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.

ExportAV Temp Fix.jpg

 

I'll look for more permanent solution, with hopes one exists.

Message 47 of 51

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.

Message 48 of 51

What specific software/tool are you referring?  Meaning, which AutoCAD platform application?

Message 49 of 51
eLoanWarehouse
in reply to: gbG5A5W

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.

Message 50 of 51
castleapp10
in reply to: gbG5A5W

To export visibility and attributes to Excel:

  1. Use software like AutoCAD or similar tools.
  2. Extract the attribute data using the Data Extraction tool.
  3. Save the extracted data as an Excel (.xlsx) file.
  4. Ensure you include visibility states in the export settings, if supported.
Message 51 of 51
vimusicapk738
in reply to: gbG5A5W

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.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report