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
 LabTalk Forum
 ASCII import data reduction

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
tinkusch Posted - 04/09/2006 : 1:41:11 PM
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: XP German

Hi

when I want to import lenghty ascii files into a worksheet with the import assistant I have the option to skip every nth line in order to reduce the amount of data e.g. if the source file is very long (4000 rows or so im my case).

Is it possible to set this option with a Labtalk command?
I did not find a hint in the help files!

Thanks & bye

Stefan

3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 04/12/2006 : 5:39:34 PM
Hi Stefan,

1) It is possible to import with filters from LabTalk although it will require help from Origin C. See this topic for an example...
http://www.originlab.com/forum/topic.asp?TOPIC_ID=3216

2) You can also decimate the full worksheet as explained here...
http://www.nmrtools.com/labtalk/i_decimate.html

Mike Buess
Origin WebRing Member
tinkusch Posted - 04/12/2006 : 4:12:59 PM
Hi Mike,

thanks for your help. I decided to go an other way because I need to use an automatic routine, i.e. a Labtalk script. I just import the whole stuff and then work with the draft mode (Entwurfsmode) of the graphic display in order to reduce the amount of displayed datapoints. That does the job for the moment.
The ORIGIN people should, however, think of including a skip command into the ascii import features of LabTalk. That would be useful.

Thanks & bye

Stefan

Mike Buess Posted - 04/09/2006 : 2:46:12 PM
Hi Stefan,

The Import Wizard is controlled by Origin C and I don't believe there is a corresponding ASCII Import property. If you save an import filter from the IW you can change skip value in the filter using an Origin C function like the one below. The new skip value will then be used the next time you use the filter. (strFilter is the name of the filter file without the OIF extension and I've assumed that you saved the file to your User Files path.)

void Set_Skip_Value(string strFilter, int newSkip)
{
string strFile = GetAppPath() + "Filters\\" + strFilter + ".oif";
Tree trFilter(strFile,0);
trFilter.ASCIMP.iSkipRows.nVal = newSkip;
trFilter.Save(strFile);
}

Mike Buess
Origin WebRing Member

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