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?
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.
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.
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.
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.
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.