Jump to content

ssget filter


Ajmal
 Share

Recommended Posts

How can I add a filter in ssget...? Actually, I want to select only unlocked line with cross selection. is it possible with this": L"

(setq lines (ssget "_C" p1 p2 (list (cons 0 "LINE"))))

like this

(ssget "_+.:S:E:L" '((0 . "ARC,CIRCLE,ELLIPSE,LINE")))

 

this is not getting how. can i add can someone help

(ssget "_+.c:L" '((0 . "ARC,CIRCLE,ELLIPSE,LINE")))

i want to edit this lisp 

(setq p1 (getpoint "\nSelect object..."))
  (setq p2 (getcorner p1))
  (setq mp (polar p1 (angle p1 p2) (/ (distance p1 p2) 2)))
  (setq p1 (list (nth 0 p1) (nth 1 p1)))
  (setq p2 (list (nth 0 p2) (nth 1 p2)))
  (setq lines (ssget "_C" p1 p2 (list (cons 0 "LINE"))))
  (if (/= (sslength lines) 4)
    (alert "4 lines need to be selected")

 

 

Edited by Ajmal
Link to comment
Share on other sites

Try this

 

(if (not (equal '(nil nil) (sssetfirst nil (ssget "_C" p1 p2 '((0 . "LINE")))))) (setq lines (ssget "_:L")))

 

Link to comment
Share on other sites

22 minutes ago, dlanorh said:

Try this

 


(if (not (equal '(nil nil) (sssetfirst nil (ssget "_C" p1 p2 '((0 . "LINE")))))) (setq lines (ssget "_:L")))

 

this is working. thanks.✌️

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...