Hello all Is there any way to find the list of objects selected in command. Thanks in advance. Sri
if you're searching for a particular object type, you may try the TypeOf(<object>) test. Sub test() On Error Resume Next Dim oSS As AcadSelectionSet Dim oEnt As AcadEntity Set oSS = ThisDrawing.SelectionSets.Add("TEST1") oSS.SelectOnScreen For Each oEnt In oSS Debug.Print oEnt.ObjectName Next oEnt End Sub
Thanks for the reply. Actually what i need is to get the objects which had been selected for editing comands like move,copy etc. The stage where i need is Command:Copy Select objects : user selecting objects Select objects : I need to know programatically the objects selected by the user through any of the events.Is this possible. Sri
Hi Oberer The begin command event fires as soon as i am start the command,the selection comes only after this step. regards Sri
Thanks Ledi But the problem is i am not getting the selection count with Pickfirst selection since it always returns me a count 0. Regards Sri
with pickfirstselectionset you only get objects that are selected on screen! If no objects are selected then count is going to be 0.
Yes but only after giving command i am going to select object. Therefore i think pickfirst selection cannot be used. Regards Sri
you can select first and then write command in commnad line you tried with thisdrawing.activeselectionset?
you have to wrap your vba routine with a lisp call like this: (defun c:Macro_Name () (vla-runmacro (vlax-get-acad-object) "Macro_Name") (princ) ) Kevin