zcq586567 发表于 2014-10-7 03:34:00

C# 写的lisp函数调用时出错,怎么回事?


      static public void sorghum()
      {
            Editor ed = Autodesk..ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            ed.WriteMessage("ggg");
      }
出错性息如下:
System.ArgumentException: 绑定到目标方法时出错。
   在 System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo
method, Boolean throwOnBindFailure)
   在 Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object
commandObject, Boolean bLispFunction)
   在
Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo
mi, Object commandObject, Boolean bLispFunction)
   在 Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.InvokeLisp(); 错误: ADS
请求错误

ivde 发表于 2014-10-7 13:36:00


需要ResultBuffer参数
static public void sorghum (ResultBuffer arg)
页: [1]
查看完整版本: C# 写的lisp函数调用时出错,怎么回事?