Spat the dummy ... yuk !
System.ArgumentException: Error binding to target method.
at System.Delegate.CreateDelegate(Type type, Object firstArgument,
MethodInfo method, Boolean throwOnBindFailure)
at System.Delegate.CreateDelegate(Type type, Object firstArgument,
MethodInfo method)
at AcMgCommandClass.InvokeWorker(AcMgCommandClass* , MethodInfo mi,
Object
commandObject, Boolean bLispFunction)
at AcMgCommandClass.InvokeWorkerWithExceptionFilter(AcMgCommandClass* ,
MethodInfo mi, Object commandObject, Boolean bLispFunction)
"Tony Tanzillo" wrote in message
news:5542210@discussion.autodesk.com...
Thanks Kerry.
Try this one:
[LispFunction("test")]
public static bool lisptest(ResultBuffer args)
{
return true;
}
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
"Kerry Brown" wrote in message
news:5542145@discussion.autodesk.com...
This works for me Tony ..
Haven't tried ResBuff stuff though
(setq xxx (ConcatStrings "1" "2" "3"))
;;-> "123"
using your source ..
// Define Command
[LispFunction("ConcatStrings")]
static public string ConcatStrings(ResultBuffer args)
{
StringBuilder sb = new StringBuilder();
foreach (TypedValue rb in args)
{
if (rb.Value is string)
sb.Append((string)rb.Value);
}
return sb.ToString();
}
"Tony Tanzillo" wrote in message
news:5542126@discussion.autodesk.com...
Can someone else confirm that code that
uses [LispFunction()] is completely broken
in AutoCAD 2008, and that you cannot call
LISP functions defined in managed code?
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com