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
 Simple GetN example

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
OriginConfused Posted - 05/24/2016 : 2:45:02 PM
Hello,

Sorry to post such a simple question but I've been unable to find the answer after some searching.

I'm trying to create a simple dialog box that takes in some input from a user in order to create a plot from an active workbook. The problem is that the filename variable is not being set properly, instead of creating a file with the user input it instead prints "--", indicating that the variable name isn't truly being set.

For example, if I set fileName to "file 1" in the pop up dialog box, the name displayed in the project explorer simply appears as "--".

My code is shown below



// First, declare the variables to be used:

double freq;
string fileName$;
int xcol , ycol;
 
// Use GetN dialog to collect user data:
getn
(Frequency) freq
(File Name) fileName$
(X Column) xcol
(Y Column) ycol
(Display Name);

plotxy iy:=col($(ycol)) plot:=200 ogl:=[<new template:=singTemp name:= $(fileName$)>]





Any help is much appreciatged!
2   L A T E S T    R E P L I E S    (Newest First)
OriginConfused Posted - 05/24/2016 : 5:57:52 PM
Yup that works great

Thanks for the help
Hideo Fujii Posted - 05/24/2016 : 5:35:20 PM
Hi OriginConfused,

The GetN command should be okay, but the way referencing the graph name in plotxy should be like:
plotxy iy:=col($(ycol)) plot:=200  ogl:=[<new name:="%(fileName$)">];
Hope this helps.

--Hideo Fujii
OriginLab

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