Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:macroscriptsetup [2012/05/10]
mitch
developer:macroscriptsetup [2012/12/09] (current)
mitch [Linking to external scripts]
Line 15: Line 15:
  
 =====Linking to external scripts===== =====Linking to external scripts=====
-To set up an external scripts folder:  Find a logical place to create your folder.   This may either in the Rhino/system folder or some other common place Open the Options dialog, and navigate to the Files tab.  In the “file search paths” box, click the new button and then the little … button and browse to the location of the scripts folder, then click OK.  Exit the options dialog.  Rhino will now go looking for scripts in this folder.+To set up an external scripts folder:  Find a logical place to create your folder.   //Take care in choosing this folder, make sure that the user has permissions to access it// Open the Options dialog, and navigate to the Files tab.  In the “file search paths” box, click the new button and then the little … button and browse to the location of the scripts folder, then click OK.  Exit the options dialog.  Rhino will now go looking for scripts in this folder.  
 + 
 +Currently Python does not read this section, so if you use Python scripts you will also need to do a similar operation inside the Python script editor : open the editor with **EditPythonScript** and go to Tools>Options and enter the path to your folder in "Module Search Paths".
  
 To link your button or alias to an external script:  The syntax used will depend on the type of script.  If it is a simple text file with normal Rhino commands (like a long macro), you will need to use the command **ReadCommandFile** **//Filename.txt//**  Substitute the name of your text file for //Filename.txt//.  Paste that string into the left or right button box and you’re good to go.  To run a [[developer:rhinoscript|RhinoScript]] .rvb file use the command **LoadScript** **//Filename.rvb//** instead.  In general, that’s all you need to do, but some scripts are written to run immediately on load, others are not, so some script tweaking may be necessary. To link your button or alias to an external script:  The syntax used will depend on the type of script.  If it is a simple text file with normal Rhino commands (like a long macro), you will need to use the command **ReadCommandFile** **//Filename.txt//**  Substitute the name of your text file for //Filename.txt//.  Paste that string into the left or right button box and you’re good to go.  To run a [[developer:rhinoscript|RhinoScript]] .rvb file use the command **LoadScript** **//Filename.rvb//** instead.  In general, that’s all you need to do, but some scripts are written to run immediately on load, others are not, so some script tweaking may be necessary.
developer/macroscriptsetup.1336665480.txt.gz · Last modified: 2012/12/09 (external edit)