As promised... little later than I mentioned, but here is an example of using LISP to get a Selection Set.
What is a Selection Set?
If you have used AutoCAD before you will most likely know what a Selection Set is, but may not have heard it mentioned this way. A Selection Set is when the user picks objects on screen during a command like Move or Erase. These objects that are selected form a Selection Set.
;; Begin LISP Code - 10/14/04
;; This example shows how to use a single point to select objects at that point
(defun c:GetObjects ()
(setq pt1 '( 1 1 0))
(setq sset (ssget pt1))
(princ (strcat "\nNumber of objects selected: " (itoa (sslength sset))))
)
Draw a line from 0,0 to 10,10 and run the command. It should find one object as it passes through that point.
I will post what the ObjectARX could would look like to just get the object at the same point and not the additional code to create a command to run it.
Sincerely,
Lee
Comments