Forgot password?

Create an account!

Forum

« back

RhinoScript – missing Sqr() function?!

Messages

Please log in to write a message.

  • 3. Robert Hekkenberg (Apr 09, 2009 15.05):

    Hi all,

    I'm running into a similar problem with the "float required" topic.
    I'm driving Rhino through Rhinoscript via VBA and Excel and out of the blue when I tell Rhinoscript to add a cylinder using a variable, defined as double, to tell it the right diameter it refuses telling me "float required". If I change my double-type variable with a numerical value, all works just fine. I run into similar issues for some other shapes.

    I am baffled, over the last years I have made hundreds, if not thousands, of scripted commands like this for all sorts of shapes, but this has never gone wrong before and all my other scripts within the same project still run just fine. Is it possible I accidentally changed a setting in VB or something??

    Thanks for any advice you can give me.

    Robert

  • 2. Hanno (Aug 14, 2008 11.56):

    Hmm... could it be, that your parameters are out of range (like trying to calculate sqr of a negative value or acos of a value > 1)?

  • 1. ledisnomad (Aug 13, 2008 19.57):

    I get an error message when I run my script that says "Invalid procedure call or argument: 'Sqr'. I have a similar problem with 'Acos' when I get a type mismatch error, "float" required. I'm passing it a double. Any thoughts?

Recommend

Why are these buttons gray?