马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (defun c:ptlev ( / ins ocs pnt )
- (while
- (setq pnt (getpoint "\nPick point <exit>: ")) ;; UCS point
- (setq ins (cons (+ (car pnt) 0.1) (cdr pnt)) ;; UCS Text insertion point
- pnt (trans pnt 1 0) ;; WCS point
- ocs (trans '(0.0 0.0 1.0) 1 0 t) ;; OCS normal vector
- )
- (entmake
- (list
- '(00 . "TEXT") ;; Entity type
- (cons 01 (rtos (caddr pnt))) ;; Z-coordinate of WCS point
- (cons 07 (if (tblsearch "style" "arialn") "arialn" (getvar 'textstyle))) ;; Text Style
- (cons 10 (trans ins 1 ocs)) ;; OCS insertion point
- (cons 50 (angle '(0.0 0.0) (trans (getvar 'ucsxdir) 0 ocs t))) ;; Rotation to match UCS
- '(40 . 0.2) ;; Text Height
- '(62 . 256) ;; Colour set to ByLayer
- (cons 210 ocs) ;; Normal vector of OCS plane
- )
- )
- (entmake
- (list
- '(00 . "POINT") ;; Entity type
- '(62 . 256) ;; Colour set to ByLayer
- (cons 010 pnt) ;; WCS point
- (cons 210 ocs) ;; For when PDMODE /= 0
- )
- )
- )
- (princ)
- )
|