Hi all,
I have a problem with an older lisp code found on the internet and modified by me...the code makes a table with the number of blocks selected in the drawing ... and it works perfectly.
The problem occurs in blocks with an attribute ... because it no longer displays the real name of the block and in the table the figure is inserted without attribute values.
My request is that someone can help me modify this code to accept the attribute blocks, display their values and the real name in the generated table.
Attach a DWG file (for example) with a generated table and two blocks one normal (simple) and the other with attributes and the lisp code.
Thanks in advance for my time.
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
change this
(setq blk_name (cdr (assoc 2 (entget ent))))
to
(setq blk_name (getpropertyvalue (getpropertyvalue ent "BlockTableRecord") "Name"))
HTH
@mihai_bantas hi,
Partially fixed (e.g you will get the real block name when it's dynamic block)
why partially? because when dealing with attributes blocks for table cell, along with attributes value you have to get the object ids of attributes definition and take-in consideration that there maybe numbers of that block with different attributes value and each of them have to be in a different row in table so to handle all that it's a big challenge
good luck
moshe
@mihai_bantas wrote:
The problem is half resolved ...it still remains to display block attributes with their values.
Like this..where the last column shows the attribute values of the block as it appears on the drawing
See the attached modified lisp file [ BLKQTY_PBE.lsp ]
;; By : Gia Bach, gia_bach @ www.CadViet.com ;;; ;; pBe April 2018 ;;;
Can't find what you're looking for? Ask the community or share your knowledge.