|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位高手们:
我按着书上的例子建立VB DLL插件,做了引用(SW2007)三个必须的引用,写了下面语句
编译DLL也成功了,但是在SW中打开DLL时提示 :插件无法启动,是怎么回事啊???
拿光盘附带的例子DLL也同样有这样的问题,我用的是SW2007,是不是版本不对?
Implements SWPublished.SwAddin
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swCookie As Long
Dim swToolbarID As Long
Private Function SwAddin_ConnectToSW(ByVal ThisSW As Object, ByVal Cookie As Long) As Boolean
Set swApp = ThisSW
swCookie = Cookie
swApp.SetAddinCallbackInfo App.hInstance, Me, swCookie
swApp.AddMenu swDocPART, "形状", 5
swApp.AddMenuItem2 swDocPART, swCookie, "立方体@形状", -1, "Block_MenuCallback", "", ""
End Function
Private Function SwAddin_DisconnectFromSW() As Boolean
swApp.RemoveMenu swDocPART, "形状", ""
End Function
谢谢
|
|