[Tips] Why zcedGetArgs do not work when passing a list?http://www.zwsoft.com/forum/viewthread.php?tid=2738
When you define a lisp with ZRX and pass a list as argument, sometimes you will find zcedGetArgs don't return a expected resbuf list. This is because when passing a list with 3 numbers as argument, ZWCAD+ will treat it as a RT3DPOINT. Following is a sample to show how to handle this situation:
[i][size=1] struct resbuf * rb = NULL;[/size][/i]
[i][size=1] rb = zcedGetArgs ();
if (!rb || (RT3DPOINT != rb->restype) || rb->rbnext)
{
return RTERROR;
}
double d1 = rb->resval.rpoint[0];
double d2 = rb->resval.rpoint[1];
double d3 = rb->resval.rpoint[2];
[/size][/i]pmf_zwcad2013-05-16 17:38:34