Jump to content

Recommended Posts

Posted

This is a sample of a block that I have. The part highlighted in red is the block, the parts highlighted in yellow are the attribute tags in that block. What I would like is to be able to create a table where I can draw the "DESC-S" AND "PTNO-S" attributes, count the number of similar blocks in the same drawing and put the information into a table. I need this as I use several numbers of the same blocks in a drawing, and I don't want to count each part manually.
1778174041_WhatsAppImage2020-01-29at11_39_38.thumb.jpeg.42b82051e82b9c05d0ff84e49041b968.jpeg

Posted

I do have a multi block to table that counts blocks and sorts on up to 5 attributes deep, so  can have one block name but with different attribute values counted. Post a sample dwg and will show result. I will state though it will be a pay for lisp. But is very cheap. I am looking for real dwg's to test on.

 

There are various block count programs out there but most only count a block name not subsequent attribute values.

 

Try Dataextraction Autocad command, lee-mac.com has a good block count.

Posted

Alright , may i know how much does it cost? 

Because to be honest this is our school project assignment. Really appreciate if you can help us out. Hope to hear from you soon

Posted

Ok here is a example make a table. There is lots of get attribute examples out there its your school assignment.

 

; example of creating a table
; By Alan H July 2017
; sum of column row 10 column 1 ie 2nd column 
; Example make a table by Alan H

(defun ex_table (/ colwidth numcolumns numrows objtable rowheight sp doc)
(vl-load-com)
(setq sp (vlax-3d-point '(0 0 0))) ; or use getpoint
(setq doc  (vla-get-activedocument (vlax-get-acad-object) ))
;(setq vgms (vla-get-paperspace doc))
(setq vgms (vla-get-modelspace doc)) ; table in modelspace
(setq numrows 5)
(setq numcolumns 5)
(setq rowheight 0.5)
(setq colwidth 30)
(setq objtable (vla-addtable vgms sp numrows numcolumns rowheight colwidth))
(vla-settext objtable 0 0 "TABLE title")
(vla-settext objtable 1 0 "A") 
(vla-settext objtable 1 1 "B") 
(vla-settext objtable 1 2 "C")
(vla-settext objtable 1 3 "D")
(vla-settext objtable 1 4 "E")
(vla-settext objtable 2 0 "1")
(vla-settext objtable 3 0 "2")
(vla-settext objtable 4 0 "3")
(vla-setcolumnwidth objtable 0 15) ; 0 is first column
(vla-setcolumnwidth objtable 1 30)
(vla-setcolumnwidth objtable 2 60)
(command "_zoom" "e")
(princ)
)
(ex_table)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...