Grasshopper

algorithmic modeling for Rhino

 

     Hello,everyone!  Does anyone know how to slove the following question:

     I use C# write a dll (for example A.dll)and want to use in Grasshopper,but has this Runtine errors(Can't load the dll (for example B.dll),con't find the module). When i use the C# write the A.dll, I call the B.dll which is write in C++(Because most of the functions and classes are already done in B.dll,I just don't want to write the same classes and functions in C# again,It's large and exhausted)!

    I build the A.dll and have no problem call the B.dll in c#,But when i use the A.dll in Grasshopper,The peoblem I mentioned before occured!

   Does anyone have any idea how to use the B.dll or where should i put the dll to so the Grasshopper can load it automatically!

 

Thank you in advance!

Views: 370

Replies to This Discussion

Try placing it in the same folder, it should be the easiest way.

You can refer and load dll's from other locations, explore this method and class to load other assembly

public class ssiGHInit : Grasshopper.Kernel.GH_AssemblyPriority
{
public override GH_LoadingInstruction PriorityLoad()
{

Grasshopper.Kernel.GH_AssemblyResolver.AddSearchNode(Path.Combine(folder, "resourceLibrary.dll"));

I hope this helps.

David, if you also read this, it seems that classes deriving from IGH_GOO are accessed from Grasshopper prior to the GHLoadingInstruction reflection. Is there anyway to prioritize GHLoadingInstruction? I've worked around for the time being, as loadtime errors are produced unless you untick COFF.

Cheers,

Jon

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