LoadMyToolbarAtStartup script

Does this page need updating: http://wiki.mcneel.com/developer/scriptsamples/loadingtoolbars

I can not get my rvb file to run from startup.


If I manually add my startup script path to the key then rhino.StartupScriptCount = 0

Alternatively, if I use rhino.AddStartupScript then rhino.StartupScriptCount = 1


With inno setup is there a way to make the next Key > Name incremental so I am not overwriting someone else’s startup script ?

Or does this not matter as all startup scripts should be deleted after their first use - Call Rhino.DeleteStartupScript(Rhino.LastLoadedScriptFile)

Yea that script was written for Rhino, which used .TB files. Rhino 5 uses .RUI files. Thus, many of RhinoScript’s Toolbar methods don’t work, as the functions don’t apply to the new toolbar system.

If you want to load a .RUI file and display a toolbar from RhinoScript, you can do something like this:

Sub LoadToolbarAtStartup
	Dim strFile, strFileId, strAlias, strToolbar
	strFile = "C:\Users\Dale\Desktop\MyStuff.rui"
	strAlias = "MyStuff"
	strToolbar = "Test"
	If Rhino.IsToolbarCollection(strFile) = False Then
		strFileId = Rhino.OpenToolbarCollection(strFile)
		If Not IsNull(strFileId) Then
			Call Rhino.Command("_-Toolbar _Group " & strAlias & " _Show " & strToolbar & " _Yes _Enter _Enter") 
		End If
	End If
End Sub