Hi,
We have the plug-in SAM that we use in Rhino 6, and Rhino 7 and recently tried it on Rhino 8 but come across an issue. Our SAM components that use geometry work fine however the issue is with on plugin when we connect to an external simulation tool. It does now work anymore under Rhino 8. We have it working in Rhino 7 as well as in Rhino.Inside.Revit 2022-2023…
The issue we are struggling with seems to be related to InteropServices which stop working. We suspect these may be related to the change from .NET Framework to .NET Core in Rhino 8.
public static TBD.TBDDocument TBDDocument()
{
TBD.TBDDocument tBDDocument = null;
try
{
object @object = Marshal.GetActiveObject("Document"); //HERE IS THE ISSUE
if (@object != null)
{
tBDDocument = @object as TBD.TBDDocument;
Core.Modify.ReleaseCOMObject(@object);
tBDDocument = null;
}
}
catch
{
}
tBDDocument = new TBD.TBDDocument();
return tBDDocument;
}
Any idea of where to look and any tips and help will be appreciated. Need to say that this will be a fundamental issue for us when Rhino 8 will be released.
ps. How to get our code we pasted on forum to recognize c#, I forgot what text needs to be added