3dsMax .net plugin can't port 'pickObject' from maxscript to c#


Hello, I have a native C # .net plugin for 3ds. At one point there is a user selection “Pick Target Surface”. In Max Script the code for this is simple:

fn g_filter o =
if o!=somethin then
superclassof o == Geometryclass

target_mesh = pickObject message: “Pick Target Surface” forceListenerFocus:false filter:g_filter


In C # it seems to be much more complicated (IPickObjectProc?) Does anyone have an example code?


… I have now worked my way into the API, for everyone who is interested:

This is probably only possible with a CommandMode .:
MyCommandMode mode = new MyCommandMode ();
ip.PushCommandMode (mode);