export visibility and attribute to excel

export visibility and attribute to excel

gbG5A5W
Enthusiast Enthusiast
6,477 Views
50 Replies
Message 1 of 51

export visibility and attribute to excel

gbG5A5W
Enthusiast
Enthusiast

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?

0 Likes
Accepted solutions (2)
6,478 Views
50 Replies
Replies (50)
Message 41 of 51

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

Rick_Tolleshaug_TSC
Advocate
Advocate

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.

 

0 Likes
Message 43 of 51

gbG5A5W
Enthusiast
Enthusiast
Accepted solution

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

0 Likes
Message 44 of 51

gbG5A5W
Enthusiast
Enthusiast

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.

0 Likes
Message 45 of 51

Rick_Tolleshaug_TSC
Advocate
Advocate
I will examine and see what's up.
0 Likes
Message 46 of 51

Rick_Tolleshaug_TSC
Advocate
Advocate

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.

0 Likes
Message 47 of 51

Rick_Tolleshaug_TSC
Advocate
Advocate
Accepted solution

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.

0 Likes
Message 48 of 51

Rick_Tolleshaug_TSC
Advocate
Advocate

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

0 Likes
Message 49 of 51

castleapp10
Community Visitor
Community Visitor

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.
0 Likes
Message 50 of 51

vimusicapk738
Community Visitor
Community Visitor

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.

0 Likes
Message 51 of 51

Sea-Haven
Mentor
Mentor

@Rick_Tolleshaug_TSC your welcome to use this its multiple Excel functions, as I find more that I need I add to the code. Will read & write direct to Excel, can get Excel cell properties etc, also found an answer for images. FIXO wrote some great Excel functions but no longer with us. Original code was based on Getexcel.lsp, there was some proceedures I did not like hence looked for alternatives.

 

NOTE will not work with LT2024+ as no "get application".

0 Likes