ManagedService, how to disable when not running in 3dsmax.


Hi, i am creating a tool for 3dsmax with C#
To communicate with max, i use ManagedService.dll

For example when i click on a button this code shows a message in max :
MaxscriptSDK.ExecuteMaxscriptCommand("format "Hello Max!

This works fine when i use my tool used inside Max.
But when i launch my tool outside Max and i click on that button i get an error :
“An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in PresentationCore.dll”

My Question is :
How can i detect that my tool is currently inside Max ?
I tryed to use Try()Catch() but that throw also the error.

Thank you very much;)


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.