pBe 发表于 2022-7-5 19:28:48

samifox,在检查了你的代码后,我认为你应该改变
 

(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。

samifox 发表于 2022-7-5 19:31:57

马里奥。。。你知道你是我的国王吗!!!
 
感谢您通读所有帖子
 
你让我开心
 
上帝保佑你
谢伊

pBe 发表于 2022-7-5 19:35:43

samifox 发表于 2022-7-5 19:37:52

sorry i was thinking i need the code.
 
i post it
 
thanks
shay
m.dwg

pBe 发表于 2022-7-5 19:42:06

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

troggarf 发表于 2022-7-5 19:45:27

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

samifox 发表于 2022-7-5 19:46:46

you cansee those points? they supposed to be destitute exactly like the lines.

samifox 发表于 2022-7-5 19:50:33

(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

marko_ribar 发表于 2022-7-5 19:54:48

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.

samifox 发表于 2022-7-5 19:57:27

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]
查看完整版本: 沿po分布顶点