...((0 . "block")(2 . "*U")(70 . 1)) ... 建立block时,如上面。。。就改了这么一个地方,就可以了:PS:龙大侠真幽默,带我们畅游网络啊- (defun c:test()
- (setq pt-insert '(0 0 0))
- (setq pt (append '((0 . "block")(2 . "*U")(70 . 3)) (list (cons 10 pt-insert))))
- (entmake pt)
- (setq pt1 (polar pt-insert (/ pi 2) 0.8))
- (setq pt1 (polar pt1 0 -2))
- (setq pt2 (polar pt1 0 4))
- (setq pt (append '((0 . "LINE")) (list (cons 10 pt1))(list (cons 11 pt2))))
- (entmake pt)
- (setq pt1 (polar pt-insert (/ pi 2) 0.8))
- (setq pt2 (polar pt1 (/ pi 2) 3))
- (setq pt (append '((0 . "LINE")) (list (cons 10 pt1))(list (cons 11 pt2))))
- (entmake pt)
- (setq pt1 (polar pt-insert (/ pi 2) 6.3))
- (setq pt (append '((0 . "CIRCLE")(40 . 2.5)) (list (cons 10 pt1))))
- (entmake pt)
- (setq pt (polar pt-insert (/ pi 2) 6.3))
- (setq lst (append '((0 . "ATTDEF")
- (100 . "AcDbEntity")
- (67 . 0)
- (100 . "AcDbText")
- (1 . "0")
- (50 . 0.0)
- (40 . 3)
- (41 . 0.8)
- (51 . 0.0)
- (7 . "STANDARD")
- (71 . 0)
- (72 . 1)
- (210 0.0 0.0 1.0)
- (100 . "AcDbAttributeDefinition")
- (3 . "基准名称")
- (2 . "1")
- (70 . 0)
- (73 . 0)
- (74 . 2)
- )
- (list (cons 10 pt))
- (list (cons 11 pt))
- )
- );setq lst
- (entmake lst)
- (setq blkn (entmake '((0 . "ENDBLK"))))
- (setq lst '((0 . "INSERT")
- (100 . "AcDbEntity")
- (67 . 0)
- (100 . "AcDbBlockReference")
- (66 . 1)
- (41 . 1.0)
- (42 . 1.0)
- (43 . 1.0)
- (50 . 0.0)
- (70 . 0)
- (71 . 0)
- (44 . 0.0)
- (45 . 0.0)
- (210 0.0 0.0 1.0)
- )
- );setq lst
- (setq lst (append lst (list (cons 2 blkn)) (list (cons 10 pt-insert)))) ;结束义
- (entmake lst)
- (setq pt (polar pt-insert (/ pi 2) 6.3))
- (setq lst (append '((0 . "ATTRIB")
- (5 . "26")
- (100 . "AcDbEntity")
- (67 . 0)
- (100 . "AcDbText")
- (50 . 0.0)
- (40 . 3.0)
- (41 . 0.8)
- (51 . 0.0)
- (7 . "STANDARD")
- (71 . 0)
- (72 . 1)
- (210 0.0 0.0 1.0)
- (100 . "AcDbAttribute")
- (2 . "1")
- (70 . 0)
- (73 . 0)
- (74 . 2)
- )
- (list (cons 10 pt))
- (list (cons 11 pt))
- (list (cons 1 "A"))
- )
- );setq lst
- (entmake lst)
- (entmake '((0 . "SEQEND")))
- )
|