Grasshopper

algorithmic modeling for Rhino

Adding reference to rhcommon_c.dll (for making a stand-alone using Rhinocommon)

Hi, 

I have been working on an application within GH using VB and C#. Now I want to make a console application using the same functions I've already developed. Everything seems fine but I cannot manage to open a Rhino file from within Visual Studio; as it does not allow me to add a reference to rhcommon_c.dll. 

Has anybody had a similar issue? Is there any way to do this?

Any help is very much appreciated!

Dim OFD As New OpenFileDialog
If OFD.ShowDialog() = DialogResult.OK Then
MessageBox.Show("You selected the file " + OFD.FileName)
End If

Rhino.RhinoDoc.OpenFile(OFD.FileName)' here it gets stuck as it misses a reference to rhcommon_c.dll

Views: 1361

Replies to This Discussion

RhinoCommon.dll (which is a .NET assembly) relies on rhcommon_c.dll (which is an unmanaged assembly), which in turn relies on Rhino.exe and OpenNurbs.dll (both unmanaged assemblies). In other words, unless RhinoCommon has been loaded by Rhino.exe, it won't work.

To provide some functionality for standalone apps, we have a standalone version of RhinoCommon, which is called Rhino3dmIO. It allows you to open files and do some very basic geometric operations, but a lot of functionality is missing because it ultimately resides inside Rhino.exe

Thanks David; I got this assembly through NuGet; as I had added previously an assembly this way. However, I am unable to import the Rhino3dmIO as a reference. Am I missing something? 

BTW, does this IO library allow me to read mesh objects from a file? Could you please guide me through this operation? Is this the way to go (in case I succeed to reference this Rhino3dmIO)

Rhino.rhinodoc.ActiveDoc.Objects.GetObjectList(ObjectType.Mesh)

I'm sorry Rhino3dmIO is not my strong suit. Nor is NuGet. I think you'd better ask on our discourse forum, where all the other McNeel programmers hang out.

Thanks anyway; I finally figured an alternative option would be to develop a Rhino plugin; which is much more straightforward. 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service