Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

GUI Progress not updating... because (Not Responding)

GUI Progress not updating... because (Not Responding)

blakestone
Collaborator Collaborator
444 Views
3 Replies
Message 1 of 4

GUI Progress not updating... because (Not Responding)

blakestone
Collaborator
Collaborator
I have used the Progress in a number of MAXScript GUI windows and it updates successfully however many times when executing a script the GUI window sits there showing (Not Responding) rather than update the GUI such as the Progress or updating Label etc.

The script has not failed and just does not update the GUI due to the (Not Responding).

In the below example you can see it gets about 10% in then shows (Not Responding) and then finishes. Any ideas?

--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
445 Views
3 Replies
Replies (3)
Message 2 of 4

barigazy
Enthusiast
Enthusiast
See all links of these CGTalk thread
0 Likes
Message 3 of 4

blakestone
Collaborator
Collaborator
Fixed, Thanks... for those who want the code:


fn DisableProcessWindowsGhosting = (
if classof (dotnet.GetType "DisableWindowsGhosting") != dotNetObject do (
local source = StringStream ("using System.Runtime.InteropServices; public class DisableWindowsGhosting{ public static extern bool DisableProcessWindowsGhosting();}")

compilerParams = dotnetobject "System.CodeDom.Compiler.CompilerParameters"
compilerParams.ReferencedAssemblies.Add("System.dll");
compilerParams.GenerateInMemory = on
csharpProvider = dotnetobject "Microsoft.CSharp.CSharpCodeProvider"
compilerResults = csharpProvider.CompileAssemblyFromSource compilerParams #(source as String)
flush source
close source
if (compilerResults.Errors.Count > 0 ) then (
local errs = stringstream ""
for i = 0 to (compilerResults.Errors.Count-1) do (
local err = compilerResults.Errors.Item
format "Error:% Line:% Column:% %\n" err.ErrorNumber err.Line err.Column err.ErrorText to:errs
)
format "%\n" errs
undefined
)
else (
compilerResults.CompiledAssembly.CreateInstance "DisableWindowsGhosting"
)
)
)

DisableProcessWindowsGhosting()
--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
Message 4 of 4

barigazy
Enthusiast
Enthusiast
That code you must save as *.ms and place it in maxroot/scripts/startup directory
0 Likes