I need to create a add-in for data card button.
I tried something, But its not working properly.
here are my codes
Imports EdmLib
Public Class VbAddinSS
Implements IEdmAddIn5
Private vault1 As IEdmVault5 = Nothing
Public Sub GetAddInInfo(ByRef poInfo As EdmAddInInfo, poVault As IEdmVault5, poCmdMgr As IEdmCmdMgr5) Implements IEdmAddIn5.GetAddInInfo
poInfo.mbsAddInName = "Test1"
poInfo.mbsCompany = "Test"
poInfo.mbsDescription = "For Testing"
poInfo.mlAddInVersion = 1
poInfo.mlRequiredVersionMajor = 10
poInfo.mlRequiredVersionMinor = 0
'Get Card Button Click
poCmdMgr.AddHook(EdmCmdType.EdmCmd_CardButton)
End Sub
Public Sub OnCmd(ByRef poCmd As EdmCmd, ByRef ppoData As Array) Implements IEdmAddIn5.OnCmd
If Left(poCmd.mbsComment, 9) = "MyButton:" Then
MsgBox("Reached")
End If
End Sub
End Class
When I click the button its prompt the following error.
Please fix this
Thanks
SolidworksApi/macros