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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 ascimp and import ascii
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

nicoc

Japan
Posts

Posted - 04/12/2005 :  11:35:53 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version 7 pro
Operating System:XP

I can not import an ascii file like:
headerline1
headerline2
VG ID
VG Vbg=-1V
4.0000e+000 1.091693e-007
8.000000e+000 2.268225e-008
1.200000e+001 1.227754e-008

...
ascimp.iHeaderLines =4;
wks.SetASCIMP(ascimp);
wks.ImportASCII(cpath,ascimp);
It doesn't seem to be related directly to ascimp, but if I remove the
4 header lines and set the nb to 0, then the datas are well imported.
Also, if I keep the 4 header lines but if the 1st line of nbs start with more easy nbs (ex: 1 tab 2), it works fine!!!
Is there something I missed somewhere?
Thanks,
nicolas

eparent

118 Posts

Posted - 04/14/2005 :  11:09:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Nicolas,

Set some more fields in the ASCIMP structure.
For us here the following settings worked with your file:

ASCIMP ai;
ai.iDelimited = 1;
ai.iDelimiter = ASCIMP_DELIM_SPACE;
ai.iHeaderLines = 4;
ai.iNumColumns = 2;


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000