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 for Programming
 Forum for Origin C
 ascimp and import ascii

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
nicoc Posted - 04/12/2005 : 11:35:53 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
eparent Posted - 04/14/2005 : 11:09:10 AM
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;



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