mftbrothers Posted December 2, 2010 Posted December 2, 2010 is there a way to get item index? Set item1 = ThisDrawing.ModelSpace.Item([index]) item1.XXXX = [index] XXXX which property? ObjectID,OwnerID is not index.. or is there a way to get item from ownerID? Set item1 = ThisDrawing.ModelSpace.YYYY([OwnerID] or [ObjectID]) YYYY which object? Quote
Lee Mac Posted December 2, 2010 Posted December 2, 2010 Why do you need the index? You can convert to VLA-Object from ObjectID/Handle. Quote
Lee Mac Posted December 3, 2010 Posted December 3, 2010 Using an ObjectID In LISP: (vla-ObjectIDtoObject (vla-get-ActiveDocument (vlax-get-acad-object) ) <ObjectID> ) In VBA: ThisDrawing.ObjectIdToObject(objectID) Or using a Handle: In LISP: (vla-HandletoObject (vla-get-ActiveDocument (vlax-get-acad-object) ) <Handle> ) In VBA: ThisDrawing.HandleToObject(handle) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.