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
 export ASCii into txt file

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
tony_lincoln Posted - 09/09/2006 : 11:29:51 PM
Dear friends,
After the curve fitting, I need to output fitting result (the parameters like NLSF.p1) into one txt file. But there is no demo codes on http://www.originlab.com/index.aspx?s=8&lm=243.
Where can I find some demo codes? Thansk.
Tony
7   L A T E S T    R E P L I E S    (Newest First)
tony_lincoln Posted - 09/11/2006 : 12:34:33 PM
Now it's clear. Thank you, Mike.
Tony
Mike Buess Posted - 09/11/2006 : 12:09:31 PM
Hi Tony,

Origin window naming conventions predate Origin C by quite a while. In general, special characters are allowed in graph window names but not in worksheet window names. In particular, the underscore '_' is not allowed in a worksheet name in order prevent two underscores from appearing in a dataset name... wksName_colName. Note there are also limitations on the length of window names...

http://www.originlab.com/www/support/resultstech.aspx?ID=282&language=English

Mike Buess
Origin WebRing Member
tony_lincoln Posted - 09/11/2006 : 10:51:04 AM
Sorry one more question: why are "_" and "-" not allowed in the page name? Is this a bug in the Origin C?
Tony
tony_lincoln Posted - 09/11/2006 : 10:48:29 AM
Hi Deanna,

Thanks for the quick reply. I did not find the method Rename() yesterday, today it works very well.
The character '_' is not allowed in the worksheet name, but IT IS allowed in the graph name! I wonder why. Either worksheet or graph is page... The following is my codes:

string strTemp = getBaseName(txtFileFullName[i]);
strTemp.Replace("cut_normalizedCell_ ", "Graph_");
gpg.Rename(strTemp);
printf("Graph's name: %s\n", gpg.GetName());

The output is: Graph's name: Graph_118_Exo70

Thanks.
Tony
Deanna Posted - 09/10/2006 : 11:37:57 PM
Hi Tony. To rename a page (graph page or worksheet page), the following code should work.


void rename_a_worksheet()
{
Page wp("Data1");

if ( !wp.IsValid())
return;

wp.Rename("TonyDataA");


}



The character '_' is not allowed in the page name, please do not use it.

If you want to know all methods for every class, please refer to the header files that correspond to the classes. You might find out which header file to look for with the Programming Help File. For instance, the class of WorksheetPage is in Project.h.

Deanna
OriginLab GZ Office
tony_lincoln Posted - 09/10/2006 : 10:32:49 PM
Hi Mike,

Thanks for your info. Its helpful. You are right, I need to import A LOT OF files, fit each file and save all parameters to ASCII file.

But I am sorry to say, that I still have two questions here:

How to set the graph name in Origin as "Tony_curveA" instead of "Graph1"?
GraphPage gpg = Project.GraphPages("GraphJuntao1");
The above sentence can not rename the graph.

Is there any API to show all methods of every class? Like Java API? e.g. I would like to find all methods of class worksheet, but if I type worksheet in Origin Help, I can not find all methods. So, how to rename the worksheet name from "data1" to "Tony_dataA"? What is the method name?

The renaming of worksheet and graphs is important if you have a lot of curves --- I need to find the correspondence. Thanks in advance!

Tony
Mike Buess Posted - 09/10/2006 : 07:50:12 AM
Hi Tony,

There is no example for that. The easiest way would be copy the results you want to a worksheet and use ExportASCII in the Worksheet class to export the worksheet to file.

You haven't spelled out your overall goal but I gather it is to import several files, fit each file and save all parameters to ASCII file. Before putting a lot of effort into that you should probably check out the MultiFit on the File Exchange. It fits multiple datasets and combines all parameters to a single worksheet.

Mike Buess
Origin WebRing Member

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