Message 1 of 1
Robot API in Grasshopper
Not applicable
07-14-2020
04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.