quote:
Originally posted by j@y
Hi everyone,
To be able to import a file, I need to run.LoadOC(Originlab\FileImport.c, 16); in Command Window. Is it possible in general to execute a Command Window's expression from the C code? Something like LabTalk's LT_execute()?
Many thanks for your help!
The run.loadoc() is really annoying. Two solutions as far as I can see:
1. Create a toolbar (or ogs file...), when click a button on the toolbar, first run.loadoc(originlab\fileimport.c, 16), then run.loadoc(your_source_code, 16), and finally invoke your function....
2. Take int ImportASCII() for example,
first, typedef int (*FIMPORTASCII)(Page &pgTarget, TreeNode &trFilter, LPCSTR lpcszFile, int nFile);
then
Function fn = Project.FindFunction("ImportASCII", GetAppPath(TRUE) + "OriginC\\OriginLab\\FileImport.c");
FIMPORTASCII pf = fn;
pf(....);
See the example of Project::FindFunction().
妾+ 午旦 妹罕妾 妾伊 用仇 妾/ 岫ㄞ
妾京用 仍巨 件 侈 件戶' 甘岫平 /欠 白岫妹
併 艮 岫 奈 白 岫
岫