[Closed] IWorkingPivot Interface C# SDK
So I have found a little problem…
I would like to access to the IIWorkingPivot interface:
Autodesk.Max.IIWorkingPivot
The only way I found is this:
IGlobal.IWorkingPivot.Marshal(IntPtr handle)
But in this case how do I get the (IntPtr handle) part? What handle does this thing needs exactly?
Or is there another way to access?
Thanks in advance!
class WorkingPivot
{
private static readonly IGlobal Global = GlobalInterface.Instance;
private static readonly IInterface_ID IWorkingPivotInterfaceID = Global.Interface_ID.Create(0x6ea64179, 0x233915fd);
public static IIWorkingPivot Get()
{
var marshaller = Wrappers.CustomMarshalerIWorkingPivot.GetInstance(string.Empty);
return (IIWorkingPivot)marshaller.MarshalNativeToManaged((Global.GetCOREInterface(IWorkingPivotInterfaceID) as Wrappers.FPInterface).INativeObject__NativePointer);
}
}
Jesus! I would never though of that. How long did it take until you figure this out? 😮
Thank You anyway for the really quick help!
The max dialect of C# can be quite verbose when compared to C++, yeah. You learn as you go out of pure neccessity… and next time you will know what to use when casts don’t work
Same here, although I feel pretty dumb sometimes when using the C# SDK. In many cases you have almost everything that is necessary to make what you want, but this part is really a black hole in my knowledge and of course it’s not documented at all. I think I have to dive a little deeper in the Wrapper namespace, especially because you can jump into unmanaged code.