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
 LabTalk Forum
 How to set values in "Ascii Import Option"?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tlab

Japan
34 Posts

Posted - 03/19/2003 :  9:59:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
From LabTalk, how to set those values in "ASCII Import Option"? such as "# of column", "skip main header, number of line"?

Thanks.

Gobman

Mike Buess

USA
3037 Posts

Posted - 03/20/2003 :  4:52:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Gobman,

I don't think the ASCII Options can be controlled from LabTalk. Sorry.

Mike Buess
Origin WebRing Member
Go to Top of Page

tlab

Japan
34 Posts

Posted - 03/21/2003 :  07:32:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you anyway. How about OriginC? are there any easy way in OriginC to do so? Thanks.

Gobman.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/21/2003 :  08:47:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Gobman,

Once again, not to my knowledge. A potentially awkward but useful workaround is to create a separate template for each combination of ASCII Options that you will likely need. The awkward part would be remembering which template had which options, but a clever naming convention should take care of that.

Mike Buess
Origin WebRing Member
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 03/21/2003 :  4:37:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In Origin C, Worksheet class has GetASCIMP, SetASCIMP functions. It seems though they were not documented. There is also a utility function AscImpReadFileStruct that will initialize the ASCIMP struct from a given ascii file.

Try this,


 
void turn_of_rename_wks()
{
ASCIMP ascimp;

Worksheet wks = Project.ActiveLayer();

wks.GetASCIMP(ascimp);

out_int("Rename wks =", ascimp.iRenameWKS);

ascimp.iRenameWKS = 0;// turn off wks rename;

wks.SetASCIMP(ascimp);

}




CP


Edited by - cpyang on 03/21/2003 5:03:25 PM
Go to Top of Page

tlab

Japan
34 Posts

Posted - 03/21/2003 :  9:32:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, you two. I will try both methods.

Cheers.

Gobman
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