Access the Rhino.Inside.Revit component “AddGeometryDirectShape”

Hello!

I’m trying to access the Rhino.Inside.Revit component “AddGeometryDirectShape” just like explained in the guides (Rhino.Inside®.Revit), but I get null.
Is it because that component is not available? Or am I doing something wrong?

Thank you very much in advance.

Please see below the code:

using System;
using System.Collections;
using System.Collections.Generic;

using Rhino;
using Rhino.Geometry;

using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;

using DB = Autodesk.Revit.DB;
using UI = Autodesk.Revit.UI;

using RIR = RhinoInside.Revit;
using RhinoInside.Revit.Convert.Geometry;

using Rhino.NodeInCode;

private void RunScript(object x, object y, ref object A)
{

var addGeomDirectshape = Rhino.NodeInCode.Components.FindComponent("RhinoInside_AddGeometryDirectShape");
if (addGeomDirectshape == null) 
{
  throw new Exception("One or more of the necessary components are not available as node-in-code");
}

Hi Esther can you post a Gh file with your Code? Thanks

Check this as well…

Hi Japhy,

Sure! Please find attached.

I’ve checked the link you sent and tested the part where the components are called, and I still get the error.

Many thanks!

CallComponents_RIR.gh (10.2 KB)