Hey, I’m trying to get a GraphicsWindow using the .net max SDK. The problem is that when I try to get the active viewport it crashes:
'Method not found: ‘Autodesk.Max.IViewExp Autodesk.Max.IInterface.get_ActiveViewExp()’
This is the code:
IGlobal global = Autodesk.Max.GlobalInterface.Instance;
IViewExp activeViewport = global.COREInterface.ActiveViewExp;
IGraphicsWindow gWindow = activeViewport.Gw;
So it crashes at global.COREInterface.ActiveViewExp but I don’t understand why… ‘Method not found’, does that mean it doesn’t exist in the .net SDK?
I’m not sure if this matters but my code isn’t a plugin yet, just a custom user control loaded in max. Like this:
dotnet.loadAssembly "C:\\...path...\\TestApp.dll"
local m_TestClass = dotNetObject "TestApp.UserControl1"
m_TestClass.TestThisStuff()
Thanks in advance,
Vin