I have done this many times with C#, It’s a great way to create nice looking GUIs for lisp. You could do this with PyAcad.NET too, If CC. execute can except/return parameters, Or use a static global variable inside your PyAcad.NET module to hold the buffer , or use a global lisp variable and wrap acedPutSym()and acedGetSym.
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl)]
extern static private int acedPutSym(string args, IntPtr result);
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl)]
extern static private int acedGetSym(string args, out IntPtr result);
static public ResultBuffer AcadGetSym(string varname, ref int stat)
{
IntPtr rb = IntPtr.Zero;
stat = acedGetSym(varname, out rb);
if (rb != IntPtr.Zero)
return (ResultBuffer)DisposableWrapper.Create(typeof(ResultBuffer), rb, true);
return null;
}
static public int AcadPutSym(string varname, ResultBuffer rb)
{
return acedPutSym(varname, rb.UnmanagedObject);
}
Personally, I think using the "static variable" idea would be the best method for modal forms.