另一个更简单方式:应用现有CL合体字体ascii/unicode
℄= "\U+2104"
此方法合适于UCS,只需旋转字体vla-put-rotation或entmode (cons 50 x)

- (defun c:CL (/ p1 p2 ob)
- ;lisperado
- (or *acad* (setq *acad* (vlax-get-acad-object)))
- (defun *space (doc)
- (foreach x '(ActiveDocument ActiveLayout Block) (setq doc (vlax-get doc x)))
- )
- (if (and (setq p1 (getpoint "\n第一点.. "))
- (setq p2 (getpoint p1 "\n第二点.. "))
- (entmakex
- (cons '(0 . "LINE")
- (mapcar ''((x a b) (cons a (set x (trans b 1 0)))) '(p1 p2) '(10 11) (list p1 p2))
- )
- )
- (setq ob (vla-AddText (*space *acad*) "\U+2104" (vlax-3d-point p2) (getvar 'Textsize)))
- (vl-cmdf "_.JUSTIFYTEXT" (ssadd (entlast)) "" "_MC")
- )
- (vla-put-TextAlignmentPoint
- ob
- (vlax-3d-point (polar p1 (angle p1 p2) (+ (distance p1 p2) (getvar 'Textsize))))
- )
- (princ "用户标点无效?")
- )
- (princ)
- )
|