ssget function

ssget function

gaexcalibur
Enthusiast Enthusiast
776 Views
2 Replies
Message 1 of 3

ssget function

gaexcalibur
Enthusiast
Enthusiast

I have a small lisp that selects by a window using 2 points.  My office is complaining because the window command does not show anything.  it is just selecting 2 points with no pic window like autocad usually does when selecting objects.  they really want a window that shows up like the regular pick system.  is this even possible or will they have to live with and invisible window?   I have attached my program just in case but it is really simple program that creates a selection set then goes to a different program to build the table based on that selection set.  I am using 2 different programs rather than a single on as we have multiple selection sets for different pieces but need the same table output.  so we are using different programs to create the selection set and a single program to build the table.  

Please let me know what you all think.

thanks.

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

pbejse
Mentor
Mentor
Accepted solution
 (and
    (setq p1 (getpoint "\nFirst Corner :"))    
	(setq p2 (getcorner p1 "\nSecond Corner :")))
0 Likes
Message 3 of 3

ВeekeeCZ
Consultant
Consultant

Or this or that...

 

(defun c:sbFT1 ()   (selblkbynameF "FT RAIL PLAN-C,FT RAIL PLAN-1,FT RAIL PROFILE-1,FT RAIL CORNER-1"))

(vl-load-com)
(defun selblkbynameF (name / e n out ss x p1 p2)

  (defun getblocknameF (obj)
    (if (vlax-property-available-p obj 'effectivename)
      (vla-get-effectivename obj)
      (vla-get-name obj)))

  (if (and (setq ss (ssget '((0 . "INSERT"))))
	   (setq n -1
		 out (ssadd)))
    (while (setq e (ssname ss (setq n (1+ n))))
      (if (wcmatch (getblocknameF (vlax-ename->vla-object e)) name)
	(ssadd e out))))
  
  (sssetfirst nil out)
  (C:BOMTOPRAILA)(PRINC)
  (princ)
  )


(defun c:sbFT2 ()   (selblkbynameF "FT RAIL PLAN-C,FT RAIL PLAN-1,FT RAIL PROFILE-1,FT RAIL CORNER-1"))

(vl-load-com)
(defun selblkbynameF (name / e n out ss x p1 p2)

  (defun getblocknameF (obj)
    (if (vlax-property-available-p obj 'effectivename)
      (vla-get-effectivename obj)
      (vla-get-name obj)))

  (if (and (setq ss (ssget))
	   (setq ss (ssget "_P" '((0 . "INSERT"))))
	   (setq n -1
		 out (ssadd)))
    (while (setq e (ssname ss (setq n (1+ n))))
      (if (wcmatch (getblocknameF (vlax-ename->vla-object e)) name)
	(ssadd e out))))
  
  (sssetfirst nil out)
  (C:BOMTOPRAILA)(PRINC)
  (princ)
  )
0 Likes