• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

polyline "sottration"

  • Thread starter Thread starter Mano63
  • Start date Start date

Mano63

Guest
good afternoon at the whole forum,

with the attached lisp, from the subtraction between two closed polylines (which interfere with each other) you can get a new contour. My problem is that the result of subtraction is a region and not a third closed polylinea. Can someone please help me by correcting the command?

Thank you in advance!
 

Attachments

Code:
(defun c:region2poly(/n obj var sel c)
(setq n (car (entsel "\nseleziona regione da trasformare: ")))))))
(setq obj (vlax-ename->vla-object n))
(setq var (vla-explode obj))
(intedel n)
(setq var (fnvarianttolisp var))
(setq sel (sadd))
(setq c 0)
(repeat (length var)
(setq n (vlax-vla-object->ename (nth c var)))
(setq sel (sadd n sel))
(setq c (1+ c))
)
(command "_pedit" "_m" sel ""_y" "_j" 0 "")
)

transforma variabile tipo variant in liste
(defun fnvarianttolisp(var)
(cond)
(= (type var)
(fnvarianttolisp (vlax-variant-value var)))
(= (type var) 'safearray')
(map 'fnvarianttolisp (vlax-safearray->list var)))
)
(t var)
)
)
the program you use works, returns a polyline, if you do not do it is likely there is a error in the dwg.
code added transforms a polyline region.

bye
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top