Can anybody tell me why the following code when trying to set boolstatus by selecting the "Front" plane generates a "Type Mismatch" error when I move the code from the VBA editor into a VB .Net class library?
This Works Fine....
Dim swApp As Object Dim Part As Object Dim SelMgr As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim Feature As Object Sub main() Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc Set SelMgr = Part.SelectionManager boolstatus = Part.Extension.SelectByID2("Front", "PLANE", -0.03505230494835,
0.05069240410126, -4.704091274448E-04, False, 0, Nothing, 0)
etc ....
This causes the error... Public Sub Draw(ByVal swApp As SldWorks.SldWorks)
Part = swApp.ActiveDoc
SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("Front", "PLANE", -0.03505230494835,
0.05069240410126, -0.0004704091274448, False, 0, Nothing, 0.0)
etc .......
Thanks for your help,
Dale