iCAx开思工具箱
标题:
插件无法启动
[打印本页]
作者:
chouchoubird
时间:
2009-6-17 12:47
标题:
插件无法启动
各位高手们:
我按着书上的例子建立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
谢谢
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3