Grasshopper

algorithmic modeling for Rhino

access and set IGH_DataAccess DA from outside grasshopper canvas

Hi,

I would like to inquire if it is possible to access and set IGH_DataAccess DA from outside grasshopper canvas.

I have a custom grasshopper component that I would like to run in NX 10(NX also use .net framework and can run dll file) instead of rhino.  Instead of rewritting all the components and restructure everything. I was thinking of writing an interface that just translate the input from NX 10 data to grasshopper and then call the components like methods.

Is such a thing possible?

Views: 680

Replies to This Discussion

It'll be almost impossible to execute the SolveInstance() methods of components externally. Your best bet is simply assign data to parameters, expire the correct objects, let Grasshopper solve the new state and then harvest data from other parameters. Would that be an acceptable approach?

Hi David,

Thanks for the reply, I am not sure I understand what you are saying by "expire the correct objects and let Grasshopper solve the new state and then harvest data from other parameters".

In a nutshell from what I understand, I can call/open grasshopper NX then feed the parameter in grasshopper to the component, let grasshopper solve it and then harvest the data after and close grasshopper?

Yes. Although it is not possible to close Grasshopper, it will remain loaded while Rhino is running. But you can open/close gh files, directly create components, set data, trigger solutions and harvest data.

The main problem is getting access to the Grasshopper instance from the outside. I have no experience with that, but perhaps the easiest solution is to create a GHA plugin (which doesn't expose any components, it just runs inside Grasshopper) and then connect to your plugin using WCF or something.

Hi David,

Thanks for the response, this is a bit beyond my ability as a programmer. I think I'll copy paste the code inside solveinstance into new separate methods.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service