- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi sir, i want "2 space" front of chainage in this lisp.
front 2 space and back 2 space.
actual "0.000"
i want " 0.000 "
(defun C:CHAINAGE ; = Chainage Text at Intervals
(/ interval ss n pl dst pt)
(setvar 'dimzin 0)
(command "_.layer" "_make" "Chainage" "")
(setvar 'textsize (getdist "\nChainage Text Size: "))
(setq
interval (getdist "\nChainage Interval: ")
ss (ssget '((0 . "*POLYLINE")))
); setq
(repeat (setq n (sslength ss))
(setq
pl (ssname ss (setq n (1- n)))
dst 0
); setq
(while (<= dst (vlax-curve-getDistAtParam pl (vlax-curve-getEndParam pl)))
(command "_.text"
"_non" (setq pt (vlax-curve-getPointAtDist pl dst))
"" ; height
(cvunit ; rotation
(+ (angle '(0 0 0) (vlax-curve-getFirstDeriv pl (vlax-curve-getParamAtPoint pl pt))) (/ pi 2))
"radian" "degree"
); cvunit
(rtos (/ dst 1000) 2 3)
); command
(setq dst (+ dst interval))
); while
); repeat
(princ)
); defun
Solved! Go to Solution.