几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-04-13, 10:59 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】fully remove add-in

fully remove add-in
yesterday, i attempted to change the compile folder for my sw add-in. what i found was that even though the dll files were being built to the new location, solidworks was still loading the add-in from the original location (oddly, the tooltip in the sw add-in window pointed to the new location).
in order to fix this, i ran regasm.exe /u (in a script that i've modified to remove these add-ins) and the add-in disappeared from the list in sw. when i rebuilt the project, sw still attempted to load the dll from the original location.
this makes me think that while regasm removes the keys necessary to make the add-in available in sw, it does not fully remove all references to it. this begs the question: is there a way to fully remove a plug-in?
i ended up having to change the guid of the dll and rebuild it in the new location. knowing that there are orphaned registry entries annoys me, but i'm not exactly losing sleep over it. should i be?
i'm also curious to know how this influences deployment strategies for this project, especially with regards to code updates. i've been successful simply replacing the files after the plug-in has been registered, but am i better to make a proper installer, or is there another solution?
any input is appreciated!
thanks
just run regasm with /u, and delete the registry entries for the guid from hklm\software\solidworks\solidworks 200x\addins and that is all that is referenced
if i search the registry for references to the name of my toolbar, i find hundreds. are these harmless once the entries you mentioned are removed?
most are probably invalid entries, mru items, cache, history and the likes. all you are concerned about are the ones mentioned above.
i have a module called "registry scrub" that cleans addin registry info.
thanks for the input guys!
i like the idea of the registry scrubber, and i've tried it but was unable to get the it to work. maybe it is just my inexperience with dll's, but i didn't understand the message it gave me.
i selected the appropriate guid from the list, i left the toolbar selection blank, and then i believe it asked me to supply the classid for the typelib. i didn't know what to enter, so it wouldn't continue.
where do i find the classid?
guid = clsid
it should only ask if you exited the form without selecting guid.
i can't check until later. it's been a while since i have used.
i post the .dll on the server along with install and uninstall using regasm (with and without /u)
each time i make a change to my addin, everyone should get the update automatically, i don't have to send out the .dll each time i modify my addin
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
roland,
the exact message i get is "typelib classid not found from addin. eneter typelib classid." maybe it is something wrong with my addin? obviously i started with the sw addin template, but i don't have a really good grasp on what that code entails.
chris,
i didn't realize that it was possible to register a dll that is located on a network drive. i guess the only down side is that upgrades have to be made without any sessions of solidworks running, correct? (since sw locks the dll)
roland,
just an update: after receiving that message, i entered nothing in the field and clicked cancel. the 'scanning registry' message stayed up, and after letting it run, it returned the full list of registry entries.
the program did quit with an out of memory error, but i'm sure that is related to my poor old computer, not the code.
the entry is gone so aside from that little bug, it seems to have worked perfectly! thanks, good work!
yes, you have to ask everyone to shutdown their sw applications so you can update the dll or you can do it by the end of the day
it's convinient to create a log file and attach to the class_initialize (vb6) or class new (.net) to know who are running the addin - that's how i check before asking other employees to close sw
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
edited: 09/24/2008 at 10:41 am by chris ch
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】add-in closes solidworks yang686526 SolidWorks二次开发 0 2009-04-12 10:58 PM
【转帖】install a .net dll add-in again yang686526 SolidWorks二次开发 0 2009-04-12 09:29 PM
【转帖】install a .net dll add-in again yang686526 SolidWorks二次开发 0 2009-04-12 06:44 PM


所有的时间均为北京时间。 现在的时间是 09:38 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多