This version no need for cad file
this subroutine create a layer called Point and block called Terminal
Add this line at first of lisp
Code:
(defun C:XBLOCK ( / ) ;WHAT DOES "(/ souk)" MEAN?
(TerminalBlock)
(setup)
(getboxinput)
And add this subroutine at end of lisp
Code:
(defun TerminalBlock ()
(if (not (tblsearch "LAYER" "Point"))
(progn
(entmake (list
'(0 . "LAYER")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbLayerTableRecord")
(cons 2 "Point") ;layer name
(cons 62 2) ;layer color
'(70 . 0) ; on, unlocked, thawed
))))
(if (not (tblsearch "BLOCK" "Point"))
(progn
(entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0")
(100 . "AcDbBlockReference") (2 . "Terminal") (10 0.0 0.0 0.0) (70 . 0)))
(entmake '((0 . "HATCH") (100 . "AcDbEntity") (8 . "POINT")
(62 . 2) (100 . "AcDbHatch")
(10 0.0 0.0 0.0) (210 0.0 0.0 1.0) (2 . "ANSI31")
(70 . 0) (71 . 0) (91 . 1) (92 . 7) (72 . 1) (73 . 1)
(93 . 2) (10 -0.06285 0.0 0.0) (42 . 1.0) (10 0.06285 0.0 0.0)
(42 . 1.0) (97 . 0) (75 . 0) (76 . 1) (52 . 0.0) (41 . 0.03125)
(77 . 0) (78 . 1) (53 . 0.785398163397448) (43 . 0.0) (44 . 0.0)
(45 . -0.00276213586401) (46 . 0.00276213586401) (79 . 0)
(47 . 0.000519971032496) (98 . 1)
(10 0.001298342685957 0.002354605870909 0.0)))
(entmake '((0 . "CIRCLE") (100 . "AcDbEntity")
(67 . 0) (8 . "POINT") (62 . 2) (100 . "AcDbCircle") (10 0.0 0.0 0.0) (40 . 0.06285)))
(entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0")))
)
)
(princ)
)
Bookmarks