一个简单的C++代码,可以生成tecplot的脚本文件,打开文件就能自动绘图。绘图过程是先把文件导入,然后镜像,最后生成一个动画,但是导入的文件名称要求是有规律的。
1 /* 2 ** This program is used to create macro command file 3 ** execute the file to draw picture automatically 4 */ 5 #include <iostream> 6 #include <fstream> 7 8 using namespace std; 9 10 int main() 11 { 12 cout << "Hello world!" << endl; 13 ofstream fcout; 14 fcout.open("macro_new.mcr"); 15 string file_name_num; 16 cout<<"enter the file name number:"<<endl; 17 cin>>file_name_num; 18 cout<<"enter end file number:"<<endl; 19 int first_file_number(10002); 20 int zero_file_number (10000); 21 int end_file_number(10052