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
 Import Multiple 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
ben_at_work Posted - 08/31/2006 : 08:10:33 AM
Origin Version (Select Help-->About Origin): 70
Operating System: Windows 2000

Hello folks.

I need help with programming in OriginC. I have experiences in C++ and didn't know such
frustrations before starting with OriginC.
But perhaps I am just too bullheaded and it is too recessed for me.

At first I wanted to automate the button "ImportMultipleASCII" for importing many, many
sdl-files. After hours of trial and error with my knowledge of C, I searched in the web
and found a good-looking code in the forum here. But it does not work in my Origin
Version.
Perhaps someone could help me. I would be so pleased!

Here is the code I found:

void importfolder(){
string strPath = "C:\\"; // change to your data path

StringArray saFiles;
FindFiles(saFiles, strPath, "asc");
if( saFiles.GetSize() < 1 )
return;

ASCIMP ascimp;
AscImpReadFileStruct(strPath + saFiles[0], &ascimp);

Worksheet wks = Project.ActiveLayer();

wks.ImportASCII(strPath + saFiles[0], ascimp);

ascimp.iMode = ASCIMP_MODE_APPEND_COLS;
ascimp.iPartial = ASCIMP_PARTIAL_YES;
ascimp.iPartialC1 = 1;
ascimp.iPartialC2 = 1;

for(int i = 1; i < saFiles.GetSize(); i++ )
wks.ImportASCII(strPath + saFiles[i], ascimp);
}

In my Version StringArray, FindFiles and ImportASCII does not exist.
I tried to substitute them, but I failed...
Do you have a hint for me?

Sincerely,
Ben
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 08/31/2006 : 08:48:35 AM
Please see my reply to your duplicate topic in the Origin C forum...
http://www.originlab.com/forum/topic.asp?TOPIC_ID=5061

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/31/2006 08:51:38 AM

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