I'm trying to create a macro in VBA that allows all the selected planes to be mated parallel. I would like to use a multi-mate. I'm using AddMate3, I've tried AddMate, AddMate2 and AddMate3. see code below. I get error 0, unknown error. Thank you. PS, all planes are pre-selected.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myMate As Object
Set myMate = Part.AddMate3(3, 0, False, 0, 0, 0, 0, 0, 0, 0, 0, False, longstatus)
MsgBox longstatus
Part.ClearSelection2 True
End Sub