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
 %() substitution problem in Origin 7.5
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

evanm

Canada
Posts

Posted - 09/08/2004 :  08:12:15 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I just upgraded my Origin to version 7.5 only to find that my old programs that were written in version 7 do not work. This problem seems very simple, I have one line of lab talk that does not work. in Origin 7.0 if you enter the following in the script window you get the name of the first dataset plotted in the active graph layer...
%R = %(%H,@D);
%R=;
Data1_B
which is correct!

Now when I execute these 2 lines in version 7.5 I get:
%R = %(%H,@D);
%R=;
% (%H,@D)

Can anyone please explain why this no longer works and how I can fix it?

I want the name of the first dataset plotted in the first layer of a graph. In origin 7.5 this is conveniently possible using Origin C:
string dsYName = graph.Layers(0).DataPlots(0).GetDatasetName();
However this code is not implemented in version 7.0, and I still want to use the same scripts on computers running this version.

Thank you, Evan.


Mike Buess

USA
3037 Posts

Posted - 09/08/2004 :  09:06:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Evan,

%(n,@D) will give you nth plotted dataset in all versions of Origin. The %(%H, @D) notation is intended for worksheets although it might have also worked for graphs in previous versions.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/08/2004 09:13:12 AM
Go to Top of Page

evanm

Canada
Posts

Posted - 09/08/2004 :  09:12:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike, that works perfectly!

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