几何尺寸与公差论坛

 找回密码
 注册
查看: 989|回复: 0

【转帖】recompile addin when solidworks is running

[复制链接]
发表于 2009-4-13 13:48:45 | 显示全部楼层 |阅读模式
recompile addin when solidworks is running
hello,
i'm upgrading my visual basic 6 addin to vb.net using visual studio 2005.
if i start solidworks, connect my addin and start it, then its all fine.
now, i disconnect my addin from solidworks, change the code and want to recompile the addin, but i get an error, because solidworks has not released the dll.
so i have to stop solidworks, recompile and then start solidworks again.
if i had many little changes, that costs a lot of time, everytime to stop and start solidworks. i took the addin-template deliverd with solidworks.
can i code anything in the disconnect-time, that solidworks release the dll ?
in visual basic 6 it was no problem to recompile the dll with running solidworks.
for any help i'm very grateful
juergen
in my experience, solidworks does this for macros and addins. its a pita. we have our addins and macros stored on a network drive so everyone can use the same ones. whenever i have to update a file, i have to wait till the end of the day when everyone exits solidworks. why does solidworks lock the file, i have no idea. whats odd though is most people do not have write access to the folder that i store these files, yet the files still get locked by solidworks.
cswp
solidworks office professional 2008, sp 3.1
pc #1:
dell precision t3400, core2duo 2.33ghz, 4gb ram,
nvidia quadro fx 1700
pc #2:
dell precision 380, p4 3.80ghz, 2gb ram,
nvidia quadro fx 1400
yes, thats also a problem.
but what do you do, when developing a new function or anything else in your addin, also on the local desktop. do you stop and start solidworks, too. for every little change in the code?
just for tests of new functions it's no good thing. but i have many functions, that need a lot of performance, so i can take a workaround with a separate exe-file.
how do you solve this problem?
my addin simply has buttons for other macros that i created. this allows me to setup the addin with all the buttons i want, then edit the macros as i need it. as long as someone else hasnt used the macro, i can edit it without closing solidworks. depending on what your addin does, this may not be an option for you.
cswp
solidworks office professional 2008, sp 3.1
pc #1:
dell precision t3400, core2duo 2.33ghz, 4gb ram,
nvidia quadro fx 1700
pc #2:
dell precision 380, p4 3.80ghz, 2gb ram,
nvidia quadro fx 1400
hi chris,
yeah, so its easier for you to test the different functions. i tried to encapsulate special functions in an exe-file. but for testing of the whole addin it's necessary to build the complete dll and test it as addin. the same procedure i have to do for functions who needs high-performance, because they are to slow in a separate exe.
can i develope vb.net in a macro? until now i developed my macros in vba-code, its similar to vb6.
regards, juergen
hi all
we have the same problem in c#
and we haven't find a way to unlock the dll
reagard ,dudi
the reason you cannot recompile the project is because it is still locked, not by solidworks as such, but by the rot.
when sw loads the addin it gets loaded into the rot table, but when sw unloads the add-in from the normal menu it stays in the rot for faster loading next time. when you close sw only then does it manually remove the add-in from the rot.
to get around this i can create a tool that manually unloads a dll from the rot without having to close sw. anyone interested?
i am!!
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
well i made the tool and found out at the last steps that unless your program is the one that registered the object into the rot yourself you cannot obtain the id needed to revoke it, so i am trying a security hack, but it is not looking good
can i make anything self in the disconnect time of my addin to remove it from the rot? at the moment i do only unregister the registry-keys. it's a part of the template.
regards, juergen
unfortunately not as your add-in is still not the owner of the rot register, solidworks is the register and holds what is called a "cookie key" that is the identifier to your add-in, and its that key that you need in order to remove it from the rot, so unless solidworks api (i have emailed them) can provide me with access to the cookies of add-ins then we are a bit stuck.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 09:14 , Processed in 0.035788 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表