(vl-acad-defun 'lsptest1)
(defun lsptest1 (str)
(list str "this is a test" "open the door" "sucess!" )
)
C#
public static void Test()
{
var db = HostApplicationServices.WorkingDatabase;
var doc = Application.DocumentManager.GetDocument(db);
var ed = doc.Editor;
//ResultBuffer rb = new ResultBuffer();
ResultBuffer rb1 = new ResultBuffer
{
new TypedValue((int)LispDataType.Text, "lsptest1"),
new TypedValue((int)LispDataType.Text, "this is a test too")
};
try
{
//var rb = InvokeArx.CallLispFunction(rb1);
var rb = Application.Invoke(rb1);
ed.WriteMessage("\n now is exporting what u need:" + rb.ToString());
}
catch(Autodesk.AutoCAD.Runtime.Exception ex)
{
ed.WriteMessage(ex.Message);
}