提供个恩特马克的例子,仅供参考
- (defun c:tt (/ bn p p1 p2 p3 p4 pt)
- (setq bn "飞翔标高")
- (if (null (tblsearch "BLOCK" bn))
- (progn
- (setq p2 '(0 0 0))
- (setq p1 (polar p2 (* pi 0.75) 2.))
- (setq p3 (polar p2 (* pi 0.25) 2.))
- (setq p4 (polar p3 pi 8.))
- (setq pt (polar p4 (* pi 0.5) 1.))
- (entmake
- (list '(0 . "BLOCK")
- (cons 2 bn)
- '(70 . 2)
- (cons 10 p2)
- )
- )
- (entmake
- (list '(0 . "LWPOLYLINE")
- '(100 . "AcDbEntity")
- '(100 . "AcDbPolyline")
- '(90 . 4)
- (cons 10 p1)
- (cons 10 p2)
- (cons 10 p3)
- (cons 10 p4)
- '(70 . 0)
- )
- )
- (entmake
- (list '(0 . "ATTDEF")
- '(100 . "AcDbEntity")
- '(100 . "AcDbText")
- (cons 10 pt)
- (cons 40 1.8)
- (cons 1 "0.000")
- '(100 . "AcDbAttributeDefinition")
- (cons 3 "标高")
- (cons 2 "标高")
- '(70 . 0)
- )
- )
- (entmake '((0 . "ENDBLK")))
- )
- )
- (if (setq p (getpoint))
- (progn
- (entmakeX
- (list '(0 . "INSERT")
- '(100 . "AcDbEntity")
- '(100 . "AcDbBlockReference")
- (cons 2 bn)
- (cons 10 p)
- )
- )
- (vl-cmdf "attsync" "n" bn)
- )
- )
- )
|