尝试以下操作(通过视口使用):
- (defun c:bn ( / e p ) (vl-load-com)
- (if
- (and
- (setq e (ssget "_+.:E:S" '((0 . "INSERT"))))
- (setq e (vlax-ename->vla-object (ssname e 0)))
- (setq p (getpoint "\nSpecify Point for MText: "))
- )
- (entmake
- (list
- '(0 . "MTEXT")
- '(100 . "AcDbEntity")
- '(100 . "AcDbMText")
- (cons 7 (getvar 'TEXTSTYLE))
- (cons 10 (trans (trans p 1 2) 2 3))
- (cons 11 (getvar 'UCSXDIR))
- (cons 50 (getvar 'VIEWTWIST))
- (cons 410 (getvar 'CTAB))
- (cons 210 (trans '(0.0 0.0 1.0) 1 0 t))
- (cons 1
- (vlax-get-property e
- (if (vlax-property-available-p e 'effectivename)
- 'effectivename
- 'name
- )
- )
- )
- )
- )
- )
- (princ)
- )
编辑:更新为ViewTwist帐户 |