The function acedInvoke can not work
<p>I defined myfun as following in lisp:<br/>(defun myfun() (* 2 180))<br/><br/>And the function works right in command state.<br/>command:(myfun)<br/>360<br/><br/>But when I spawn the function in ARX,it's can not work.<br/>Here is my code:<br/>+++++++++++++++++++++++++++++++++++++++++<br/>struct resbuf *result = NULL, *list; <br/>list = acutBuildList(RTSTR, "myfun", 0); <br/>if (list != NULL)<br/>{ <br/>int stat = acedInvoke(list, &result); <br/>if (stat == RTERROR) <br/>acdbFail(L"Cannot run \n"); <br/>acutRelRb(list); <br/>}<br/>if (result != NULL) <br/>{<br/>// Do somthing<br/>acutRelRb(result);<br/>}<br/>else <br/>AfxMessageBox(L"NULL");<br/>+++++++++++++++++++++++++++++++++++++++++++<br/>The result show "Cannot run " and result == NULL.<br/><br/><br/>Please help me. </p> list = acutBuildList(RTSTR, "myfun", 0); <br/>改为list = acutBuildList(RTSTR, _T("myfun"), 0); <br/>即可<br/>
页:
[1]