I don't know if i am in the right forum.
I need help about how to use the handle property to retrieve an object
example
suppose obj - a line for example is an OleVariant that is associated to the drawing object.
OH = obj.handle is the unique handle (of type string) of object and can be used to retrieve the object , but
trying to retrieve it , i use the reference
SearchObj = Acad.ActiveDocument.ModelSpace.Item(OH)
the below causes error , that means ModelSpace is the wrong collection the item belongs to
So, what is the collection in wich i can find the object using handle
Solved! Go to Solution.
Solved by hgasty1001. Go to Solution.
Hi,
Has been a lot of time since the last time i did VBA, but I think you can create an AcadObject with something like:
dim acobj as AcadObject
Set acobj=thisDrawing.HandleToObject(Handle)
Now you can test acobj for your needs.
Gaston Nunez