Site Tools


Differences

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

Link to this comparison view

developer:scriptsamples:loadingtoolbars [2015/09/14]
127.0.0.1 external edit
developer:scriptsamples:loadingtoolbars [2016/01/12] (current)
sandy
Line 3: Line 3:
 > **Summary:​** //​Demonstrates how to load a toolbar when Rhino starts.// > **Summary:​** //​Demonstrates how to load a toolbar when Rhino starts.//
  
-=====Quesion=====+=====Question=====
 I am in the early stages of creating an installer that will add a small custom toolbar in Rhino. How do I make Rhino autoload a toolbar collection file upon startup? Note, I am not a plug-in developer, so I hope there is a scripting option. I am in the early stages of creating an installer that will add a small custom toolbar in Rhino. How do I make Rhino autoload a toolbar collection file upon startup? Note, I am not a plug-in developer, so I hope there is a scripting option.
  
 =====Answer===== =====Answer=====
  
-Since you do not have a plug-in to control the loading of your toolbar, then you are going to have to add either a startup command or a startup [[developer:​rhinoscript|RhinoScript]]. My guess is that it is probably ​easier to run a [[developer:​rhinoscript|RhinoScript]].+Since you do not have a plug-in to control the loading of your toolbar, then you have to add either a startup command or a startup [[developer:​rhinoscript|RhinoScript]]. My guess is that it is easier to run a [[developer:​rhinoscript|RhinoScript]].
  
-The following [[developer:​rhinoscript|RhinoScript]] file will load a specified toolbar collection and a toolbar. If this script is added to RhinoScript'​s list of startup scripts, it will load a toolbar collection and toolbar when Rhino starts. To have this script load your toolbar collection and toolbar, you will have to edit the script and replace my strings with yours in the "TODO" ​portion of the script.+The following [[developer:​rhinoscript|RhinoScript]] file loads a specified toolbar collection and a toolbar. If this script is added to RhinoScript'​s list of startup scripts, it will load a toolbar collection and toolbar when Rhino starts. To have this script load your toolbar collection and toolbar, you have to edit the script and replace my strings with yours in the //TODO// portion of the script.
  
 <code vb> <code vb>
Line 51: Line 51:
 </​code>​ </​code>​
  
-[[developer:​rhinoscript|RhinoScript]] stores ​it'​s ​list of startup commands in the following registry key:+[[developer:​rhinoscript|RhinoScript]] stores ​its list of startup commands in the following registry key:
  
 <​code>​ <​code>​
Line 57: Line 57:
 </​code>​ </​code>​
  
-Each startup file is a REG_SZ key value with the name of "File<​num>​" ​and a value which is the full path to the script file. The following is an example of that this might look like if [[developer:​rhinoscript|RhinoScript]] ​was configured to load two files at startup:+Each startup file is a REG_SZ key value with the name //File<​num>​// and a value which is the full path to the script file. The following is an example of that this might look like if [[developer:​rhinoscript|RhinoScript]] ​is configured to load two files at startup:
  
 {{:​legacy:​en:​rsloadtoolbar.png}} {{:​legacy:​en:​rsloadtoolbar.png}}
developer/scriptsamples/loadingtoolbars.txt ยท Last modified: 2016/01/12 by sandy