Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:rhinocommonsamples:addcommand [2015/09/14] (current)
Line 1: Line 1:
 +======Adding Commands to RhinoCommon projects======
 +> **Developer:​** //​[[developer:​rhinocommon|RhinoCommon]]//​
 +> **Summary:​** //​Demonstrates how to add additional commands to a RhinoCommon plug-in project.//
  
 +===== Question =====
 +The [[http://​visualstudiogallery.msdn.microsoft.com/​16053049-7db2-4c9f-961a-53274ac92ace|RhinoCommon Project Wizard]] creates a skeleton plug-in project with a single command. However, the wiki says it is possible for a plug-in to contain more than one command. How can I add additional commands to my plug-in project?
 +
 +==== Answer ====
 +To add a new command to your RhinoCommon plug-in project, you simply need to define a new class that inherits from **Rhino.Commands.Command**.
 +
 +An easy way to do this is to just use the **Empty RhinoCommmon Command** template. Here is how you do that:
 +
 +  - Make sure you have the [[http://​visualstudiogallery.msdn.microsoft.com/​16053049-7db2-4c9f-961a-53274ac92ace|RhinoCommon Project Wizard]] installed.
 +  - Launch Visual Studio and open your plug-in project.
 +  - From Visual Studio, pick the **Project -> Add New Item** menu item.
 +  - Select the **Empty RhinoCommmon Command** template from the list of installed templates.
 +  - Provide a unique file name that relates to the command you are adding.
 +  - Click the **Add** button.
 +
 +{{:​developer:​rhinocommonsamples:​rhinocommon_addcommand.png?​640}}
 +
 +//
 +
 +{{tag>​Developer rhinocommon}}
developer/rhinocommonsamples/addcommand.txt ยท Last modified: 2015/09/14 (external edit)