Notifications
Clear all

[Closed] How to avoid restarting Max for script update

Hello everybody,

I’m a new Maxscript user. I’m wondering if there is some way to avoid having to restart Max to let the changes to scripts take effect.

Thanks in advance

Cheers

13 Replies

You don’t have to restart max. You just have to re-evaluate the script. (or am I missing something fundamental?)

There are lots of script types in Max (MacroScripts, scripted utilities, scripted plugins etc.)
All of them are evaluated and run immediately. I have never had to restart Max to get a script running, although in some cases it is a good idea after a long development and before final testing to do so to make sure no stray global variable declarations are causing something to work that is actually broken

But you will have to explain in a bit more detail what type of script you are writing and why you are under the impression you have to restart Max. In fact, not having to restart Max is one of the greatest advantages of MAXScript over C++ plugins!

Hi,

thanks for helping.

You’re right. I’m working on a button macroscript. Everytime I make some change, even evaluating the code, when I click on the button it still keeps the old code version.
The only solution to this has been restarting Max.
I’ve tried to look for something on internet but I didn’t found anything

Hope to have been more clear

Thanks again,

Cheers.

Are you closing/reopening the dialog?

Well,

with this macroscript I’m creating a floater and populating it with 2 rollouts.

To test the code I obviously close the dialog and then click again on the button to open it again and test the new changes

Thanks,

Cheers.

That is really quite strange…AFAIK, all MacroScripts only need to reevaluate to use the new code. Have you tried deleting the 3dsmax.ini? That’s always the first thing I do, when something strange happens…

(C:\Documents and Settings\Username\Local Settings\Application Data\Autodesk\3dsmax”Version#” – 32bit\enu)

Thanks,

anyway, at the moment Iìm not at work so I can’t try. Tomorrow al try what you suggested and I’ll tell you if it works or not

Cheers.

My guess is you have variables that aren’t being removed, or you aren’t properly destorying the dialog to remove it, and its variables, from memory.

-Eric

 ILS

All you have to do is re run the script again
go to MAXScript –> Run Script … choose the script again and the floaters should be updated
if you already have a floater open while doing this close and reopen it again. works for me.

Page 1 / 2