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");
}