The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Loading Files and Plot

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ESD Michi Posted - 11/10/2006 : 07:50:47 AM
Origin Version 7.5G (Select Help-->About Origin):
Operating System:Win2000

We want to create a skript that offers a Window to choose a Datafile (csv).
This Datafile shall be loaded an the Data shall be plotted.
The relevant Data starts at row 109. (in this row the Names of the columns are saved)
From row 110 on, the measuring Data starts.
the Data for the x-axis is in the third column (after the 2nd comma), the Data for the y-axis is in the fourth column (after the third comma)

There should be the possibility to add further Datafiles which are also plotted in the same Diagram.

We are not sure how to realize this in Origin.
We would be very thankful for help.

Kind Regards, Juergen
2   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 11/12/2006 : 01:51:54 AM
You can also try an Origin C function like this which imports and plots all files selected in the dialog at the start. If you need to add curves from an existing worksheet use the Plot Setup or Layer Contents dialog.
void ImportTest()
{
StringArray sa;
int nFiles = GetMultiOpenBox(sa,"*.csv");
if( !nFiles ) return;

ASCIMP ascimp;
ascimp.iHeaderLines = 109;
ascimp.iDelimited = 1;
ascimp.iDelimiter = ASCIMP_DELIM_COMMA;
ascimp.iMode = ASCIMP_MODE_APPEND_COLS;
ascimp.iRenameWks = 0;
ascimp.iRenameCols = 0;
ascimp.iPartial = 1;
ascimp.iPartialC1 = 2;
ascimp.iPartialC2 = 3;
ascimp.iPartialR1 = 0;
ascimp.iPartialR2 = -1;

Worksheet wks;
wks.Create();
for(int i=0; i<nFiles; i++)
{
string sFileName = GetFileName(sa[i], true);
wks.ImportASCII(sa[i], ascimp);
wks.Columns(2*i).SetType(OKDATAOBJ_DESIGNATION_X);
wks.Columns(2*i).SetLabel(sFileName);
wks.Columns(2*i + 1).SetLabel(sFileName);
}
wks.ShowLabels();

GraphPage gp;
gp.Create();
GraphLayer gl = gp.Layers();
gl.AddPlot(wks,IDM_PLOT_LINE); // IDM_PLOT_SCATTER, IDM_PLOT_LINESYMB, ... (see OPlotIDs.h)
gl.Rescale();
}


Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/12/2006 02:06:25 AM
zachary_origin Posted - 11/11/2006 : 02:15:45 AM
What you need is Import Wiard (do not know what is it in German). You can save it as a filter for further use. This link may do some helps.

Zachary
OriginLab Technical Services.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000