用C#可以定义一个有返回值的LISP函数吗?
用C#可以定义一个有返回值的LISP函数吗?就和正常的LISP函数一样用的那种。public static void ssss(ResultBuffer rbArgs)
{
if (rbArgs != null)
{
Int16 strVal1 = 0;
Int16 strVal2 = 0;
int nCnt = 0;
foreach (TypedValue rb in rbArgs)
{
if (rb.TypeCode == (int)Autodesk.AutoCAD.Runtime.LispDataType.Int16)
{
switch (nCnt)
{
case 0:
strVal1 = (Int16)rb.Value;
break;
case 1:
strVal2 = (Int16)rb.Value;
break;
}
nCnt = nCnt + 1;
}
}
Application.DocumentManager.MdiActiveDocument.Editor.
WriteMessage("\nName: " + (strVal1 + strVal2).ToString());
}
}
页:
[1]