ScriptSpot

Forum topic · General Scripting

LoadScheme with path?

By general_knox · 2011-09-12

Description

macros.run "Customize User Interface" "LoadScheme"

This opens up the the explorer so the user can choose what ui to load...how can I place a path-->

(C:\01_DaveTools\DaveMaxPrefsDB\DaveTools\Sept12_2011d\DaveToolsUI.ui")

into the above line so that the explorer window doesnt open at all and just directly chooses the file "DaveToolsUI.ui?

Im making 2 buttons on my toolbar: 1 button that loads the default 3dsmax scheme, and another button that will always load my custom-setup scheme...this way I can swap quickly between the two setups.

Thanks :)

Comments (3)

Thanks for loadCUIScheme

Anubis · 2011-09-17

Yeah, demn loadCUIScheme function is used inside "UI\macroscripts\Macro_UIScheme.mcr" but still stay undocumented in the help file. May come in use, thanks!

No probs

general_knox · 2011-09-17

Cool, too bad its not documented because it can save a bit of hassle switching between different user setups at work.

I found out how to do it!

general_knox · 2011-09-17

Ok, for those who'd like to have a button that points to a specific UI Scheme (this can be cool if someone comes on your computer at work with a different Scheme Setup than you and you want to quickly revert to the default Max shortcuts/UI without pop-ups or manually browsing for the file in explorer):

**(just replace the path to the one you want)
------------------------------------------------------------------
MacroScript DaveTools_LoadDefaultScheme
enabledIn:#("max", "viz", "vizr")
category:"DaveTools"
tooltip:"Load Default Max UI Scheme"
ButtonText:"Load Default Max UI Scheme..."
SilentErrors:(Debug != True)
(
on execute do
(
local DirectorySeed = getdir(#UI)+"\\DefaultUI.ui"
EscapeEnable=false

UIScheme_Filename = "C:\\01_DaveTools\\DaveMaxPrefsDB\\Default_Max\\Default_MaxStartUI_2011.cui" --insert your own file path here!
loadCUIScheme UIScheme_Filename

EscapeEnabled = true
)

)