[Closed] How to launch utilities?
How do I launch a utility from Utility Panel from within Maxscript?
ie.
A button, you push it, and it takes you to utilities panel and runs the Collapse utility – or any other utility that is installed.
Launch a utility is even run script that contains this utility.
You can do it (for example) with this function:
function run_script name = ( file = openFile ( (GetDir #scripts) + name ) mode:"r" -- open in read mode if( file != undefined ) then -- opened, so exist ( fileIn( (GetDir #scripts) + name ) -- run script ) else ( messagebox ( "Missing file: " + name ) title:"Error!" ) close file )
It will run ‘name’ script from max scripts directory, ie.
run_script “Collapse.ms”
Yes but this works only with MaxScript utilities.
I want to launch one of the Utilities in the utilities list in utilities Panel – either built in or from a plugin in a .dlo file
I think this is what you’re after:
UtilityPanel.OpenUtility collapse
search the maxscript help for a list of utilities:
UtilityPanel Interface
I’m not sure how to execute the utillity though. If all you want to do is collapse it, perhaps this line will suffice:
macros.run “Modifier Stack” “Convert_to_Mesh”
You would probably have to use the Windows Structure to Automate the pressing of the button. There is no direct access to Collapse so you must use the Windows Structure to do the pressing etc for you.
-Eric
Thanks for help all
I’m of talking to the utility developer – maybe he can expose it to MaxScript