Author |
Topic  |
|
BrOsCoRe
Germany
9 Posts |
Posted - 06/28/2015 : 12:20:21 PM
|
Hi Forum,
I wrote a script code that at first import .dat files, then it converts them into a XYZ-Matrix but this code dont convert all importet .dat files, just one. Every .dat File is opened in a new Workbook. After the files where converted to a Matrix i want them all the put in a 3D diagramm and export this graphs into a jpg file. Is there a way somebody could write a code like this or maybe a part of the code. This would be really great because i tried it allready for 7 days.
Greetings from Germany, Bro. |
|
jasonzhao
China
262 Posts |
Posted - 06/28/2015 : 9:17:55 PM
|
Hello,
You may need to send the .dat file to us to check (e-mail: tech@originlab.com), and what do you mean by XYZ-Matrix, does it mean you have 3 columns and you want to interpolate them into a n*n matrix? Besides, which version of Origin you are using?
Best regards! Jason OriginLab Technical Service |
 |
|
BrOsCoRe
Germany
9 Posts |
Posted - 06/29/2015 : 11:39:55 AM
|
Version: Origin 8.5.0G SR1
Hi jasonzhao,
I cant send you some Files but i can write down my code for you. I think all you need to know is that the files filled with X,Y and Z coordinates. Code: [Main] win -cd %H; newbook template:=XYZ sheet:=1 optioin:=lsname;
string path$ = "Y:\Daten\Komma";
cd path$; findFiles ext:=B*.dat; impAsc;
xyz_renka 3 20 20; worksheet -p 242 cmap;
expGraph filename:="..." type:=jpg path:="Y:\Daten\Bilder\Komma" tr.Margin:=2 tr1.Unit:=2 tr1.Width:=600 tr2.TIF.DotsPerInch:=300 tr2.TIF.Compression:=LZW;
This code works in the most parts but i dont know how the code convert all imported .dat Files into a Graph and how to name the exportfile like the Worksheet. So if i import 123.dat the exported jjpg file should have the name 123.jpg I thought that it maybe would be better if i load one file, convert it and export it and then load the next. Kind of loop. But there i dont know how to do. If you know please help me and sorry for my bad english :D
Bro.
|
Edited by - BrOsCoRe on 06/29/2015 1:53:16 PM |
 |
|
jasonzhao
China
262 Posts |
|
|
Topic  |
|