qqwwwee 发表于 2007-3-13 16:34:00

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, &amp;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>

logitechlike 发表于 2010-8-23 19:31:00

list = acutBuildList(RTSTR, "myfun", 0); <br/>改为list = acutBuildList(RTSTR, _T("myfun"), 0); <br/>即可<br/>
页: [1]
查看完整版本: The function acedInvoke can not work