Updated create block code.
This sets the second attribute to "PRESET" which means you won't be prompted for a value when inserting the block, it will go with the preset vale "IL=00". Other than that it will act like a normal attribute.
(defun crb ( )
(if (not (tblsearch "BLOCK" "CRBLK"))
(progn
(if (not (tblsearch "STYLE" "Isocp"))
(entmake
(list
(cons 0 "STYLE")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbTextStyleTableRecord")
(cons 2 "Isocp")
(cons 70 0)
(cons 40 2.5)
(cons 3 "Isocp.ttf")
)
)
)
(entmake
(list
(cons 0 "BLOCK")
(cons 8 "0")
(cons 370 0)
(cons 2 "CRBLK")
(cons 70 2)
(cons 4 "Block to Place Coordinate Points")
(list 10 0.0 0.0 0.0)
)
)
(entmake
(list
(cons 0 "CIRCLE")
(cons 8 "0")
(cons 370 0)
(list 10 0.0 0.0 0.0)
(cons 40 1.25)
)
)
(entmake
(list
(cons 0 "ATTDEF")
(cons 8 "0")
(cons 370 0)
(cons 7 "Isocp")
(list 10 3.0 2.5 0.0)
(list 11 3.0 2.5 0.0)
(cons 40 2.5)
(cons 1 "00")
(cons 3 "Coordinate Point")
(cons 2 "00")
(cons 70 0)
(cons 72 0)
(cons 74 2)
)
)
(entmake
(list
(cons 0 "ATTDEF")
(cons 8 "0")
(cons 370 0)
(cons 7 "Isocp")
(list 10 3.0 -2.5 0.0)
(list 11 3.0 -2.5 0.0)
(cons 40 2.5)
(cons 1 "IL=00")
(cons 3 "IL ?")
(cons 2 "IL")
(cons 70 8)
(cons 72 0)
(cons 74 2)
)
)
(entmake
(list
(cons 0 "ENDBLK")
(cons 8 "0")
)
)
;;;--- To set block units in metre 70-6
(
(lambda ( lst )
(regapp "ACAD")
(entmod
(append (subst (cons 70 6) (assoc 70 lst) lst)
(list
(list -3
(list "ACAD"
(cons 1000 "DesignCenter Data")
(cons 1002 "{")
(cons 1070 1)
(cons 1070 1)
(cons 1002 "}")
)
)
)
)
)
)
(entget (cdr (assoc 330 (entget (tblobjname "BLOCK" "CRBLK")))))
)
;;;--- To make block annotative
(
(lambda ( lst )
(regapp "ACAD")
(regapp "AcadAnnotative")
(entmod
(append (subst (cons 70 1) (assoc 70 lst) lst)
(list
(list -3
(list "ACAD"
(cons 1000 "DesignCenter Data")
(cons 1002 "{")
(cons 1070 1)
(cons 1070 1)
(cons 1002 "}")
)
(list "AcadAnnotative"
(cons 1000 "AnnotativeData")
(cons 1002 "{")
(cons 1070 1)
(cons 1070 1)
(cons 1002 "}")
)
)
)
)
)
)
(entget (cdr (assoc 330 (entget (tblobjname "BLOCK" "CRBLK")))))
)
)
)
;;;--- to disable allow explod-----
(vl-load-com)
(setq BLOCKS (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object)))
BLK (vla-Item BLOCKS "CRBLK")
)
(vla-put-explodable (vla-Item BLOCKS "CRBLK") :vlax-false)
(princ)
)
Do you have a table style set up for this?
If Yes, please upload a sample drawing (saved in AutoCAD 2010 format) containing the tablestyle.
If No, we will have to create a simple one. This will make inserting the table(s) far easier and should enable all the tables (if more than one) to be set out in a grid given the top left insertion point of the first table.
I am not one of the robots you're looking for