Hi,
I am using Rhino script from my code VB.net no Rhinocommon but script.
When I am opening at first my application the rhinoscriptt open an instance of Rhino. Most of the time the behavior of my application doesnt work as expected.
So my question is how start the application-> open Rhino if no rhino instance, or check how many instance are available and take one of them?
the code when creating the object I have Implemented is
m_RhinoApp = CreateObject("Rhino.Interface.6")
Dim nCount As Short
' Make attempts to get RhinoScript.
' Sleep between each attempt.
nCount = 0
Do While (nCount < 100)
On Error Resume Next
m_Rhino = m_RhinoApp.GetScriptObject()
If Err.Number <> 0 Or IsDBNull(m_Rhino) Then
Err.Clear()
Waitms(500)
nCount = nCount + 1
Else
Exit Do
End If
Loop
m_RhinoApp.visible = True
m_Rhino.DisplayOleAlerts(TriState.False)
m_Rhino.UnitAbsoluteTolerance(0.00001)
But from here I don’t see how many Instances are opened and I can’t take control of one of them.