Rhino evaluation and limitations to external access

Hello,
I recently downloaded the evaluation version of Rhino 7.0, and eventually got round to trying to automate it with my copy of Microsoft VIsual Studio 2023 Community edition.

I found I could create the reference to Rhino using “Set objRhino = CreateObject(“Rhino.Application”)” and this obviously works because it starts an instance of Rhino.

When I try to create the Rhino Script object however (with “GetScriptObject”) all I get is a “Member no found” error. I know I am creating the COM objects correctly and have done the same with Microsoft Excel and Adobe Photoshop with no problem.

Can anyone tell me please if this is a limitation in the evaluation version of Rhino 7.0?

Thanks!

Moved to Developer category.

Hello John,

Thanks for your reply, will I get notifications about responses from the new location?

Yours,

Michael Scott

Yes.
Parking the message thread in the right category just gets it in front of the people that know about those tools.

Hi @Michael28,

What are you trying to access Rhino/RhinoScript from? Excel? Your own application? What language?

Thanks,

– Dale

That’s great, thanks again John. I have had a little experience with scripting, but I am not a great expert. Hopefully, I will benefit from someone else’s greater knowledge.

Yours,

Michael Scott

Hello Dale,

Thanks very much for responding to my question. I am trying to access Rhino from within a Windows Forms Application using VB in Visual Studio 2023.

What I meant to say was that I have already managed to access both Excel and Photoshop the same way, so I don’t think I am doing anything wrong. I just keep getting the error message “Member not found” when it comes to creating the script object in Rhino, which I don’t understand.

It seems like quite a simple thing to do, and I just wondered whether it is maybe a limitation in the Evaluation version of Rhino rather than a mistake of mine.

Thanks again,

Michael28

Hi @Michael28,

The RhinoScript COM objects comes from a Rhino plug-in, not from Rhino itself. So you won’t get auto-complete to work automatically like some of the other components you can early bind. For auto-complete, I recommend referencing the RhinoScript type libarary.

C:\Program Files\Rhino 7\Plug-ins\RhinoScript.tlb

For “better” access, you might consider trying Rhino.Inside.

– Dale

Hello Dale,

Thanks very much again for your responses to my query. I will try what you suggested and attempt to reference the Plugin dll in Visual Studio 2023.

The problem I am having is not with the Auto-complete though, but when running the code that creates the Rhino Application object, which is really a simple little bit of VB.

I have successfully created the Application object but can’t get the “GetScriptObject” method to work on it, I just get the “Member not found” error when I try. I also get this error if I try to change the “Visible” property for the Rhino Application Object to True.

I know the “CreateObject” method has worked because it starts an instance of Rhino which I have verified by looking at the processes in Task Manager, where an instance of Rhino appears although it remains invisible.

By the way, I am using the methods suggested on the Rhino “External Access” web page: https://developer.rhino3d.com/api/rhinoscript/introduction/external_access.htm, all of which will produce the Rhino Application object but no more than that as far as I have found.

Thanks again,

Michael28

Hi @Michael28,

Here is a simple example of using Rhino.Inside in a Visual Basic console applicaition.

TestMichaelInside.zip (8.1 KB)

In the long run, you’ll find this method faster and more robust than COM.

– Dale

Hello Dale,

Thanks very much again for all your help Dale! I will now get on with installing Rhino.Inside and see if I can make this work for myself.

Yours,

Michael28

All you need is Rhino…

– Dale

Thanks Dale, you’ve been very helpful.
I think I am finally getting there, I had to click on “Manage Nuget Packages” in Solution Explorer and update my Rhino.Inside for some reason. But I have something to get on with now.

Yours,

Michael28