Explode Only Polylines to lines

Explode Only Polylines to lines

hanywillim
Enthusiast Enthusiast
373 Views
3 Replies
Message 1 of 4

Explode Only Polylines to lines

hanywillim
Enthusiast
Enthusiast

Hi Friends,
I am looking for a lisp to ONLY select the polylines in the model space and convert it to simple lines 
Thanks in advance for any kind help ❤️

0 Likes
Accepted solutions (1)
374 Views
3 Replies
Replies (3)
Message 2 of 4

ronjonp
Advisor
Advisor
Accepted solution

Sure..

 

(defun c:foo (/ s)
  (if (setq s (ssget "_X" '((0 . "*POLYLINE") (410 . "Model"))))
    (progn (initcommandversion) (command "_.explode" s ""))
  )
  (princ)
)

 

 

0 Likes
Message 3 of 4

hanywillim
Enthusiast
Enthusiast
Great bro,
Can you illustrate for me why it was written in the command bar that:
"Hatch boundary associativity removed."
but i tested, it will not delete the hatch and that is good for me.
0 Likes
Message 4 of 4

ronjonp
Advisor
Advisor

@hanywillim 

It won't delete the hatch nor explode because of the filter. What gets lost is the hatch boundary is no longer tied to the hatch because it's in pieces now.

 

Same behavior when manually done:

Command: X
EXPLODE 1 found
Hatch boundary associativity removed.
0 Likes