代码应该是这样的。
如果间隔等于或大于多段线的长度,则应仅标记多段线的起点、中点和终点。(右侧图纸)
如果间隔小于多段线的长度,则应在图形(左侧)上标记多段线。
请原谅我在聚会上迟到了,但这是专门为直线段排练的吗?
无pbe
我只是用直线来演示。 对不起,我抛弃了你。
6 谢谢pbe
它工作完美:D
等待你的答复是值得的
你好,hanhphuc
它也能工作
谢谢你们的帮助
i just add a line in red, not fully tested
;;;;;CONTOUR LABELING;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;based on chainage lisp posted by sean.keohane ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(setq *dist* 100.) ; default(defun c:cl (/ dist height to ss count height ent obj chainage p p2 len obj bearing); vla-object ent) chainage *dist* ) ;_ end of setq (setq p (vlax-curve-getstartpoint obj)) (setq p2 (vlax-curve-getendpoint obj));;;;added by rrulep to label the end points of polyline;;added by hanhphuc if interval > length, (if.. progn..) (setq len (vlax-curve-getDistAtPoint obj p2)) (if (>= *dist* len)(mapcar ''((x) (_text x (_ang x (vlax-curve-getPointAtDist obj (+ (vlax-curve-getDistAtPoint obj p) 0.001))) to (* height 10. (/ (getvar 'viewsize) (cadr (getvar 'screensize)))) (caddr x) ) ) (list p (vlax-curve-getPointAtDist obj (/ len 2)) p2) ) ;_ end of mapcar(progn (setq bearing (_ang p (vlax-curve-getPointAtDist obj (+ chainage 0.001)))) (_text p bearing to height (caddr p));;;;modified by mircea to get the elevation value of polyline (_text p2 bearing to height (caddr p));;;;added by rrulep to label the end points of polyline (while (and (setq point1 (vlax-curve-getPointAtDist obj chainage)) (setq point2 (vlax-curve-getPointAtDist obj (+ chainage 0.001))) ) ;_ end of and (setq bearing (+ (angle point1 point2) (/ (* 3 PI) 2.0))) (_text point1 bearing to height (caddr point1));;;;modified by mircea to get the elevation value of polyline (setq chainage (+ chainage *dist*)) ) ;_ end of while (setq count (1+ count)) ) ;_ end of progn) ;_ end of if ) ;_ end of repeat ) ;_ end of if ) ;_ end of defun Thanks pbe
It works perfectly:D
waiting for your reply is worthit
hi hanhphuc
it also works
thanks for your help guys
页:
1
[2]