Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6013

RhinoScript from EXCEL with Option Base 1

$
0
0

@bkassel wrote:

Working on a project in which RhinoScript is being called from with an EXCEL spreadsheet. For example to create a line from 0,0,0 to 1,0,0 the code would be:

'WARNING!!
'Base 1 commented out because it wreaks havoc with the calls to Rhino
'Option Base 1
Option Explicit


Function makeSomething()
Dim Rhino, RhinoScript As Object
Set Rhino = CreateObject("Rhino5x64.Interface")
Set RhinoScript = Rhino.GetScriptObject()
Dim arrLine
arrLine = RhinoScript.AddLine(Array(0, 0, 0), Array(1, 0, 0))

End Function

This code works. However when Option Base is set to 1, the error message, "This array is fixed or temporarily locked" is issued. The problem is the person in charge has a disdain for using arrays and counters beginning with 0. Is there a workaround that will allow the calls to Rhino to work in an environment where the base subscript of an array is set to 1?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6013

Trending Articles