Hello to all,
I'm trying to write an add-in .DLL for SolidWorks 2004 under Visual Basic 6.
The .DLL in itself seems to run fine... I've started my project by modifying someone else's project (Ray Gorman). Using his .reg files which is:
=================================== Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Solidworks\AddIns\{8B38509E-DEAD-48EF-8F91-16CE B1E9779F}] @=dword:00000001 "Description"="Perform a task..." "Title"="Fontaine - OriginalProject"====================================
and his batch file:
==================================== echo Engineering Studio registration command: echo H. Fontaine Ltee - OriginalProject.dll... regedit -s OriginalProject.reg regsvr32 OriginalProject.dll =====================================
Using this, I'm able to register my .dll in SolidWorks and use it instead of the OriginalProject.dll .
However, the descritpion under the Tools -- Add-in menu is still Fontaine - OriginalProject ... Also, I don't want my add-in to replace OriginalProject, but to be another different add-in.
What I've tried to do was to change OriginalProject.reg and OriginalProject.dll by my names (TestProject.reg and TestProject.dll).
As I understand it, the CLSID needs to be unique. I've been able to generate a new CLSID using code from:
However, in SolidWorks, my .dll now appears in the Add-in menu, but when I try to activate it (in the add-in menu), SW gives an errors, says it can't find a file...
I'm not sure about this, but I think that the problem lies in the fact that nowhere I tell the computer that my new CLSID is linked to the TestProject.dll file... Is this the problem? Does the CLSID need to be hard-coded somewhere in my VB code?
Also... Should the CLSID be generated once only in my computer, and each user will use that CLSID, or should it be generated on each user computer?
Note: I intend to distribute my add-in, so it wouldn't look good if the user had to start the add-in using the File -- Open fucntion from SolidWorks... I'd like to automate the registration process...
Thank you very much for your help!
As you may have guessed it, I'm quite new to this add-in and .dll stuff (though I'm not too bad in VB, I think...)
- Fontaine_Guy