Bonjour, j'ai une simple question,
J'ai récupéré le handle de plusieurs entitées à partir d'Excel et maintenant je voudrai selectionner une entité avec son handle
Mon but étant de selectionner une entitée et ensuite de zoomer dessu. Pour l'instant j'ai cela (un zoom sur l'entitée précédente) :
Set objetSelectionne = AcadDoc.HandleToObject(Target.Cells.Value)
Cells(1, 1).Select
'CouleurOriginale = objetSelectionne.Color
Call SetForegroundWindow(FindWindowA(vbNullString, AcadObj.Caption))
AutoCAD.Application.ActiveDocument.SendCommand ("z o p ")
'Select.objetSelectionne
Update
'objetSelectionne.Color = CouleurOriginale
Je voudrai donc remplacer "p" pas le handle...
Mais je sais pas si c'est possible, ou si vous avez une autre solution.
Merci
Cordialement
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
if you work with SendCommand you can also work with sending a LISP-statement to the commandline.
So you can use
(handent "12D0")
to get the object with handle &h12D0 selected.
HTH (and Google translated correctly), - alfred -