(Defun c:demo () (if (and (setq pline (car (entsel "\nSelect Polyline:"))) (eq (cdr (assoc 0 (entget pline))) "LWPOLYLINE") (setq int (getdist "\nEnter Interval:")) (setq in int) ) (while (Setq pt (vlax-curve-getPointAtDist pline int)) (setq ppt (vlax-curve-getparamatpoint pline pt)) (vlax-invoke (vlax-ename->vla-object pline) 'AddVertex (1+ (fix ppt)) (list (car pt) (Cadr pt)) ) (setq int (+ int in)) ) ) )
到
(setq in segcnt)
之后,您应该再次测试代码。。。
M、 R。 马里奥。。。你知道你是我的国王吗!!!
感谢您通读所有帖子
你让我开心
上帝保佑你
谢伊 sorry i was thinking i need the code.
i post it
thanks
shay
m.dwg Sorry dude, still don't get it.
Try this link. 7-10] http://www.cadtutor.net/forum/showthread.php?78119-Intersection-of-a-vertical-lines-and-a-polyline. Me think that's what you're after.
Cheers The code works great PBE
I don't have an immediate use for it but it does work just fine when I tested it
Thanks
~Greg you cansee those points? they supposed to be destitute exactly like the lines.
(Defun c:demo () (if (and (setq pline (car (entsel "\nSelect Polyline:"))) (eq (cdr (assoc 0 (entget pline))) "LWPOLYLINE") (setq int (getdist "\nEnter Interval:")) (setq in int) ) (while (Setq pt (vlax-curve-getPointAtDist pline int)) (setq ppt (vlax-curve-getparamatpoint pline pt)) (vlax-invoke (vlax-ename->vla-object pline) 'AddVertex (1+ (fix ppt)) (list (car pt) (Cadr pt)) ) (setq int (+ int in)) ) ) )
thanks for your timr dude
here the lines i dont understand (RED)
[*]after getting the poly id and interval info you assign in to int why?
[*](than the while loops until nill)
[*]pt get the first point according to the interval
[*]ppt than get the distance up to this point
[*]than you invoke conversion and the call AddVertex
[*]than you advance ppt by 1 , why?
[*]than you make a list of the entity, why?
(its open to everyone:) )
Thanks
Shay samifox, after examining your code, me think you should change
(setq in segcnt)
to
(setq in seglen)
After, you should test your code again...
M.R. Mario...do you know you are my king!!!
Thank for reading thru all the thread
You make my day
God bless you
shay
页:
1
[2]