嗨,史蒂夫,我们通常使用Minitab以手动方式分析结果。
对于重复性任务,我使用了宏语言。
但是,它的编程能力相当有限,它的语法非常“上一代”。
我简要介绍了通过它的COM接口自动化Minitab。
我当然可以调整Minitab提供的示例以在VEE中运行。
但是,魔鬼是详细的(即,你正在尝试做什么,是否有足够的命令/语法/对象支持?)。
所以也许以下内容足以让你入门.//实例化Minitab // SET pApp = CreateObject(“MTB.application”); SET pProj = pApp.ActiveProject; //使UI可见//但关闭diplay警报
因此它不会弹出对话框pApp.userInterface.visible = TRUE; pApp.userInterface.displayAlerts = false; //打开projectpApp.Open(“。MPJ”); SET pProj = pApp.ActiveProject; //运行一些命令pProj.ExecuteCommand
(“RANDOM 30 C1 - C2”); pProj.ExecuteCommand(“REGRESS C1 1 C2”); //导入工作表,例如
csv //查看会话命令窗口以获取相关的syntaxpProj.ExecuteCommand(WOpen“.csv”; FType; CSV; VNames;第1行;数据;前5; DecSep;句点;字段;逗号; TDelimiter; DoubleQuote。); /
/设置对新创建的工作表的引用,以便您可以使用itSET pWS = pProj.ActiveWorksheet执行操作;我希望这足以让您启动并运行...如果您需要更多信息或我可以提供更多帮助,请随时回复。
..白兰地
以上来自于谷歌翻译
以下为原文
Hi Steve,
We typically use Minitab to analyze results in a manual fashion. For repetitive tasks, I have used the macro language. However, it is fairly limited in terms of its programmatic capability and it's syntax is quite 'last generation'. I have briefly looked into automating Minitab via it's COM interface. I can certainly adapt the Minitab supplied examples to run in VEE. However, the devil is in the detail (i.e. is there sufficient command/syntax/object support for what you are trying to do?). So maybe the following will be sufficient to get you started.
// To instantiate Minitab
//
SET pApp=CreateObject("MTB.application");
SET pProj=pApp.ActiveProject;
// Make UI visible
// but turn off diplay alerts so it wont pop dialogs
pApp.userInterface.visible=TRUE;
pApp.userInterface.displayAlerts=false;
// To open a project
pApp.Open(".MPJ");
SET pProj=pApp.ActiveProject;
// Run some commands
pProj.ExecuteCommand("RANDOM 30 C1 - C2");
pProj.ExecuteCommand("REGRESS C1 1 C2");
// Import a worksheet e.g. csv
// Look at session command window to get relevant syntax
pProj.ExecuteCommand(WOpen ".csv"; FType; CSV; VNames; Row 1; Data; First 5; DecSep; Period; Field; Comma; TDelimiter; DoubleQuote.);
// Set reference to newly created worksheet so you can do things with it
SET pWS=pProj.ActiveWorksheet;
I hope this is enough to get you up and running... Feel free to respond if you need more info or if I can help more...
BR
Andy
嗨,史蒂夫,我们通常使用Minitab以手动方式分析结果。
对于重复性任务,我使用了宏语言。
但是,它的编程能力相当有限,它的语法非常“上一代”。
我简要介绍了通过它的COM接口自动化Minitab。
我当然可以调整Minitab提供的示例以在VEE中运行。
但是,魔鬼是详细的(即,你正在尝试做什么,是否有足够的命令/语法/对象支持?)。
所以也许以下内容足以让你入门.//实例化Minitab // SET pApp = CreateObject(“MTB.application”); SET pProj = pApp.ActiveProject; //使UI可见//但关闭diplay警报
因此它不会弹出对话框pApp.userInterface.visible = TRUE; pApp.userInterface.displayAlerts = false; //打开projectpApp.Open(“。MPJ”); SET pProj = pApp.ActiveProject; //运行一些命令pProj.ExecuteCommand
(“RANDOM 30 C1 - C2”); pProj.ExecuteCommand(“REGRESS C1 1 C2”); //导入工作表,例如
csv //查看会话命令窗口以获取相关的syntaxpProj.ExecuteCommand(WOpen“.csv”; FType; CSV; VNames;第1行;数据;前5; DecSep;句点;字段;逗号; TDelimiter; DoubleQuote。); /
/设置对新创建的工作表的引用,以便您可以使用itSET pWS = pProj.ActiveWorksheet执行操作;我希望这足以让您启动并运行...如果您需要更多信息或我可以提供更多帮助,请随时回复。
..白兰地
以上来自于谷歌翻译
以下为原文
Hi Steve,
We typically use Minitab to analyze results in a manual fashion. For repetitive tasks, I have used the macro language. However, it is fairly limited in terms of its programmatic capability and it's syntax is quite 'last generation'. I have briefly looked into automating Minitab via it's COM interface. I can certainly adapt the Minitab supplied examples to run in VEE. However, the devil is in the detail (i.e. is there sufficient command/syntax/object support for what you are trying to do?). So maybe the following will be sufficient to get you started.
// To instantiate Minitab
//
SET pApp=CreateObject("MTB.application");
SET pProj=pApp.ActiveProject;
// Make UI visible
// but turn off diplay alerts so it wont pop dialogs
pApp.userInterface.visible=TRUE;
pApp.userInterface.displayAlerts=false;
// To open a project
pApp.Open(".MPJ");
SET pProj=pApp.ActiveProject;
// Run some commands
pProj.ExecuteCommand("RANDOM 30 C1 - C2");
pProj.ExecuteCommand("REGRESS C1 1 C2");
// Import a worksheet e.g. csv
// Look at session command window to get relevant syntax
pProj.ExecuteCommand(WOpen ".csv"; FType; CSV; VNames; Row 1; Data; First 5; DecSep; Period; Field; Comma; TDelimiter; DoubleQuote.);
// Set reference to newly created worksheet so you can do things with it
SET pWS=pProj.ActiveWorksheet;
I hope this is enough to get you up and running... Feel free to respond if you need more info or if I can help more...
BR
Andy
举报