RhinoInside Siemens NX Problem

@stevebaer @DavidRutten
Hi Steve, Hi David, I am trying to develop a rhinoinside plug-in for Siemens NX, my primary reference is RhinoInside.Revit. I encountered a problem now. When i hit the Start Rhino button in the NX interface, just shown below, the Rhino Interface will show, but when i hit the grasshopper button in Rhino, grasshopper will show normally, but it dont load the components that i put in program folder.

While i hit the Grasshopper button in NX, the grasshopper will load the components that i put in program folder, but the icon is very large. and the gh file i creeated in Rhino grasshopper will not connected with this grasshopper.

I have no idea what’s wrong with my program. My Rhinocero is started with NX, but I don’t know how to start grasshopper with Rhinocero, can you give me some advice, My goal is when i hit the gasshopper in Rhino or in NX, their behavior will be the same, load the components that i created, and the two grasshopper can share one file.
Or you can tell me who can i ask for advices, thanks.

1 Like

Do you have a project repository on github that you can share?

I just created one.


Following the project with great interest.

The plugin is good, I hope the bugs are fixed
Can you accompany it and help it ???

Thanks, we don’t have NX so we are currently only guessing at what could be the issue.

Can you tell if multiple AppDomains are being used? It doesn’t make much sense to me why Grasshopper would load components differently when started through different functions in the same process.

Thanks, Steve.

I didn’t create any AppDomain manully in my code, But NX have a ManagedLoader to call my code, which has one AssemblyResolve callback, but that method doesn’t resolve any Rhino or Grasshopper library, so i created a Loader class in my code, and in that class i add a AssemblyResolve callback to resolve Rhino and Grasshopper library. I’m not sure is that cause the problem.

In addition, when i start Grasshopper in Rhino in Rhinoinside.Revit, it opens the Grasshopper window almost in no time, but in my plug-in, when i start the Grasshopper command in Rhino, it takes few seconds to load the Grasshopper plug-in, I wonder is there some place that when Rhinoceros startup, it starts Grasshopper too. But i don’t find where is that. The following image is the code in Rhinoceros of Rhinoinside.Revit, is the grasshopper start code in there.

Here is my code in Rhinoceros, cause NX does’t support multi-thread, so i commented some code.

Let me make sure I understand the behavior you are seeing. From what I am reading you have two buttons for Rhino.Inside.NX:

  • show Rhino
  • show grasshopper

When you show Rhino and then run the Grasshopper command from Rhino you get a different looking Grasshopper than when you click on the show grasshopper button.

Is my understanding of the issue correct?

Absolutely right.

I’m wondering if multiple AppDomains are involved. It would be interesting to see if AppDomain.CurrentDomain.Id returned different values when grasshopper is run these two different ways.

Thanks Steve.

I tried your guess. Print the current AppDoamin Id in some places. The appdomain id is always the smae one. The result is the following.


It was a wild guess and I guessed wrong. Do you have any contacts at Siemens for help on a project like this? If so, maybe we can work with them to figure out what is going on.

Thanks, I’ll try that. Can you give me your e-mail address? If i make new progress, i will share with you.

Sure, it’s steve@mcneel.com

Ok, Thanks for help.