Grasshopper

algorithmic modeling for Rhino

Is it possible to add third-party dll as reference while developing plugin for rhino5.0(64bit)?

Hi,

I was developing a small plugin and referenced a third-party library(.dll). When I built my code into .rhp, I copied both the .rhp and that .dll file into the Plug-ins folder of Rhino 5.0(latest build, 64bit)

I traced the error and found the code simply stopped where I instantiated from that third-party library.

 

Is there something I have to do before running a plugin which referenced a third-party library?

 

Thanks!

 

-Jeome

Views: 1349

Replies to This Discussion

What's the error message from the exception?

Thanks,

-Steve

Thanks, Steve

There were no error messages. I guess that all the error messages which thrown out by the VS2010 simply would not be shown when it works as a rhino plugin. I was using Rhino.RhinoApp.Writeline to trace the code, and found it simply stopped when I instantiated from the third-party library. 

 

Thanks, 

-Jerome

What does "simply stopped" exactly mean?  Does Rhino crash... nothing happens...an exception is thrown?

 

If you are debugging in VS2010, then Visual Studio should stop at the location where an exception was thrown and tell you what is going on.  If you are not using the VS2010 debugger, then I would highly recommend starting.

 

Thanks,

-Steve

Hi,

"simply stopped" means nothing happened. Rhino was still open and no exception was thrown out.

The way I debug was as follows:

1. build the .rhp

2. copy it to the the plugin folder of rhino

3. run the plugin

So, actually, what I was doing could not be called "debugging", it was a test run.

Is it possible to directly run and debug the code via VS2010 before building a .rhp file?

Could you show me how? I'm developing with rhinocommon.dll and some external libraries on the .net framework 4.0(.net framework also could do). 

 

Thanks,

-Jerome

Hi Jerome,

I am having exactly the same problem. My third party library(.dll) seems not being loaded in Grasshopper.

I get the following Balloon error message on my component:

"Error: Solution Exception : Could not load file or assembly 'myDllTest, Version = 1.0.0.1, Culture= Neutral, PublicKeyToken = null' or one of its dependencies. The system can not find the file specified."

I well added my assembly files to Grasshopper ( Test.gha, and myDllTest.dll which are into the same folder ) using GrasshopperdevelopperSetting...

Any help would be very appreciated.

Thanks

Raf

Hi Raf,

I haven't dig into this problem any further, I will give another try in the coming one or two days and I'd love to share you with the results.

Thanks,

Jerome

Thanks, let's keep in touch about that issue...

David, any idea ?

Well, I am wondering if the third part dll shouldn't be loaded in rhino using plugin manager before runing the .gha..

just a thought like that.. but I didn't try yet..

Well, in terms of .gha, I don't think there's any connection between the plugin manager and gha.  I don't know if embedding third party dll into the your plugin dll using some software could do the work, such as SmartAssembly. I am quite busy these days and I hope I could have a try before Christmas.

Raf,

Sorry for the late reply. I tried to embed the third party dll into the gha with SmartAssembly and it works. You could try this with your own gha and it should work.

Thanks,

-Jerome.

I've found on my pc and user pc's that you need to untick coff loading in the grasshopperdevelopersettings command to get grasshopper to load 3rd party dlls on 64 bit windows. I used to have my plugin automatically set this first time it loaded but some other plugins can exhibit other side effects when this is set.

Does this fix your problem?

Cheers Jon

Hi,

I've had the same problem and untick COFF loading seems to get things to work. However, I don't understand why this is.

Can someone comment on what COFF loading is?

Also, did anyone have to create a windows installer package to install your custom dll on other machines?

Thanks.

Kermin

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service