- (defun c:tt (/ H SS N EN NN ANG MP)
- (setq h (getreal "\n字高<10.0>"))
- (if (null h)
- (setq h 10)
- ) ;_ if
- (setq ss (ssget '((0 . "*polyline"))))
- (if ss
- (repeat (setq n (sslength ss))
- (setq en (ssname ss (setq n (1- n))))
- (setq nn 0)
- (repeat (fix (vlax-curve-getendparam en))
- (setq ang
- (angle
- (setq mp (vlax-curve-getPointAtParam en (+ nn 0.5)))
- (mapcar '+ mp (vlax-curve-getFirstDeriv en (+ nn 0.5)))
- ) ;_ angle
- ) ;_ setq
- (entmake (list (cons 0 "text")
- (cons 10 mp)
- (cons 40 h)
- (cons 1 (itoa (setq nn (1+ nn))))
- (cons 50 ang)
- ) ;_ list
- ) ;_ entmake
- ) ;_ repeat
- ) ;_ repeat
- ) ;_ if
- (princ)
- )
|