| McNeel Wiki | |||||
| edit · print · help · all topics | |||||
Main Pages
Languages
| Microsoft now provides free trimmed down versions of there developer products called "Express Editions." The two products in particular that I will be discussing here are the express editions of:
These products can be used to develop .NET plug-ins for Rhino 4. Here are some helpful steps to get you started: Download and install VB.NET or C# Choosing between VB.NET and c# is really a matter of syntax preference. Both programming languages should be able to build to same quality of plug-in; it just depends on the langauge that you feel "more" comfortable with. If you are not sure, download them both. The installer let's you choose which components to download and install. The default settings work fine for developing Rhino plug-ins. The extra items that are unchecked that you may be unsure about are:
Install the Rhino.NET plug-in project and command wizards This can be found at DotNetProjectAndCommandWizards Create a Rhino plug-in project
Compile the plug-in I like to have the output window showing when compiling my projects. This way I can see what is going on. To show this window, click on Debug... Windows ... Output You have to compile your project into a DLL (assembly) before you can try it in Rhino. This can be done by clicking on Build... Build my project name. The output window will tell you if everything went ok. Debugging the plug-in Here's the tricky part (and it's not really that tricky.) The express editions don't expose controls to set up your plug-in project for debugging. In order to debug your plug-in, you need to tell the compiler that you want rhino4.exe to start and then have the debugger latch on to that process. In order to set up the debugger for your project, perform the following steps:
Run your plug-in Once you've done the above, reopen your project in VB.NET or C# and click on Debug... Start Debugging. If you were successful, Rhino will start. Load your plug-in with the PlugInManager. Once your plug-in loads, try running the custom command that the wizard defined in your plug-in. If you click on the properties button in the plug-in manager you will see that your plug-in has a command named something like MyPlugIn1Command | ||||
| rename · changes · history · subscriptions · lost and found · references · file upload | |||||