create a Legend with LISP

create a Legend with LISP

jtm2020hyo
Collaborator Collaborator
7,262 Views
7 Replies
Message 1 of 8

create a Legend with LISP

jtm2020hyo
Collaborator
Collaborator

I found "Block Counter" created by @Lee_Mac

 

imagen.png

 

I need one hero to add "description" or "block description" in the "countsettings" (image 02) and to work with regular blocks, dynamic blocks, nested blocks

 

imagen.png

the result should be something like this:

 

imagen.png

link lisp:

http://www.lee-mac.com/blockcounter.html (CountV1-5)

http://www.lee-mac.com/nestedblockcounter.html (BlockCountV1-5)

http://www.lee-mac.com/dynamicblockcounter.html (DBcountV1-1)

 

0 Likes
Accepted solutions (2)
7,263 Views
7 Replies
Replies (7)
Message 2 of 8

devitg
Advisor
Advisor

Please upload your SAMPLE.DWG. With all such differents blocks kind. 

 

Message 3 of 8

jtm2020hyo
Collaborator
Collaborator

@devitg wrote:

Please upload your SAMPLE.DWG. With all such differents blocks kind. 

 


here my blocks

0 Likes
Message 4 of 8

devitg
Advisor
Advisor

Hi , it  seem to be that  Bcount , by itself , can do it with any block kind. 

I'm diggin on it to get the description. 

Hope I can get it.

 

 

;;--------------------------=={ Block Count }==-------------------------;;
;;                                                                      ;;
;;  This program will generate a report detailing the individual        ;;
;;  quantities of primary and nested blocks, dynamic blocks & xrefs in  ;;
;;  a selection or an entire drawing.                                   ;;
;;                                                                      ;;
;;  The program will correctly count the number of nested blocks,       ;;
;;  nested dynamic blocks and nested xrefs; nested to any level; and    ;;
;;  with any number of instances of the same block at each level.       ;;
;;                                                                      ;;
;;  Of course, the program may be used as a standard block counter,     ;;
;;  since the nested block count data is displayed separately from the  ;;
;;  primary block count data, and the nested report will not be shown   ;;
;;  if there are no nested blocks in the drawing.                       ;;
;;                                                                      ;;
;;  The report is printed to the command-line and separately details    ;;
;;  the number of primary and nested blocks with a break-down of the    ;;
;;  quantities for each individual block name, together with the total  ;;
;;  number of primary and nested blocks located adjacent to the report  ;;
;;  headings. The printed report may subsequently be extracted to       ;;
;;  either a Text or CSV file.                                          ;;
;;                                                                      ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2014  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Version 1.5    -    2014-02-02                                      ;;
;;----------------------------------------------------------------------;;

Message 5 of 8

devitg
Advisor
Advisor

erased by DEVITG , 

 

 

0 Likes
Message 6 of 8

marko_ribar
Advisor
Advisor
Accepted solution

I remember using that lisp of Lee Mac for my needs also, but I never used it to enter Settings - I made my version to do directly what I needed and I added column for block counting preview scheme in kind of list structure... As for description I created completely new table which imports csv Excel file - I have csv with me and I can alter changes whenever I needed it... The problem with my versions is that table may be big for project with which it should be presented - floor plan etc... We don't know how big count preview list would look like, so we can't predict column width, but I have accounted that it should span according to largest one found in project...

I'll attach what I have so that you can see what I mean, and if you accept my solution I suppose I should get some gratitude or perhaps accept solution mark...

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 7 of 8

jtm2020hyo
Collaborator
Collaborator

sorry for the answer too late. I was trying to understand your work.

beautiful .lsp and .vlx, working with block attributes and csv imported tables.

 

it's a good idea. and I like it.

 

just curiously, do you have any method to insert or import the description to the blocks?

 

 

0 Likes
Message 8 of 8

marko_ribar
Advisor
Advisor
Accepted solution

Collect block names you want to add description, iterate through names and apply this sub to block definition ename...

Subfunction is already posted in your newly started topic, and you can also find it here :

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/change-block-description-in-autolisp...

Marko Ribar, d.i.a. (graduated engineer of architecture)