This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
fr:rhino:macroscriptsetup [2020/08/14] 127.0.0.1 external edit |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== This page explains how to set up and run macros and scripts in Rhino ====== | ||
- | |||
- | =====Creating a button or alias for your macro or script===== | ||
- | The simplest way to save and run your macro is from a toolbar button or alias. | ||
- | |||
- | =====Use the macro editor to work out new macros===== | ||
- | The MacroEditor command opens a text editing window in which you can type macros and try them out without the need to edit a button every time. The run button on the lower edge of the editor runs the macro, of if there is selected text, it runs the selected text. When it all runs to your satisfaction, | ||
- | |||
- | {{: | ||
- | |||
- | =====Paste your macro or script into the button or alias===== | ||
- | Now, there are two ways to approach associating the macro or script to your button or alias. | ||
- | |||
- | The paste-in-button (or alias) method is fine for macros of Rhino commands and shorter, smaller scripts, but it gets a bit unwieldy to edit if there is a great deal of text. For larger scripts, some people like to place them externally in a folder with a “link” so that Rhino can find them. Both toolbar buttons and aliases can link to external scripts. One advantage of this system is that all scripts are located in one spot so you can easily find and update them. The problem here is that if you copy your button or workspace for use somewhere else, you have to remember to bring the script(s) with it. | ||
- | |||
- | =====Linking to external scripts===== | ||
- | To set up an external scripts folder: | ||
- | |||
- | To link your button or alias to an external script: | ||
- | |||
- | ===Button editor showing pasted in macro and link to external script=== | ||
- | {{: | ||
- | |||
- | You can also paste an entire [[developer: | ||
- | |||
- | ! -_Runscript ( | ||
- | |||
- | Paste in | ||
- | your entire | ||
- | script here | ||
- | |||
- | ) | ||
- | |||
- | ===Button editor showing pasted in complete Rhinoscript=== | ||
- | {{: | ||
- | |||
- | |||