| Author |
Message |
srinivasan
Guest
|
Posted:
Fri Jan 07, 2005 5:50 pm Post subject:
Selected Objects |
|
|
Hello all
Is there any way to find the list of objects selected in command.
Thanks in advance.
Sri
|
|
| Back to top |
|
 |
Oberer
Guest
|
Posted:
Fri Jan 07, 2005 6:48 pm Post subject:
Re: Selected Objects |
|
|
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 |
|
| Back to top |
|
 |
srinivasan
Guest
|
Posted:
Sat Jan 08, 2005 9:49 am Post subject:
Re: Selected Objects |
|
|
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
|
|
| Back to top |
|
 |
Oberer
Guest
|
Posted:
Mon Jan 10, 2005 5:50 pm Post subject:
Re: Selected Objects |
|
|
srinivasan ,
you may want to check out the begin command event... |
|
| Back to top |
|
 |
Ledi
Guest
|
Posted:
Tue Jan 11, 2005 10:06 am Post subject:
Re: Selected Objects |
|
|
dim SSET as acadselectionset
Set SSET = ThisDrawing.PickfirstSelectionSet
this should work for you |
|
| Back to top |
|
 |
srinivasan
Guest
|
Posted:
Tue Jan 11, 2005 10:06 am Post subject:
Re: Selected Objects |
|
|
Hi Oberer
The begin command event fires as soon as i am start the command,the selection comes only after this step.
regards
Sri |
|
| Back to top |
|
 |
srinivasan
Guest
|
Posted:
Tue Jan 11, 2005 5:46 pm Post subject:
Re: Selected Objects |
|
|
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 |
|
| Back to top |
|
 |
Ledi
Guest
|
Posted:
Tue Jan 11, 2005 8:48 pm Post subject:
Re: Selected Objects |
|
|
| with pickfirstselectionset you only get objects that are selected on screen! If no objects are selected then count is going to be 0. |
|
| Back to top |
|
 |
srinivasan
Guest
|
Posted:
Wed Jan 12, 2005 9:43 am Post subject:
Re: Selected Objects |
|
|
Yes but only after giving command i am going to select object.
Therefore i think pickfirst selection cannot be used.
Regards
Sri |
|
| Back to top |
|
 |
Ledi
Guest
|
Posted:
Wed Jan 12, 2005 10:03 am Post subject:
Re: Selected Objects |
|
|
you can select first and then write command in commnad line ;)
you tried with thisdrawing.activeselectionset? |
|
| Back to top |
|
 |
Kevin Terry
Guest
|
Posted:
Wed Jan 12, 2005 7:38 pm Post subject:
Re: Selected Objects |
|
|
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
"srinivasan" <nospam@address.withheld> wrote in message
news:7054855.1105505063937.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Yes but only after giving command i am going to select object.
Therefore i think pickfirst selection cannot be used.
Regards
Sri |
|
|
| Back to top |
|
 |
|
|
|
|