Number of Objects into Object Value by Key does not match Objects Output

Hello, I have 766 walls coming from Revit in Grasshopper, but when I try to use the display value, the number of objects entering the node does not match the number in the output. In the output, I get 766 branches but 764 items. I can see there are 2 empty branches, but I cannot figure out why. In Revit, I confirmed the walls have an area, and there are no ghost walls as far as I can tell.
I am trying bake the objects with element ids, categories, etc., but since the output data doesn’t match it errors out. Any help would be appreciated.

Hi @m_rudolph are you able to isolate just those 2 walls and send them over to us as a Revit file?

My guess is that the connector is failing to get their mesh representation, but we need to check the source. I just shared a google drive link where you can upload it.

Hi @teocomi, yes, I can isolate. They are two curtain walls. I’m sorry where did you share the google drive link?

At your work email, but this should also work: https://drive.google.com/drive/folders/14TA4jJClikG-T8eBNijmfXmz_p7yN4M3?usp=sharing

Otherwise feel free to send them via DM or other service.

Gotcha, must be some heavy security on my end. Try this link, Speckle_Missing_Walls.rvt

@teocomi Forgot to tag you on the above.

Thanks for this, I had a quick look:

  • since these walls are curtain panels, they don’t have a displayValue property
  • instead, they store each panel and mullion as sub-elements inside the elements prop and each will have a displayValue

As we’re working on a v3 version of the Grasshopper conenctor, this is good feedback in terms of better functionality to extract data. We could consider some handy nodes to get the displayValue of parent objects automatically @clrkng @AlanRynne @dimitrie .

As a workaround for now I wrote a little C# script that should help you fetch the display mesh of the curtain panel sub elements:

    var wall = x as Speckle.Core.Models.Base;
    if(wall["elements"] != null)
    {
      var subelementMeshes = new List<object>();
      var traversalFunc = Speckle.Core.Models.GraphTraversal.DefaultTraversal.CreateTraversalFunc();
      var objects = traversalFunc.Traverse(wall);
      foreach(var tc in objects)
      {
        if(tc.Current["displayValue"] is IReadOnlyList<Speckle.Core.Models.Base>)
        {
          var displayValues = tc.Current["displayValue"] as IReadOnlyList<Speckle.Core.Models.Base>;
          subelementMeshes.AddRange(displayValues);
        }
      }
      A = subelementMeshes;
    }
    else {
      A = wall["displayValue"];
    }

Remember to load this two assemblies as described in the docs: Grasshopper | Speckle Docs

Let us know if it works!

PS you can use the Dev Mode in the scene explorer to see the raw data and its properties as it comes form Speckle:

image