solidworks using C++/CLI Add-in create add-in's GUID
solidworks using C++/CLI Add-in create add-in's GUID
Ready to take your SolidWorks macro/tool to the next level but don't know where to start? How about creating a fast, efficient .Net Taskpane add-in giving you total flexibility of your program and form designs through the .Net Framework at the same time as being in-process and perfectly integrated into SolidWorks?
After fitting as much as I could into the last 2 SolidWorks books the one thing I was always pining to get into the books was a good run down of creating Taskpane add-ins using .Net, however I did not want to cram it into the last 20 pages of a book; I wanted to cover it in depth. So, with that in mind I have decided to cover Taskpane add-ins over the next few months through our new Tutorials section of our site.
Right without any more chit-chat let's get right into it. This first tutorial will take you through creating a .Net Taskpane add-in that is registered and starts up when SolidWorks starts, becoming visible in the Taskpane tab for all to see. I will not cover any SolidWorks API stuff in this tutorial other than getting the Taskpane framework up and running the correct way (none of this Visual Studio Template Solution rubbish, let's do it properly!).
To begin with open up whatever copy of Visual Studio you have, and create a new C# (or VB.Net if you prefer) Class Library. Give it a name and click OK to create the solution and you are ready to start.
SwAddin Interface
By default Visual Studio will have created a class called Class1 to your project. Rename the filename in from the Solution Explorer to something more apt such as "SWIntegration". This should automatically rename the class name to the same, but if it doesn't rename that also.
SwAddin Interface
By default Visual Studio will have created a class called Class1 to your project. Rename the filename in from the Solution Explorer to something more apt such as "SWIntegration". This should automatically rename the class name to the same, but if it doesn't rename that also.
In the class we need to add references to the SolidWorks libraries we added just, so that this class name knows where to find the SolidWorks things. To do this, take a look at the top of the file where it shows entries such as using System; (or Imports System for those in VB). These are namespace includes. Add another few lines below for the SolidWorks namespaces:
buy cheap solidworks 2012 only $ 85
It is not a OEM or tryout version.
We offer worldwide shippment .
You can pay by paypal.
没有评论:
发表评论