Robot API in Grasshopper

Robot API in Grasshopper

Anonymous
Not applicable
650 Views
0 Replies
Message 1 of 1

Robot API in Grasshopper

Anonymous
Not applicable

I am developing a plugin in C# to interface with Robot through Grasshopper. Given that we need to write one class per component, I am forced to instantiate the Robot application object in each component's constructor separately as follows:

 

namespace HelloGrasshopper
{
  public class MyFirstComponent : GH_Component
  {
private IRobotApplication robotApp;
public MyFirstComponent() : base("MyFirst", "MFC", "My first component", "Extra", "Simple") {
    robotApp  = new IRobotApplication(); }
...

 

Is there a way to reuse the same app object rather than instantiating it in each component separately? Grasshopper only allows components to interact through in/out links.

 

 

 

0 Likes
651 Views
0 Replies
Replies (0)