Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Cannot import custom C# library into GH scripting components

$
0
0

Hello everyone!

I’m currently converting a large Grasshopper script into a C# library to improve scalability and (potentially) enable collaboration in the future. My goal right now is to make a custom library and then make GH scripting components that inherit this library - I’m using the Script Editor for now.

However, I can’t get the script component to see my custom library. Below is some pseudocode of what I’m working with, as well as an image of the script editor layout. Any help would be appreciated.

// In the "CH_Library" folder, named "Assembly.cs"

namespace CH_Library.SubLibrary{
// Some public classes and enums...
}

// In the GH script component, visible in the same editor, under "Components/"

using CH_Library;
using CH_Library.SubLibrary;

// Code that implements the CH_Library...

Thanks in advance,
CH

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles