Use Filter Selection on Named Selection

Use Filter Selection on Named Selection

gustavobernardi
Advocate Advocate
871 Views
2 Replies
Message 1 of 3

Use Filter Selection on Named Selection

gustavobernardi
Advocate
Advocate

How to use filter selection on Named Selection?

 

 

(defun c:convertMLtoPL()
(setq select (car(entsel)))
(command "._explode" select)
(setq select(ssget "p"))
(setq selectterra (select (list (cons 0 "LINE")(cons 62 96))))
(setq selectpositivo (select (list (cons 0 "LINE")(cons 62 10))))
)

I want to convert MLINE to PLINE (explode and join) then separate the selection based on the object color to be able to classify into layers, if I use:

 

 

(setq selectterra (ssget "p"(list (cons 0 "LINE")(cons 62 96))))

It works, but when I try to use the next filter, the new "previous selection" now reffers to the last selection and result nil... So I need to create several filtered selections based on the original selection...

 

Thanks.

 

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

ВeekeeCZ
Consultant
Consultant
Accepted solution

Re-select the selection (re-highlight) and use "Implied" parameter.

 

(defun c:convertMLtoPL()
  (setq select (car(entsel)))
  (command "._explode" select)
  (setq select (ssget "p"))
  (sssetfirst nil select)
  (setq selectterra (ssget "_I" (list (cons 0 "LINE")(cons 62 96))))
  (sssetfirst nil select)
  (setq selectpositivo (ssget "_I" (list (cons 0 "LINE")(cons 62 10))))
  )

 

Message 3 of 3

Sea-Haven
Mentor
Mentor

You can get the properties of a mline. Using this you could select the lines knowing there location. The other alternatives is to recreate the mline as say new lines with the properties you want.

0 Likes