DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog Box

Solved!
Go to solution
Hello, I have a script that visualizes the results with several report types,
and . So, i need to create a dialog box that asks each time the type of report we
are going to use in the script, how can I do it? Thank you!
Regards
0 Kudos
Message 1 of 6
(2,931 Views)

Hello,

I wrote this script attached below but it displays the error : error while opening the file Rpport.TDR, any ideas?? i really need help 

Thank you 

0 Kudos
Message 2 of 6
(2,895 Views)

Hi emma,

 

One thing that jumps out at me about your code is this If - Then statement...

If Ucase(sResponse) > 0 Then

I think what you mean to have is

If Len(sResponse) > 0 Then

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 6
(2,877 Views)
I am analyzing curves, and according to the number of these curves i choose an
adequat report, for example when I analyze three curves I use a report of three
curves, and when I analyze cins curves I use another report of Five curves and so
on,That's why in my script I need to ask for the number of curves in order to
import the adequat report. So I need a script that initially asks you how many
curves you work with,then according to this number import the appropriate report
(all the reports are in a same directory)
Regards.
0 Kudos
Message 4 of 6
(2,868 Views)
Solution
Accepted by topic author emma69

Hi emma,

 

That sounds fine, but the function UCase() turns a string of mixed case into a string of all upper case:

UCase("String")  ==>  "STRING"

The Len() function will return the number of characters:

Len("String")  ==>  6

If you want to cast the typed in value to a number, you can use CDbl() or val()

CDbl("5")  ==>  5
val("5")  ==>  5

By the way, there are other options rather than having a separate TDR file for each number of curves.  I'm not saying that approach is wrong, but if you start to get tired or frustrated with it, know that there are other methods you can use to deal with a variable number of curves.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 6
(2,858 Views)
Thank you, Regards
0 Kudos
Message 6 of 6
(2,846 Views)