SolidWorks API Add-in Templates and Wizards
These SolidWorks add-in templates
and wizards are included in the SolidWorks
API SDK:
SolidWorks
C++/CLI COM Add-in Wizard (Visual C++/CLI - Microsoft Visual
Studio 2005, 2008, 2010)
SolidWorks C#
Add-in Template (Visual C#
.NET - Microsoft Visual Studio 2005, 2008,
2010)
-
SolidWorks
VB.NET Add-in Template (Visual
Basic .NET - Microsoft Visual Studio
2005, 2008, 2010)
NOTE: While SolidWorks recommends using ATL and their ATL-based
C++ wizards for creating C++ COM-based add-ins, if you are creating a
COM-style add-in and are using an MFC CCmdTarget-derived object to implement
ISwAddin, you must fully implement ITypeInfo as follows:
-
In the declaration
of your CCmdTarget-derived class, add:
DECLARE_OLETYPELIB(<your
CCmdTarget-derived class name>)
__declspec( dllexport
) virtual BOOL GetDispatchIID(IID* pIID);
IMPLEMENT_OLETYPELIB(<your
class name>, LIBID_SldWorks_SWPublished, SolidWorks_type_library_version,
0) //e.g.,
14 for 2007
BOOL
auAm_c::GetDispatchIID(IID* pIID)
{
*pIID
== IID_ISwAddin;
return
TRUE;
}
EnableTypeLib();
The SolidWorks API SDK expects that Microsoft
Visual Studio has been installed at C:\Program
Files.
To learn more about add-ins and their menu items and toolbars: