RhinoApp.GetPlugInObject with non-RhCommon importer returns null

I’m trying to use RhinoApp.GetPlugInObject to retrieve an instance of ACAD importer:

var obj = RhinoApp.GetPlugInObject(new Guid("6cd8563b-7bb0-4777-93f6-4dd10b3406a5"));

But I got null. It seems the loading is successful but CRhinoApp_GetPlugInObject returns null. Is it the expected behavior, or is it because the importer/exporter doesn’t support IUnknown interface?

Hi @gankeyu,

The AutoCAD file import plug-in does not implement this feature, which is why a null is returned.

– Dale

1 Like

Hi @dale, I am trying to get a custom plugin but receiving null with both plugin name and plugin Guid, What may be the reason? Custom plugin is loaded and enabled, Also I can use commands of it inside Rhino. Do I need to do some configurations on the custom plugin to get it from another plugin? thanks

Hi @tahirhan,

This sample project demonstrates this functionality. Perhaps it helps?


– Dale

1 Like

Thanks! I will look into it

Is this COM visibility thing true for Grasshopper plugins too?
I tried to make a docking panel with Eto.Forms.Panel in rhino, point to it from Grasshopper and update controls, like changing a Label text or reading values from a TextBox. I got a “get returned null” error.

I referenced the rhino plugin dll and found it with the PlugIn.Find(). The Panel is a public property of the rhino plugin. Panel is showing. Perhaps I just need to correctly find that instance

Hey @Will_Wang - this has nothing to do with the topic. Can you move this question to a new topic? You might want to include the code to a sample project that isn’t working the way you want.

– Dale