I am trying to use selectionsets to select an entity by its handle.
Here is my code:
Public Acad As Autodesk.AutoCAD.Interop.AcadApplication
Public AcDwg As Autodesk.AutoCAD.InteropAcadDocument
Public Const AcByBlock As Short = 2
Public Const AcByHandle As Short = 5
Sub SelectByHandle
Dim AcFilterType(0) As Short
Dim AcFilterData(0) As Object
Dim AcSS As Autodesk.AutoCAD.Interop.AcadSelectionSet
StartAutoCAD() 'Starts AutoCAD and sets AcDwg as the correct drawing
AcFilterType(0) = AcByHandle
AcFilterData(0) = "B4F"
AcSS.Select(Autodesk.AutoCAD.Interop.Common.AcSelect.acSelectionSetAll,,,AcFilterType,AcFilterData)
'Causes ArgumentException error: "Invalid argument filter list in Select"
End Sub
The code works if I use AcFilterType(0) = AcByBlock
Any sugguestions would be greatly appreciated.
Rob