Forgot password?

Create an account!

Forum

« back

RhinoScript – How to include code from another .rvb?

Messages

Please log in to write a message.

  • 2. Hanno (Jun 25, 2010 09.30):

    Hi,

    as long as you do not reinitialize the script engine or restart Rhino, all scripts you have run stay in memory. So you can pack all your useful functions into one script and simply run it once to be able to use your functions from within other scripts (that's what we call a libaray). You do not need any reference between the scripts.
    To make it even more convenient, you can put your most important libraries into the "scripts to run when rhino starts", so they are loaded automatically.

    The include function from the Rhino.rvb does basically the same thing (loading a script and running it once through ExecuteGlobal. By using this function, your script can explicitly require a certain library.


    Hope that helps!

    Hanno

  • 1. mrgordon (Jun 25, 2010 00.07):

    Hi, I want to split up my rhinoscript. It's currently all in one file but it would be far preferable to pull bits of functionality into other files that I could then include in my main script. Is this possible? I saw in the help file for Rhino.rvb that it mentioned something about Include but I can't find anything else about it.

    Thanks!

Recommend

Why are these buttons gray?