Hi All,
As a user of Rhino and VisualStudio.Net, I was pleased to learn that Rhino Inside should make it possible to add Rhino functionality to your own applications.
In the current case, I would like to develop a standalone application that creates and saves geometry.
Unfortunately, all attempts to do so result in the following exception:
Unable to load DLL ‘rhcommon_c’: A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
What has been done so far:
-
Installed Rhino 7 (trial license).
-
In VisualStudio: loaded NuGet package “Rhino.Inside”.
-
Wrote the following simplified sample code:
’ ----------------------------------------------------------------------------
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
RhinoInside.Resolver.Initialize()
End Sub
’ ----------------------------------------------------------------------------
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Points As Rhino.Collections.Point3dList
Dim Line As Rhino.Geometry.Line
Dim Model As Rhino.FileIO.File3dm
Points = New Rhino.Collections.Point3dList
Points.Add(x:=0R,
y:=0R,
z:=0R)
Points.Add(x:=1.0R,
y:=1.0R,
z:=1.0R)
Line = New Rhino.Geometry.Line(from:=Points(0I),
[to]:=Points(1I))
Model = New Rhino.FileIO.File3dm
Model.Objects.AddLine(line:=Line)
Model.Write(path:=“C:\Temp\Line.dxf”,
version:=5I)
End Sub
’ ----------------------------------------------------------------------------
In “Sub Button1_Click”, the line “Model = New Rhino.FileIO.File3dm” results in exception 0x8007045A.
What went wrong here?
Thanks for your help