Type mismatch 'GetObjects'

I’m using this plugin and, suddenly, I get the error message:

Type Mismatch: ‘GetObjects’
Line: 70
Char: 1

These are the three places where I call GetObjects()

Dim crvs
crvs = Rhino.GetObjects("Select curves: ", 4) <--line 72
If isArray(crvs) Then


'Reduce the previous object selection to points.
arrObjects = Rhino.GetObjects(, 1,, True)

DiagGrid = Rhino.GetObjects("Select grid of diagonals to project onto hull: ", 4)


The first one is on line 72, which is closest to the line 70 specified in the error message

image

“GetObjects” comes from RhinoScript, so if you have an “import rhinoscriptsyntax as rs” or something at the top, it’s called by “rs.GetObjects.”

Thx, Jim.

I figured my age was showing. These plugins were written when I was a much younger man.

Time to hunt down a bunch of calls to GetObjects.

Oh wait you’re using VBScript, sorry I was thinking of Python.

Yeah it should be Rhino.GetObjects? Is a typo further up screwing it up? It seems to work here.

Hi @cestes001,

Do you still have the script code? From which the plug-in was made?

What version of Rhino are you running?

– Dale

No, it’s VbScript. I’ve included the three instances of GetObjects() in order to see if anyone can see where the difficulty arises.

This plugin has been around for years, running in R4 and R5. I took it offfline for several years and, recently, decided to reinstate my website and make it available again.

The error, to me, seems to be saying that one of my two parameters is bogus, but I’ve checked the RhinoScript help file and they seem to be right.

Yes, I have the code. Those three instances are from that code. It used to run in R4 and R5, which adds to the mystery. This error turns up in R5.

Well the mismatch in line numbers hints that there may be a typo somewhere further up just royally screwing up how it’s interpreting things. If I simply copy and paste what you posted it works.

I just went back into the archives and used a .rhp from 2014 that was used for years, without error. When I installed it, I got the same error.

We need more context here, your isolated sample doesn’t demonstrate the problem. At this point I would guess it actually has nothing to do with the GetObjects operation itself.

Oddly, running the function from the RhinoScript editor does not yield the error. However, compiling that code and running the compiled version does.

I’m going to investigate further.

Thx for the help