PDA

View Full Version : ExportOBJ command is not working in Modeler application.



vijay
11-11-2013, 06:58 AM
Hi, I want to export obj file from Modeler application to a predefined path. Below is the code I tried. Lookup is giving "0". Could you please tell what I have done wrong. I need to export OBJ file to predefind path from inside my plugin.
DynaValue argv;
md.local = local;
md.cmderror = CSERR_NONE;
md.opsel = OPSEL_GLOBAL;


argv.type = DY_STRING;
argv.str.buf = "D:\\arrow.obj";
argv.str.bufLen = 0;



LOOKUP("ExportOBJ");
EXECUTE( 1, &argv );

////////////////////////////////////////////
static LWCommandCode ccode;
static ModData md;
#define LOOKUP(cmd) if (!ccode) ccode = md.local->lookup(md.local->data, cmd)
#define EXECUTE(ac,av) \
md.cmderror = md.local->execute(md.local->data, ccode, ac, av, \
md.opsel, &md.result)
#define OK (md.cmderror == CSERR_NONE)
///////////////////////////////////////////////////////////////////////////
--Vijay