Script Editor inside Rhino inside Revit - Exceptions

Hello @eirannejad !

Running Grasshopper from within Revit 2024 threw an exception

Running a Daily Build “Rhino 8, 8.4.23350.02001” and Revit 2024.2

Object: Python3Component (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: Python3Component (level 2)
{
  The type initializer for 'RhinoCodePlatform.Rhino3D.GH.ComponentConfigs' threw an exception.
  TypeInitializationException
}

Object: Python3Component (level 3)
{
  Method not found: '!!0 Rhino.Runtime.Code.Serialization.Json.RhinoCodeJson.Deserialize(System.String, System.Text.Json.JsonSerializerOptions)'.
  MissingMethodException
}

Object: IronPython2Component (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: IronPython2Component (level 2)
{
  The type initializer for 'RhinoCodePlatform.Rhino3D.GH.ComponentConfigs' threw an exception.
  TypeInitializationException
}

Object: IronPython2Component (level 3)
{
  Method not found: '!!0 Rhino.Runtime.Code.Serialization.Json.RhinoCodeJson.Deserialize(System.String, System.Text.Json.JsonSerializerOptions)'.
  MissingMethodException
}

Object: CSharpComponent (level 1)
{
  Exception has been thrown by the target of an invocation.
  TargetInvocationException
}

Object: CSharpComponent (level 2)
{
  The type initializer for 'RhinoCodePlatform.Rhino3D.GH.ComponentConfigs' threw an exception.
  TypeInitializationException
}

Object: CSharpComponent (level 3)
{
  Method not found: '!!0 Rhino.Runtime.Code.Serialization.Json.RhinoCodeJson.Deserialize(System.String, System.Text.Json.JsonSerializerOptions)'.
  MissingMethodException
}


I believe this is a Revit Addin conflict recently introduced by some changes Ehsan has been working through in the scripteditor json handling. He is aware and i’ve added this thread to the youtrack.

I was able to narrow it down to RevitLookUp addin on my machine.

1 Like

That was it! RevitLookup for me here,
I know what to do now in case I need to run Scripts inside Revit.

Thank you @Japhy

2 Likes

@Japhy Thanks for figuring this out.