Create Speckle Collection Object in GH?

Hello!

Quick question: Since the new webviewer is centered around collections, i cant find a way to make the data display as intended in there with just the grasshopper components provided. Arrays don’t expand in the viewer anymore unless formated as collection and there seems to be no way to create collection objects in grasshopper with the current component lineup. Am i missing something here? otherwise: feature request!

3 Likes

Hey Andrei,

Thanks for the good feedback, two things here:

  • yes, the scene explorer should be able to display other types of collections like arrays etc, we’re working on making it more powerful and we’ll keep this in mind! (cc @benjavo )
  • yes, we should also consider adding native ways to create collections in GH (cc @gokermu )

For the meantime, you can achieve it by using a C# node like this:

    var collection = new Speckle.Core.Models.Collection("my collection", "Random Things");
    collection["layer A"] = new List<double>{ 1, 2, 3, 4, 5 };
    collection["layer B"] = x;
    A = collection;
  • I could not find a way to expand the collection unless it was attached to a selectable object, but hopefully that’s fine for you!
3 Likes

Great workaround! Forgot C# was an option here

1 Like