Compile RhinoCommon: Plugins namespace cannot be found

Hi Guys,

I just downloaded the RhinoCommon source code from github (https://github.com/mcneel/rhinocommon). My compiler is VS2013 community. I’ve followed instruction here: https://github.com/mcneel/rhinocommon/wiki/Rhino3dmIO-Toolkit-(OpenNURBS-build)

However, the Rhino namespace does not contain PlugIns namespace. Here is the error message:

Error 4 The type or namespace name 'PlugIn' could not be found (are you missing a using directive or an assembly reference?) C:\rhinocommon-master\dotnet\RDK\rdk_sdkrender.cs 292 31 RhinoCommon

Based on Rhino SDK documentation, there is a PlugIns namespace under Rhino, so I am confused why the compiler does not see it. Is there any reference to build RhinoCommon that I am missing?

Thanks,
Best,
Yifan

Hi Yifan,

If you want to build RhinoCommon plug-ins for Rhino, just reference the RhinoCommon.dll assembly that comes with Rhino. Better yet, download the project wizard for Visual Studio to setup a new project.

https://visualstudiogallery.msdn.microsoft.com/16053049-7db2-4c9f-961a-53274ac92ace

Does this help?

– Dale

Hi Dale,

Thanks a lot for your prompt reply.

I would like to convert 3dm file into our own file format using Rhino3dmIO. Please correct me if I’m wrong, I thought I need to use Rhino3dmIO.dll instead of RhinoCommon.dll. My challenge is that I can’t find any documentation on .NET OpenNURBS SDK, so I downloaded the source code of a RhinoCommon that supports OpenNURBS, which is called Rhino3dmIO toolkit, but it does not compile. Could you give me some directions on finding the documentation of the Rhino3dmIO toolkit or compiling the RhinoCommon source code?

Regards,
Yifan

Yes, this is correct. To build this, start here:

The directions are fairly straight forward.

If you don’t want to compile the source, you can always get the nuget package.

Thanks Dale. I downloaded the source code following the instructions but it does not compile. I got errors saying PlugIns is not a part of the Rhino namespace.

Thanks for your help!
Yifan

Try this:

1.) Install the NuGet package manager, if you haven’t already, by following the instructions here.

2.) Right-Click your project file in Solution Explorer and select “Manage NuGet Packages …”.

3.) On the left side of the dialog expand the “Online” option and select nuget.org.

4.) In the top right search box type “Rhino3dmIO” and click on a Rhino3dmIO.dll option (there are 3: x86, x64, and AnyCPU) and click on the “Install” button.

5.) Close the Manage NuGet Packages dialog. The Nuget package is installed and ready to use.

Does this help?

Yes Dale, steps are very clear and I have already done that. I have found the API documentation for RhinoCommons: RhinoCommons API. I looked inside Rhino3dmIO.dll, it appears to be a subset of RhinoCommons API. However, I was expecting it to have extra calls related to OpenNURBS, as the OpenNURBS C++ SDK has it’s own classes and functions.

So do you know if there is any documentation for the Rhino3dmIO.dll? Or can I just use the RhinoCommons documentation? How can I access the OpenNURBS API through Rhino3dmlIO? How is Rhino3dmIO.dll different from RhinoCommons.dll besides being a subset of the Rhinocommons.dll?

Sorry for throwing a lot of questions. Any information will be appreciated.

Thank you,
Yifan

If you are using Rhino3dmIo, you probably want to work primarily with the class Rhino.FileIo.File3dm for reading and writing 3dm files.