04-24-2017 04:15 AM
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
Solved! Go to Solution.
04-24-2017 07:11 AM
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
04-24-2017 03:49 PM
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
04-25-2017 03:14 AM
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.
04-25-2017 08:42 AM
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
04-26-2017 01:25 AM