Use entity with Sendcommand

Use entity with Sendcommand

Anonymous
Not applicable
128 Views
1 Reply
Message 1 of 2

Use entity with Sendcommand

Anonymous
Not applicable
Hi,

I just want to use entity in sendcommand like this, instead use activeX
method :

private sub toto()
dim Sel as acadselectionset
dim entite as acadentity
set Sel = thisdrawing.acadselectionsets.add("flavien")
sel.selectonscreen

for each entite in sel
'The name of the command is not important, i just want to know
' how the Sendcommand can recognize my entity
'Like I can do in Lisp when I use : (command "delete" (cdar
entget_entity) "")
sendcommand "" & vbcr & entity.??? & vbcr
next

sel.delete
set sel = nothing
end sub

thanks for any help...

--
AUXITEC TECHNOLOGIES
ECOPOLIS SUD
36 AV JOSE NOBRE
13500 MARTIGUES
FRANCE
EMAIL flavien@itineris.net
Web: www.auxitec.fr
0 Likes
129 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
You can load up the active selection set with the objects you want selected,
then set up your command to use the previous selection set ("delete p") when
it asks for items to be selected.

private sub toto()
dim Sel as acadselectionset
dim entite as acadentity
set Sel = ActiveDocument.ActiveSelectionSet
'acadselectionsets.add("flavien")
Sel.Clear
Sel.selectonscreen

for each entite in sel
ActiveDocument.SendCommand ".delete p " & vbcr
next

sel.delete
set sel = nothing
end sub
0 Likes