Global Variable in Progress Bar

I have an existing labview code that is comprised of a main vi, which is the user GUI, and several (approx 70) sub vi's. I am trying to add a progress bar to the front screen (User GUI) that will immediately increment after it hits certain sections of code. I am doing this using a global variable to store the value of the current progress, and then attempting to write to the progress bar on the main screen after each incrementation. Is there a way to link the value of the main progress bar to the global variable so that it updates as soon as the value is incremented? The problem I am facing is that when I update the global variable in a subvi, the progress bar takes the value of the subvi after it is completed, skipping all the numbers in between. I realize this is because I am not correctly writing to the progress bar, but I am unsure how to do so. If this isn't a good method, does anyone have any suggestions?  
For Example:
Main Vi           SubVi1        SubVi2
(1-4)                (5-8)             (8-12)
Progress Bar: 1 2 3 4 8 12
(I did try the Progress Bar Library NI provides, but I need a progress bar on the Front Panel, not a pop up, so I can debug while the code runs)
Thanks- Adam
Solved!
Go to Solution.

I'd go with a Action Engine to update the progress bar VIA vi server referance.  Here's an example using a AE I have for just this type of progress bar.
If you haven't read Ben action engine nugget, it should be required, you can find it here
By constructing a "resource module" (a special AE that holds a referance to the resource to act on)  after initializint the AE you can call any "method" on the resorce from any location in the application instance.  These babys really let you do some interesting things to the GUI from wherever the real actions is taking place.
Jeff
Attachments:
Ex AE Slider.vi ‏15 KB
Progress.vi ‏26 KB
Progress Meth.ctl ‏11 KB

Similar Messages

  • [SOLVED] Almost there just need a global progress bar

    Heya,
    There's no man page for bar so I have looked at the code a bit. I am trying to have a progress bar to copy a folder with many files including symbolic links (unfortunately pycp does not support them yet). With the -s parameter, I can specify the approximate size of what I am copying but it works only if it is a single file.
    I have also tried pv, pipemeter, orphan advcp, ecp, scp and I am now desperate.
    Would someone be kind enough to help me ?
    [tamikana@archlinux ~]$ cat /usr/bin/bar
    #! /bin/sh
    # bar
    # 'cat' with ASCII progress bar
    # (c) Henrik Theiling
    BAR_VERSION=1.4
    # Synopsis:
    # 'bar' works just like 'cat', but shows a progress bar in ASCII art on stderr.
    # The script's main function is meant to be usable in any Bourne shell to be
    # suitable for install scripts without the need for any additional tool.
    # Shell Script Usage: bar [options] [files]
    # Options:
    # -h displays help
    # Examples:
    # Normal pipe:
    # : bar mypack.tar.bz2 | tar xjpf -
    # Individual pipe for each file:
    # : bar -c 'tar xjpf -' mypack1.tar.bz2 mypack2.tar.bz2
    # Individual pipe, using ${bar_file} variable:
    # : bar -c 'echo ${bar_file}: ; gzip -dc | tar tvf -' \
    # : -e .tar.gz \
    # : file1 file2 file3 file4 file5 \
    # : > package-list.txt
    # Programs and shell commands:
    # Required (otherwise this fails):
    # if, then, else, fi, expr, test, cat, eval, exec
    # shell functions
    # test:
    # a = b
    # a -lt b
    # a -gt b
    # a -le b
    # -f a
    # -n a
    # -z a
    # expr:
    # a + b
    # a - b
    # a '*' b
    # a / b
    # a : b
    # Optional (otherwise this does not show the bar):
    # grep, dd, echo, ls, sed, cut
    # ls:
    # must output the file size at fifth position.
    # The command line interface also uses:
    # awk
    ####>-SCHNIPP-<########################################################
    bar_cat()
    # Use this shell function in your own install scripts.
    # Options:
    # Width of the bar (in ten characters). The default is 76 characters.
    test -z "${BAR_WIDTH}" && test -n "${COLUMNS}" && BAR_WIDTH=${COLUMNS}
    # Check syntax:
    ( expr "${BAR_WIDTH}" + 0 >/dev/null 2>&1 ) || BAR_WIDTH=0
    BAR_WIDTH=`expr ${BAR_WIDTH} + 0` || BAR_WIDTH=0
    test "x${BAR_WIDTH}" = x0 && BAR_WIDTH=76
    # Maximal block size to use for dd.
    test -n "${BAR_BS}" || BAR_BS=1048567
    # BEGIN PERC
    # Whether to show a percentage.
    test -n "${BAR_PERC}" || BAR_PERC=1
    # END PERC
    # BEGIN ETA
    # Whether to show estimated time of arrival (ETA).
    test -n "${BAR_ETA}" || BAR_ETA=1
    # END ETA
    # Width of the trace display:
    # BEGIN TRACE
    test -n "${BAR_TRACE_WIDTH}" || BAR_TRACE_WIDTH=10
    # END TRACE
    # The command to execute for every given file. Each file
    # is piped into this command individually. By default, the
    # files are simply dumped to stdout.
    test -n "${BAR_CMD}" || BAR_CMD=cat
    # The characters to be used in the bar
    test -n "${BAR_L}" || BAR_L='['
    test -n "${BAR_R}" || BAR_R=']'
    test -n "${BAR_C0}" || BAR_C0='.'
    test -n "${BAR_C1}" || BAR_C1='='
    # Additional extension to add to each file:
    #BAR_EXT=${BAR_EXT-}
    # Whether to clear bar after termination. Otherwise keep the full bar.
    #BAR_CLEAR=${BAR_CLEAR-0}
    # Unless switched off by user, use the bar by default:
    test -n "${BAR_OK}" || BAR_OK=1
    BAR_WIDTH=`expr ${BAR_WIDTH} - 3`
    bar_trace=''
    # BEGIN TRACE
    if test "x${BAR_TRACE}" = x1
    then
    BAR_WIDTH=`expr ${BAR_WIDTH} - ${BAR_TRACE_WIDTH}`
    bar_lauf=${BAR_TRACE_WIDTH}
    bar_t_space=''
    bar_t_dot=''
    while test "${bar_lauf}" -gt 1
    do
    bar_t_space="${bar_t_space} "
    bar_t_dot="${bar_t_dot}."
    bar_lauf=`expr ${bar_lauf} - 1`
    done
    bar_trace="${bar_t_space} "
    fi
    # END TRACE
    bar_eta=''
    BAR_GET_TIME='echo'
    # BEGIN ETA
    ( expr 1 + ${SECONDS} >/dev/null 2>&1 ) || BAR_ETA=0
    if test "x${BAR_ETA}" = x1
    then
    BAR_GET_TIME='( echo ${SECONDS} )'
    BAR_WIDTH=`expr ${BAR_WIDTH} - 6`
    bar_eta='--:-- '
    fi
    # END ETA
    bar_perc=''
    # BEGIN PERC
    if test "x${BAR_PERC}" = x1
    then
    BAR_WIDTH=`expr ${BAR_WIDTH} - 5`
    bar_perc=' 0% '
    fi
    # END PERC
    BAR_GET_SIZE='( ls -l "${BAR_DIR}${bar_file}${BAR_EXT}" | sed "s@ *@ @g" | cut -d " " -f 5 ) 2>/dev/null'
    # portable?
    # check features:
    ( ( echo a ) >/dev/null 2>&1 ) || BAR_OK=0
    ( ( echo a | dd bs=2 count=2 ) >/dev/null 2>&1 ) || BAR_OK=0
    ( ( echo a | grep a ) >/dev/null 2>&1 ) || BAR_OK=0
    ( ( echo a | sed 's@ *@ @g' ) >/dev/null 2>&1 ) || BAR_OK=0
    ( ( echo a | cut -d ' ' -f 1 ) >/dev/null 2>&1 ) || BAR_OK=0
    # check ranges:
    test "${BAR_WIDTH}" -ge 4 || BAR_OK=0
    BAR_ECHO='echo'
    BAR_E_C1=''
    BAR_E_C2=''
    BAR_E_NL='echo'
    # Does echo accept -n without signalling an error?
    if echo -n abc >/dev/null 2>&1
    then
    BAR_E_C1='-n'
    fi
    # Check how to print a line without newline:
    if ( ( ${BAR_ECHO} "${BAR_E_C1}" abc ; echo 1,2,3 ) | grep n ) >/dev/null 2>&1
    then
    # Try echo \c:
    if ( ( ${BAR_ECHO} 'xyz\c' ; echo 1,2,3 ) | grep c ) >/dev/null 2>&1
    then
    # Try printf:
    if ( ( printf 'ab%s' c ; echo 1,2,3 ) | grep abc ) >/dev/null 2>&1
    then
    BAR_ECHO='printf'
    BAR_E_C1='%s'
    else
    BAR_ECHO=':'
    BAR_E_C1=''
    BAR_E_NL=':'
    BAR_OK=0
    fi
    else
    BAR_E_C1=''
    BAR_E_C2='\c'
    fi
    fi
    # prepare initial bar:
    bar_shown=0
    if test "${BAR_OK}" = 1
    then
    bar_lauf=0
    bar_graph=''
    while test `expr ${bar_lauf} + 5` -le "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph}${BAR_C0}${BAR_C0}${BAR_C0}${BAR_C0}${BAR_C0}"
    bar_lauf=`expr ${bar_lauf} + 5`
    done
    while test "${bar_lauf}" -lt "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph}${BAR_C0}"
    bar_lauf=`expr ${bar_lauf} + 1`
    done
    ${BAR_E_C2}" 1>&2_eta}${bar_perc}${BAR_L}${bar_graph}${BAR_R}
    bar_shown=1
    fi
    # for shifting large numbers so that expr can handle them:
    # Assume we can compute up to 2147483647, thus 9 arbitrary digits.
    # We must be able to do + of two numbers of 9 digits length. Ok.
    # BEGIN LARGE
    ( ( test 1999999998 = `expr 999999999 + 999999999` ) >/dev/null 2>&1 ) || BAR_OK=0
    bar_large_num="........."
    bar_div=""
    # END LARGE
    bar_numsuff=""
    # find size:
    bar_size=0
    if test -n "${BAR_SIZE}"
    then
    bar_size=${BAR_SIZE}
    # BEGIN LARGE
    while expr "${bar_size}" : "${bar_large_num}" >/dev/null 2>&1
    do
    bar_div="${bar_div}."
    bar_numsuff="${bar_numsuff}0"
    bar_size=`expr "${bar_size}" : '\(.*\).$'`
    done
    # END LARGE
    BAR_GET_SIZE="echo '${BAR_SIZE}'"
    else
    for bar_file
    do
    bar_size1=0
    if test -f "${BAR_DIR}${bar_file}${BAR_EXT}"
    then
    bar_size1=`eval "${BAR_GET_SIZE}"`
    # BEGIN LARGE
    # divide and upround by pattern matching:
    if test -n "${bar_div}"
    then
    bar_size1=`expr "${bar_size1}" : '\(.*\)'${bar_div}'$'` || bar_size1=0
    fi
    # adjust if still too large:
    while expr "${bar_size1}" : "${bar_large_num}" >/dev/null 2>&1
    do
    bar_div="${bar_div}."
    bar_numsuff="${bar_numsuff}0"
    bar_size1=`expr "${bar_size1}" : '\(.*\).$'`
    bar_size=`expr "${bar_size}" : '\(.*\).$'` || bar_size=0
    done
    # upround if necessary:
    if test -n "${bar_div}"
    then
    bar_size1=`expr "${bar_size1}" + 1`
    fi
    # END LARGE
    # add to total size:
    bar_size=`expr ${bar_size} + ${bar_size1}`
    # BEGIN LARGE
    # adjust if still too large:
    while expr "${bar_size}" : "${bar_large_num}" >/dev/null 2>&1
    do
    bar_div="${bar_div}."
    bar_numsuff="${bar_numsuff}0"
    bar_size=`expr "${bar_size}" : '\(.*\).$'`
    done
    # END LARGE
    else
    BAR_OK=0
    fi
    done
    fi
    bar_quad=`expr ${BAR_WIDTH} '*' ${BAR_WIDTH}`
    test "${bar_size}" -gt "${bar_quad}" || BAR_OK=0
    if test "${BAR_OK}" = 0
    then
    # For some reason, we cannot display the bar. Thus plain operation:
    for bar_file
    do
    if test "${bar_file}" = "/dev/stdin"
    then
    eval "${BAR_CMD}"
    else
    eval "${BAR_CMD}" < "${BAR_DIR}${bar_file}${BAR_EXT}"
    fi
    done
    else
    # Compute wanted bytes per step:
    bar_want_bps=`expr ${bar_size} + ${BAR_WIDTH}`
    bar_want_bps=`expr ${bar_want_bps} - 1`
    bar_want_bps=`expr ${bar_want_bps} / ${BAR_WIDTH}`
    # Compute block count per step to keep within maximum block size:
    bar_count=1
    if test "${bar_want_bps}" -gt "${BAR_BS}"
    then
    bar_count=`expr ${bar_want_bps} + ${BAR_BS}`
    bar_count=`expr ${bar_count} - 1`
    bar_count=`expr ${bar_count} / ${BAR_BS}`
    fi
    # Compute block size for given count:
    bar_wc=`expr ${BAR_WIDTH} '*' ${bar_count}`
    bar_bs=`expr ${bar_size} + ${bar_wc}`
    bar_bs=`expr ${bar_bs} - 1`
    bar_bs=`expr ${bar_bs} / ${bar_wc}`
    # Compute bs * count, the bytes per step:
    bar_bps=`expr ${bar_bs} '*' ${bar_count}`
    # Compute bytes per hundredth:
    bar_bph=`expr ${bar_size} + 99`
    bar_bph=`expr ${bar_bph} / 100`
    # Run loop:
    bar_pos=0
    bar_graph="${BAR_L}"
    bar_cur_char=0
    bar_t0=`eval "${BAR_GET_TIME}" 2>/dev/null` || bar_t0=0
    for bar_file
    do
    # BEGIN TRACE
    if test "x${BAR_TRACE}" = x1
    then
    bar_trace=`expr "${bar_file}" : '.*/\([^/][^/]*\)$'` || bar_trace="${bar_file}"
    bar_trace=`expr "${bar_trace}${bar_t_space}" : '\('${bar_t_dot}'\)'`
    bar_trace="${bar_trace} "
    fi
    # END TRACE
    # Initial character position in bar for file:
    bar_char=`expr ${bar_pos} / ${bar_want_bps}` || bar_char=0
    while test "${bar_char}" -gt `expr ${bar_cur_char} + 4`
    do
    bar_graph="${bar_graph}${BAR_C1}${BAR_C1}${BAR_C1}${BAR_C1}${BAR_C1}"
    bar_cur_char=`expr ${bar_cur_char} + 5`
    done
    while test "${bar_char}" -gt "${bar_cur_char}"
    do
    bar_graph="${bar_graph}${BAR_C1}"
    bar_cur_char=`expr ${bar_cur_char} + 1`
    done
    # Get file size. This must work now (we checked with test -f before).
    bar_size1=`eval "${BAR_GET_SIZE}" 2>/dev/null` || bar_size1=0
    # BEGIN LARGE
    # Divide and upround by pattern matching:
    if test -n "${bar_div}"
    then
    bar_size1=`expr "${bar_size1}" : '\(.*\)'${bar_div}'$'` || bar_size1=0
    bar_size1=`expr "${bar_size1}" + 1`
    fi
    # END LARGE
    # loop:
    bar_total=0
    exec 6>&1
    exec 5<"${BAR_DIR}${bar_file}${BAR_EXT}"
    while test "${bar_total}" -lt "${bar_size1}"
    do
    dd bs="${bar_bs}" count="${bar_count}${bar_numsuff}" <&5 >&6 2>/dev/null
    bar_total=`expr ${bar_total} + ${bar_bps}`
    if test "${bar_total}" -gt "${bar_size1}"
    then
    bar_total="${bar_size1}"
    fi
    bar_pos1=`expr ${bar_pos} + ${bar_total}`
    bar_proz=`expr ${bar_pos1} / ${bar_bph}` || bar_proz=0
    # BEGIN PERC
    if test "x${BAR_PERC}" = x1
    then
    bar_perc=" ${bar_proz}% "
    bar_perc=`expr "${bar_perc}" : '.*\(.....\)$'`
    fi
    # END PERC
    # BEGIN ETA
    if test "x${BAR_ETA}" = x1
    then
    bar_diff=`eval "${BAR_GET_TIME}" 2>/dev/null` || bar_diff=0
    bar_diff=`expr ${bar_diff} - ${bar_t0} 2>/dev/null` || bar_diff=0
    bar_100p=`expr 100 - ${bar_proz}` || bar_100p=0
    bar_diff=`expr ${bar_diff} '*' ${bar_100p}` || bar_diff=0
    bar_diff=`expr ${bar_diff} + ${bar_proz}` || bar_diff=0
    bar_diff=`expr ${bar_diff} - 1` || bar_diff=0
    bar_diff=`expr ${bar_diff} / ${bar_proz} 2>/dev/null` || bar_diff=0
    if test "${bar_diff}" -gt 0
    then
    bar_t_unit=":"
    if test "${bar_diff}" -gt 2700
    then
    bar_t_uni="h"
    bar_diff=`expr ${bar_diff} / 60`
    fi
    bar_diff_h=`expr ${bar_diff} / 60` || bar_diff_h=0
    if test "${bar_diff_h}" -gt 99
    then
    bar_eta=" ${bar_diff_h}${bar_t_unit} "
    else
    bar_diff_hi=`expr ${bar_diff_h} '*' 60` || bar_diff_hi=0
    bar_diff=`expr ${bar_diff} - ${bar_diff_hi}` || bar_diff=0
    bar_diff=`expr "00${bar_diff}" : '.*\(..\)$'`
    bar_eta=" ${bar_diff_h}${bar_t_unit}${bar_diff} "
    fi
    bar_eta=`expr "${bar_eta}" : '.*\(......\)$'`
    fi
    fi
    # END ETA
    bar_char=`expr ${bar_pos1} / ${bar_want_bps}` || bar_char=0
    while test "${bar_char}" -gt "${bar_cur_char}"
    do
    bar_graph="${bar_graph}${BAR_C1}"
    ${bar_trace}${bar_eta}${bar_perc}${bar_graph}${BAR_E_C2}" 1>&2
    bar_cur_char=`expr ${bar_cur_char} + 1`
    done
    done
    ) | eval "${BAR_CMD}"
    bar_pos=`expr ${bar_pos} + ${bar_size1}`
    done
    # ${BAR_ECHO} "${BAR_E_C1}" "${BAR_R}${BAR_E_C2}" 1>&2
    fi
    if test "${bar_shown}" = 1
    then
    # BEGIN TRACE
    test "x${BAR_TRACE}" = x1 && bar_trace="${bar_t_space} "
    # END TRACE
    # BEGIN ETA
    test "x${BAR_ETA}" = x1 && bar_eta=' '
    # END ETA
    if test "x${BAR_CLEAR}" = x1
    then
    # BEGIN PERC
    test "x${BAR_PERC}" = x1 && bar_perc=' '
    # END PERC
    bar_lauf=0
    bar_graph=''
    while test `expr ${bar_lauf} + 5` -le "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph} "
    bar_lauf=`expr ${bar_lauf} + 5`
    done
    while test "${bar_lauf}" -lt "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph} "
    bar_lauf=`expr ${bar_lauf} + 1`
    done
    ${BAR_E_C2}" 1>&2_eta}${bar_perc} ${bar_graph}
    else
    # BEGIN PERC
    test "x${BAR_PERC}" = x1 && bar_perc='100% '
    # END PERC
    bar_lauf=0
    bar_graph=''
    while test `expr ${bar_lauf} + 5` -le "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph}${BAR_C1}${BAR_C1}${BAR_C1}${BAR_C1}${BAR_C1}"
    bar_lauf=`expr ${bar_lauf} + 5`
    done
    while test "${bar_lauf}" -lt "${BAR_WIDTH}"
    do
    bar_graph="${bar_graph}${BAR_C1}"
    bar_lauf=`expr ${bar_lauf} + 1`
    done
    ${bar_trace}${bar_eta}${bar_perc}${BAR_L}${bar_graph}${BAR_R}${BAR_E_C2}" 1>&2
    ${BAR_E_NL} 1>&2
    fi
    fi
    ####>-SCHNAPP-<########################################################
    BAR_AWK_0=''
    # Command line interface:
    while test -n "$1"
    do
    case "$1" in
    -o|-c|-w|-0|-1|-e|-d|-b|-s|-\[\]|-\[|-\]|-T)
    if test -z "$2"
    then
    echo "$0: Error: A non-empty argument was expected after $1" 1>&2
    fi
    BAR_ARG="$1"
    BAR_OPT="$2"
    shift
    shift
    -o*|-c*|-w*|-0*|-1*|-e*|-d*|-b*|-T*)
    BAR_ARG=`expr "$1" : '\(-.\)'`
    BAR_OPT=`expr "$1" : '-.\(.*\)$'`
    shift
    -h|-n|-p|-D|-D-|-q|-V|-t|-E|-L)
    BAR_ARG="$1"
    BAR_OPT=""
    shift
    --) shift
    break
    -*) echo "$0: Error: Unrecognized option: $1" 1>&2
    exit 1
    break
    esac
    case "${BAR_ARG}" in
    -h) echo 'Usage: bar [-n] [-p] [-q] [-o FILE] [-c CMD] [-s SIZE] [-b SIZE]'
    echo ' [-w WIDTH] [-0/1/[/] CHAR] [-d DIR] [-e EXT] [Files]'
    echo ' bar -V'
    echo ' bar -D'
    echo ' bar -D-'
    echo 'Options:'
    echo ' -h displays help'
    echo ' -o FILE sets output file'
    echo ' -c CMD sets individual execution command'
    echo ' -e EXT append an extension to each file'
    echo ' -d DIR prepend this prefix to each file (a directory must end in /)'
    echo ' -s SIZE expected number of bytes. Use for pipes. This is a hint'
    echo ' only that must be greater or equal to the amount actually'
    echo ' processed. Further, this only works for single files.'
    echo ' -b SIZE maximal block size (bytes) (default: 1048567)'
    echo ' -w WIDTH width in characters (default: terminal width-3 or 76)'
    echo ' -0 CHAR character for empty bar (default: .)'
    echo ' -1 CHAR character for full bar (default: =)'
    echo ' -[ CHAR first character of bar (default: [)'
    echo ' -] CHAR last character of bar (default: ])'
    echo ' -n clears bar after termination'
    echo ' -t traces (=displays) which file is processed'
    echo ' -T WIDTH no of characters reserved for the file display of -t'
    echo ' -p hides percentage'
    echo ' -E hides estimated time display'
    echo ' -q hides the whole bar, be quiet'
    echo ' -D tries to dump the bar_cat() shell function, then exit.'
    echo ' Here, -t, -p, -E remove the corresponding feature completely.'
    echo ' Further, -L removes large file support from the code.'
    echo ' -D- same as -D, but dumps the function body only'
    echo ' -V displays version number'
    echo ' -- end of options: only file names follow'
    exit 0
    -n) BAR_CLEAR=1
    -L) BAR_LARGE=0
    BAR_AWK_0="${BAR_AWK_0} /END *LARGE/ {x=1} ;"
    BAR_AWK_0="${BAR_AWK_0} /BEGIN *LARGE/ {x=0} ;"
    -t) BAR_TRACE=1
    BAR_AWK_0="${BAR_AWK_0} /END *TRACE/ {x=1} ;"
    BAR_AWK_0="${BAR_AWK_0} /BEGIN *TRACE/ {x=0} ;"
    -T) BAR_TRACE_WIDTH="${BAR_OPT}"
    -q) BAR_OK=0
    -p) BAR_PERC=0
    BAR_AWK_0="${BAR_AWK_0} /END *PERC/ {x=1} ;"
    BAR_AWK_0="${BAR_AWK_0} /BEGIN *PERC/ {x=0} ;"
    -E) BAR_ETA=0
    BAR_AWK_0="${BAR_AWK_0} /END *ETA/ {x=1} ;"
    BAR_AWK_0="${BAR_AWK_0} /BEGIN *ETA/ {x=0} ;"
    -V) echo "bar v${BAR_VERSION}"
    exit 0
    -D) echo "BAR_VERSION=${BAR_VERSION}"
    awk "${BAR_AWK_0}"'{sub(/ *#.*$/,"")} ; /^bar_cat/ {x=1} ; {sub(/^ */,"")} ; /./ {if(x)print} ; /^}/ {x=0}' "$0"
    exit 0
    -D-) echo "BAR_VERSION=${BAR_VERSION}"
    awk "${BAR_AWK_0}"'{sub(/ *#.*$/,"")} ; /^}/ {x=0} ; {sub(/^ */,"")} ; /./ {if(x)print} ; /^{/ {x=1}' "$0"
    exit 0
    -o) exec 1>"${BAR_OPT}"
    -c) BAR_CMD="${BAR_OPT}"
    -b) BAR_BS="${BAR_OPT}"
    if BAR_RAW=`expr "${BAR_BS}" : '\(.*\)k$'`
    then
    BAR_BS=`expr ${BAR_RAW} '*' 1024`
    elif BAR_RAW=`expr "${BAR_BS}" : '\(.*\)M$'`
    then
    BAR_BS=`expr ${BAR_RAW} '*' 1048567`
    fi
    -s) BAR_SIZE="${BAR_OPT}"
    if BAR_RAW=`expr "${BAR_SIZE}" : '\(.*\)k$'`
    then
    BAR_SIZE=`expr ${BAR_RAW} '*' 1024`
    elif BAR_RAW=`expr "${BAR_SIZE}" : '\(.*\)M$'`
    then
    BAR_SIZE=`expr ${BAR_RAW} '*' 1048567`
    fi
    if test "$#" -gt 1
    then
    echo "Error: -s cannot be specified for multiple input files." 1>&2
    exit 1
    fi
    -e) BAR_EXT="${BAR_OPT}"
    -d) BAR_DIR="${BAR_OPT}"
    -0) BAR_C0="${BAR_OPT}"
    -1) BAR_C1="${BAR_OPT}"
    -\[) BAR_L="${BAR_OPT}"
    -\]) BAR_R="${BAR_OPT}"
    BAR_L="${BAR_OPT}"
    BAR_R="${BAR_OPT}"
    -w) BAR_WIDTH="${BAR_OPT}"
    esac
    done
    # Invoke main function:
    if test "$#" = 0
    then
    bar_cat /dev/stdin
    else
    bar_cat "$@"
    fi
    EDIT: solved https://bbs.archlinux.org/viewtopic.php … 85#p498885
    It seems like I have not tried every potential packages after all
    Last edited by tamikana (2011-10-30 16:04:46)

    This might help http://www.dwcourse.com/dreamweaver/ten-commandments-spry-menubars.php#one
    Also, if you use DW CS5 click on Live Code and Live View. Then when clicking on the menu items in Live View, watch the changes in classes that occur. This mifgt give you a clue of what to do.
    Cheers,
    Gramps

  • Updating progress bar sent from sub vi

    Hi,
    I have been trying to update a progress bar, but have had no luck.  The progress bar is active when a sub vi is called.  It works fine in the sub vi, but I can't seem to create any kind of reference, output, or anything to get it to update in real time on the main vi.  Here is how the program is structured.  The main program calls a sub vi which reads user inputs.  These user inputs are them sent to an system exec.vi call.  While the system exec is runing, a while loop is executing, which is checking the size of the file that is being created.  The progress bar works fine in the sub vi, but when I wire it up to the main vi, it only shows the final completed status.  I tried creating a global variable, which updates in real time, but it still would not update on the main vi.  I am going crazy trying to figure this out, having spent 8 hours so far on it.  Please help.

    Yes, I appreciate that but I was hoping for something more elegant than the attached.
    Cheers
    Duncan
    Dennis Knutson wrote:
    You do not create an indicator on the reference wire. The reference is not the value. You would simply create an indicator on the wire that is going to the value property.
    Attachments:
    Control Reference.llb ‏30 KB
    Control Reference1.llb ‏30 KB

  • Progress bar in LabView?

    I realized a vi with a global variable integer that increments from 0 to
    1000 and I want to realize a bar that progresses with that variable. is
    there anybody who can tell me how make this thing in labview?
    thanks a lot.

    The problem is that the progress bar can visualizes the values between 0 and
    1000 and I don't know why! Can u help me? I use the global variable in a
    event structure and I don't know how do this!
    Thanks
    "Nicolo" ha scritto nel messaggio
    news:[email protected]..
    > Well, in fact you have progress bar in the menu controls, numeric. You
    > just have to link its terminal to your variable.
    > Nico

  • Director 12 - progress bar

    I need to add a progress bar to the splash screen of a Director 12 .dcr which is hosted on a website.
    The progress bar doesn't have to show the exact time remaining before the main.dcr starts, it just gives the user a rough indication that "loading" is happening.
    I was thinking of using an animated .gif for this, making the .gif visible when the user clicks the Start button, but I don't knon how to do this in Director.
    Is there a standard way to make a loading-in-progress indicator in Director, for a web hosted .dcr?
    Thank you.

    Is this the kind of thing you are looking for?
    -- **Drop this Behavior on your progress bar**
    global gNetmovieID1
    global gCurrentSprite
    global gBarWidth
    global gBarConverter
    global gPercentText -- starts at 0% and ends at 100%
    global gStatList
    global gPercentDone
    on beginSprite me
      tellStreamStatus(TRUE) -- Turns on the stream status!!!
      floatPrecision = 2
      gCurrentSprite = me.spriteNum -- the current sprite "progress bar"
      gBarWidth = (sprite gCurrentSprite).width
      gBarConverter = (float(gBarWidth)) / 100
      gNetmovieID1 = preLoadNetThing("http://www.website.com/filename.dcr?p=" & string(random(1000) ) ) -- preLoads your hosted .dcr file!!!
    end
    on exitFrame me
      if Netdone(gNetmovieID1) = TRUE then
        gPercentText =  "100%"
        PLAY MOVIE ( "http://www.website.com/filename.dcr" ) -- plays your hosted .dcr file!!!
        abort
      else
        -- This checks the download status and updates the "progress bar" and the gPercentText
        gStatList = getStreamStatus(gNetmovieID1)
        if (gStatList.bytesSoFar > 0) then
          gPercentDone = (gStatList.bytesSoFar * 100.0001) / gStatList.bytesTotal
          (sprite gCurrentSprite).width = integer (gPercentDone * gBarConverter)
          gPercentText = string(integer(gPercentDone) & "%")
        else
          (sprite gCurrentSprite).width = 1
          gPercentText =  "0%"
        end if
      end if
    end if

  • Creating progress bar in oracle forms 6i

    Hii
    I have a push-button (pb_submit)
    when when_button_pressed trigger fired...I have a database main procedure to be called.
    inside that procedure i am calling 25 procedures.
    and all 25 Procedures will be executed sequencially.
    I want to use a Progress bar...
    so that user will get to know hw much % completed
    if main procedure(total 25 procedures inside) is completed successfully then progress bar should show 100%
    like wise if 1 procedure completed then 4 %
                 if 2 procedure completed then 8 %
    total 25 procedure completed then 100%
    how to implement this logic.
    and if in between 1 procedure failed then progress bar should stop at that incident.
    and it should start from dat instant only if again that failed procedure run successfully.
    should i post my codes here.ok...here is the codes written in the button(when_button_pressed trigger)
    DECLARE
      l_Last_Record      NUMBER  := 0  ;
      l_Prg_Process_Id    NUMBER     ;
      l_Prg_Process_Id_1  NUMBER     ;
      l_Prg_Id       VARCHAR2(15)  ;
      l_Alert_Result    VARCHAR2(1)   ;
      l_Validation_Msg   VARCHAR2(500) ;
      l_Path        VARCHAR2(240) ;
      File_Name       VARCHAR2(250) ;
      l_file_exists     BOOLEAN       ;
      l_file_len        NUMBER     ;
      l_blocksize       BINARY_INTEGER;
      o_Status       VARCHAR2(1)  ;
      o_User_Selection_Ca1 VARCHAR2(1)  ;
      o_User_Selection_Ca2 VARCHAR2(1)  ;
      o_User_Selection_Ca3 VARCHAR2(1)  ;
      CURSOR C_Validation IS
      SELECT Cpv_Validation_Type     ,
             Cpv_Validation_Input    ,
             Cpv_Validation_Action  ,
             Cpv_Validation_Active_Flag
      FROM   Config_Process_Validation
      WHERE  Cpv_Program_Id = l_Prg_Id
      AND   Nvl(Cpv_Validation_Active_Flag, 'N') = 'Y'
      ORDER BY Cpv_Validation_Sequence;
    BEGIN
    SELECT RV_HIGH_VALUE
    INTO   l_Path
    FROM   CG_REF_CODES
    WHERE  Rv_Domain    = 'DERV_DATA_FILES'
    AND   Rv_Low_Value = 'DRV_FILES';
    Go_Block('Process');
      Last_Record;
      l_Last_Record := :System.Cursor_Record; 
      First_Record;
      FOR i IN 1 .. l_Last_Record
      LOOP
      Go_Record(i);
      l_Prg_Id := :Prog_Id;
      IF NVL(:Process.Cb_Select,'N') = 'Y' THEN
       :Query.Current_Status := 'Current Process: ' || :Process.Prog_Desc;
       Synchronize;
       --Validate if program is already in running mode or already completed
       SELECT NVL(MAX(DECODE(Prg_Status, 'R', 999999999, 'C', Prg_Process_Id)), 0)
       INTO   l_Prg_Process_Id
       FROM   Program_Status,
           Parameter_Master
       WHERE  Prg_Dt      = Pam_Curr_Dt
       AND    Prg_Cmp_Id  = l_Prg_Id
       AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
       AND    Prg_Status  IN ('R', 'C');
       IF l_Prg_Process_Id = 999999999 THEN
         P_Show_Alert(l_Prg_Id||' Process is already running.','A',l_Alert_Result);
        --RAISE Form_Trigger_Failure;
       ELSIF l_Prg_Process_Id > 0 AND :Execution_Flag <> 'M' THEN
        P_Show_Alert(l_Prg_Id||' Process already run. It can not run twice. ','A',l_Alert_Result);
        RAISE Form_Trigger_Failure;
       END IF;
       --Validate mandataory process, process specific validation and message
       FOR i IN C_Validation
       LOOP
        IF i.Cpv_Validation_Type = 'MANDATORY' AND i.Cpv_Validation_Active_Flag = 'Y' THEN
           SELECT Count(1)
           INTO   l_Prg_Process_Id_1
           FROM   Program_Status,
               Parameter_Master
         WHERE  Prg_Dt      = Pam_Curr_Dt
         AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
         AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
         AND    Prg_Status  = 'C'
         AND    Prg_Process_Id IN (SELECT MAX(Prg_Process_Id)
                      FROM   Program_Status,
                          Parameter_Master
                      WHERE  Prg_Dt      = Pam_Curr_Dt
                      AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
                      AND    Prg_Exm_Id  IN ('ALL',:Query.Exchange)
                      AND    Prg_Status  = 'C');
         IF l_Prg_Process_Id_1 = 0 THEN
          P_Show_Alert(i.Cpv_Validation_Input||' Mandatory Process NOT completed successfully.','A',l_Alert_Result);
          RAISE Form_Trigger_Failure;
         END IF;
        ELSIF i.Cpv_Validation_Type = 'MESSAGE' THEN
         P_Show_Alert(i.Cpv_Validation_Input, i.Cpv_Validation_Action, l_Alert_Result);
         IF l_Alert_Result = 'N' THEN
          RAISE Form_Trigger_Failure;
         END IF;
        ELSE   
         --- OTHER PROCESS SPECIFIC VALIDATION
         l_Validation_Msg := Null;
         Pkg_Process_Automation.P_Pre_Process_Validation(l_Prg_Id,
                                 :Query.Exchange,
                                 :Query.Segment,
                                 i.Cpv_Validation_Type,
                                 l_Validation_Msg);
         IF l_Validation_Msg IS NOT NULL THEN
          P_Show_Alert(l_Validation_Msg,i.Cpv_Validation_Action,l_Alert_Result);
          IF l_Alert_Result = 'N' THEN
           RAISE Form_Trigger_Failure;
          END IF;
         END IF;  
        END IF; 
       END LOOP;
       --Validating whether file exists or not
       IF :Process.File_Input_Format IS NOT NULL THEN
        Pkg_Process_Automation.P_Gen_File_Name(:Process.File_Input_Format,
                            :Query.Exchange,
                            :Query.Segment,
                            File_Name);
        Utl_File.FGetAttr(
         location    => l_Path,
         filename    => File_Name,
         fexists     => l_file_exists,
         file_length => l_file_len,
         block_size  => l_blocksize);
        IF NOT l_File_Exists THEN
         --MESSAGE('The file does not exist.');
         P_Show_Alert('The file does not exist.','A',l_Alert_Result);
         RAISE Form_Trigger_Failure;
        END IF;
       END IF;
       Set_Application_Property(Cursor_Style, 'BUSY');
       SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_YELLOW');
       :Process.Status := 'R';
       Synchronize;
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to do Final Settlement Corporate Action ?(Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca1 := l_Alert_Result;
        P_Show_Alert('Enable Round-To-Tick ? (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca2 := l_Alert_Result;
        --P_Show_Alert('Do you want to Rollback ? (Y/N)','I',l_Alert_Result);
        --o_User_Selection_Ca3 := l_Alert_Result;
       END IF;
       ----   Calling of Main Procedure
       Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                          :Query.Exchange,
                          :Query.Segment,
                          :Query.Entity_Id,
                          File_Name,
                          o_User_Selection_Ca1,
                          o_User_Selection_Ca2,
                          o_User_Selection_Ca3,
                          o_Status);
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to Rollback (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca3 := l_Alert_Result;
        Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                            :Query.Exchange,
                            :Query.Segment,
                            :Query.Entity_Id,
                            File_Name,
                            o_User_Selection_Ca1,
                            o_User_Selection_Ca2,
                            o_User_Selection_Ca3,
                            o_Status);
       END IF;                 
       Set_Application_Property(Cursor_Style, 'DEFAULT');                  
       Message(o_Status);
       Message(o_Status);
       IF o_Status = 'Y' THEN
        :Process.Status := 'C';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_GREEN');
       ELSE
        :Process.Status := 'E';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_RED');
       END IF;
       SELECT Prg_Log_File
       INTO   :Process.Log_File
       FROM   Program_Status ,
              Parameter_Master
         WHERE  Prg_cmp_id = l_Prg_Id
         AND    Prg_dt     = Pam_Curr_Dt
          AND   (Prg_Cmp_Id,Prg_Strt_Time)  IN (SELECT   Prg_Cmp_Id,max(Prg_Strt_Time) 
                                   FROM   Program_Status b,
                                                        Parameter_Master
                                                 WHERE  Prg_Cmp_Id =  l_Prg_Id
                                   AND    Prg_Dt     =  Pam_Curr_Dt
                                                  GROUP BY Prg_Cmp_Id);
       Synchronize;
       Set_Application_Property(Cursor_Style, 'DEFAULT');   
      END IF;
    END LOOP;
    :Query.Current_Status := '';
    Synchronize;
    EXCEPTION
      WHEN OTHERS THEN
      :Query.Current_Status := 'Error found';
      Set_Application_Property(Cursor_Style, 'DEFAULT');
      MESSAGE(sqlerrm );
      --MESSAGE(sqlerrm );
      Synchronize;
    END;
    inside p_run_process there are other 25 database procedures.
    help me !!!

    Create a procedure as like,
    PROCEDURE show_progress(x number) IS
    y number;
    BEGIN
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
      set_item_property('PART_DISP',WIDTH,x);
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
    END;
    PART_DISP is a display_item.
    After completion of each procedures call the above procedure like,
    cntr:=cntr+1;
    show_progress(round(cntr/25*287,0));
    synchronize;
    where cntr is a counter it will be incremented 1 to 25, the constant value 287 is the maximum width of PART_DISP (you can change for your need).
    The local variable cntr's initial value is 0 and maximum value is 25.    
    cntr                   part_disp          % of progress
    1
    11.48
    4
    2
    22.96
    8
    3
    34.44
    12
    4
    45.92
    16
    5
    57.4
    20
    6
    68.88
    24
    7
    80.36
    28
    8
    91.84
    32
    9
    103.32
    36
    11
    126.28
    44
    12
    137.76
    48
    13
    149.24
    52
    14
    160.72
    56
    15
    172.2
    60
    16
    183.68
    64
    17
    195.16
    68
    18
    206.64
    72
    19
    218.12
    76
    20
    229.6
    80
    21
    241.08
    84
    22
    252.56
    88
    23
    264.04
    92
    24
    275.52
    96
    25
    287
    100
    Hope this will help.

  • How can I add a Progress bar to show the "render to JPG" progress?

    Hi everyone, I have a button which renders my component to
    JPG.
    How can I attach a progress bar to show the progress of the
    rendering?
    <mx:Button label="render" click="renderasJPEG ()"/>
    public function renderasJPEG( ):void
    convertToImage( component001, new JPEGEncoder( 100));
    private function convertToImage( object:IUICompon ent,
    encoder:IImageEncod er):void
    var base64string: String = ImageSnapshot. encodeImageAsBas
    e64(
    ImageSnapshot. captureImage( object, 72, encoder));
    var variables:URLVariab les = new URLVariables( );
    variables.encoded = base64string;
    variables.type = "jpeg";
    var request:URLRequest = new URLRequest(" script_saveasima
    ge.php");
    request.method = "POST";
    request.data = variables;
    navigateToURL( request, "_blank");
    Thanks in advance.

    Hi,
    I would have thrown a prompt to the user in the renderasJpeg
    function and removed it in last line of convertToImage function.
    Isn't this what you want?
    Hope this helps.

  • Print progress bar slow in Reader 8 and 9

    We have several users who recently began having issues with printing to our Xerox network printers with Reader 8. This is happening with even one-page documents... the print dialog box will appear fine, but after clicking print, it sits at the progress bar and the program seems to hang for a minute + until it's done. Some of the things I've tried include:
    -rebooted printer
    -ran all windows updates
    -upgraded to adobe 9
    -tried several different print drivers (pcl, ps and global)
    -tried all suggestions from knowledge base article:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=333091&sliceId=1
    -toggled all options in advanced print options > font resource policy
    -tested on several different machines, same issue
    -tested with different printers, same issue
    On one machine, I uninstalled Reader 8 and tried version 7, which seemed to work much better.
    I was told this is just a bug related to an update in the newer versions that may be conflicting with our Xerox printer drivers.
    I'm not sure if I want to revert everyone back to version 7, so if anyone has any other suggestions... it would be much appreciated!
    Thanks

    Can you post screen shots of the signature status from Reader 8 and Reader 9 so I can have a clear understanding of what you are experiencing?
    Thanks
    Steve

  • How to store a relative path in a global variable

    Hi,
    I'm using Teststand 2013 and Labview 2013
    Is it possible to define a relative path for a global variable in the Teststand? Ex. "..\vector1.hws"
    Or I should use the Labview functions to solve this issue?
    Thanks,
    Solved!
    Go to Solution.

    Paths are so much easier to manipulate in LabVIEW.  So you could store the relative path as a string and then use LabVIEW to make the absolute path.
    I typically store a folder in a global variable and then I can just concatinate the strings to build the absolute path.  For example:
    FileGlobals.Folder = "C:\\foo\\bar\\",
    Locals.Path = FileGlobals.Folder + "blah.txt"
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Accessing Var from main Nib/Class - [global variables]

    I'm sure this is a simple solution and the problem is I'm just not thinking right. I just started programming in Objective C but have come a long way in the past 2 weeks. Pretty extensive knowledge in C# and some java.
    Anyways, I've been creating an app and have streams working, CFNetwork working, network services discovery working and a tab bar with a custom View controller linking to one of the tab-bar buttons.
    So when you click on one of the tab bar items it opens a new nib file. That nib loads a table view. When nib loads it hits a method which starts looking for network services and updates the table when it finds some.
    Now the idea is is to have a selector on the cell and when you choose the service it adds same variable info, ip and port, back to a global variable which can be used through the entire app and all extra loaded nib files.
    Out of all this, I don't know how to access global variables....prob should be the simplest thing to do out of all I've done. I have ideas of how it should be done but don't know how to access it.
    Idea would be:
    MainWindowNib has NSString var that is public with a getter setter. But how can I access that MainWindowNib var from a SecondView.nib file/class. There a way to get the parent of the secondView.Nib? I have no clue.
    Any help would be great!
    Thanks!

    I'm still a bit confused how you access that method.
    Main.nib class : UIApplication
    NSString *port
    SetupView.nib : NSViewController
    view
    -TableView added to view
    -Seperate NSObject for TableViewDelegates
    -When item selcted, pass NSString to [main port]
    How do I get a pointer to port. I don't really understand how to do this with objective C.
    In C# I would be something like: [Not exact syntax but u get the idea]
    public Main : Form
    public string port{get;set;}
    Main()
    sView SeconddForm = new SecondForm(this);
    public SecondForm : Form
    SecondView(Main main)
    main.Port = "8080";
    Message was edited by: Clarke76
    Message was edited by: Clarke76

  • How to create a progress bar showing status on timeout of TCP Read function

    Is there any way of creating a progress bar showing the status of a 'TCP Read timeout' time ... ?
    I'm sending a data request to an intranet server via TCP Write, and then using TCP Read with a 2 min. timeout to receive the requested data. During this time i want to show the actual progress of the timeout in a progress bar.
    Can this be done?
    And do i have to implement some kind of multitasking to make it happen?
    TIA

    Soulstorm wrote:
    > Is there any way of creating a progress bar showing the status of a
    > 'TCP Read timeout' time ... ?
    >
    > I'm sending a data request to an intranet server via TCP Write, and
    > then using TCP Read with a 2 min. timeout to receive the requested
    > data. During this time i want to show the actual progress of the
    > timeout in a progress bar.
    > Can this be done?
    > And do i have to implement some kind of multitasking to make it
    > happen?
    It can be done and you need to do some multitasking yes, but that is
    quite easy in LabVIEW. A separate loop or subVI with loop will be
    responsible for the progress bar. Set its scale to 0 and the number of
    seconds of your timeout. In parallel to the TCP Read let this loop or VI
    execute reading the time every few
    seconds and calculating the
    difference to its start time, passing this value to the progress bar
    slider. Have an extra boolean global which aborts the loop and set this
    boolean to FALSE before starting the loop/VI and TCP Read and setting it
    to TRUE on return of the TCP Read.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can i use Progress bar in IR Report

    Hi ,
    I have created IR Report based on the View so, it's been taking 10-15 mins of time to execute the IR Report. Here user want to see the Progress bar while executing the IR Report. How can i use Progress bar in IR Report.
    Anybody have idea on Progress bar please help me.
    Regards
    Narender B

    Hi ,
    Thanks for your information.
    I am new to the APEX.*i need to show Progress bar while opening the each page* then user can know some process is happening from the backside and i don't know where i need to add and call the below function.could you please provide the steps for the progress bar.
    In my application there are almost 100 pages are there so, i need to show progress bar on each page while opening .could you please provide Global function to call on each page.
    function html_url_Progress(pThis){ 
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //doSubmit('APPLY_CHANGES');
    redirect(pUrl);
    Regards
    Narender B

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Let me explain a little behind the concept I'm going for.  There are some steps in my sequences that take a relatively long time (15 minutes or so).  During this period, a requirement of mine is to have a progress bar that gets updates every so often such that by the time the step would ordinary complete, the progress bar is at 100%.  Initial attempts involved a separate VI that managed the progress bars, but having yet another window is not the ideal UI design...  Instead, I was hoping to integrate this functionality into the RTOI so that each time a new step begins executing, additional custom data (the expected step duration) is (optionally) sent to the RTOI providing the progress update portion of the RTOI code the necessary data.
    Is there any sample code out there that performs some similar task so that I can get a better feel for how the pieces fit together?  In particular, there are a few things that are befuddling me:
    1) What is a good way to store this custom information (step duration) in the sequence file?  Should I modify the basic step types to add a new duration field which can be optionally set to something greater than the default, 0?
    2) How should the step duration get passed to the RTOI?  My current thought is to override the PreStep engine callback to send the custom duration field in a custom UIMessage, but that may be partly because I'm not familiar enough with the structure of the data is that is that is accessible via the sequence context...
    3) How do I link the progress bar data to the actual execution page that is currently being viewed.  Up to 4 executions can be running using the parallel model or the batch model in my sequences, so something would clearly need to be done so that when execution 1 is visible, the associated progress bar is shown, etc...  I'm assuming I can trap on some event when the user clicks on an execution in the list bar, but there is no similar code in the out-of-box RTOI - all that appears to be managed automatically by linking the controls to the execution manager.
    Thanks for any pointers or code samples (or even suggested reading) that anyone can give.

    Thanks for the response.
    I may indeed want to use the ProgressPercent message, but I'm not so sure just yet.  I did not want to leave the responsibility of sending UIMessages up to the VIs and other code modules called by the sequence - I was hoping for a simple solution to provide a new field (ExpectedDuration) that can be set for any given step.  In this way, the RTOI can manage updating the progress simply by counting seconds.  Perhaps there is some timer callback that can be leveraged to perform this function?
    What I have so far is as follows: I have a new step type called PassFailTestWithDuration.  It is a copy of the PassFailTest step type with the addition of a ExpectedDuration property and a new PreStep which calls the PostUIMessageEx with a custom event (10001).  The expected duration and the RunState.TestSockets.MyIndex both get passed as parameters.  Inside the RTOI, I have added a UserMessage callback VI which stores the data in the appropriate slot of a global (indexed by socket index).  (The global array is implemented as what I've heard called an action engine - there are init, read, and write actions that it can perform on data stored in the VI, and it is set as non-reentrant so that race conditions cannot occur).  Each entry in the global array has 2 fields - the expected duration, and the current elapsed time.  My idea was to continually update the current elapsed time for all active executions and simply show a progress bar for the "active" execution by displaying its elapsed time/expected duration in each necessary event...
    I think my main question now is - how do you determine the RunState.TestSocket.MyIndex of the active execution in the execution manager (or application manager)?  It seems like such an obvious thing to want to know, but I don't see it anywhere.
    Thanks again for any hints you can provide!

  • Problem in creating progress bar in form6i

    dear all
    how are you?
    i created a progress bar but i face a problem.
    in the when button pressed trigger i write this
    declare
    cursor MY_cur is
    select col1,col2,col3
    from base_table;
    vWIDTH number :=0;
    vSTEP NUMBER := 0;
    begin
    SELECT COUNT(1)
    INTO vROWS
    FROM base_table;
    vSTEP := 300 / vCOUNT;
    show_view('progress_bar_stack');
    for i in MY_cur is
    loop
    insert int my_tab(c1,c2,c3)
    values(i.col1,i.col2,i.col3);
    set_item_property('progree_item',width,width+vSTEP);
    synchronize;
    end loop;
    end;
    I ASK IS THIS A GOOD WAY TO CREATE A PROGRESS BAR OR NOT . AND IS THERE ANOTHE WAY TO CREATE A PROGRESS OTHER THAN THIS.
    PLEASE IF YOU HAVE A WAY , WRITE IT .
    TAREK FATHI
    2005 05 31

    my way of implementig a progress bar is:
    window wn_pbar with canvas cn_pbar and a button bt_pbar. The Button has a width of 1 pixel and max 300.
    now I have a procedure pbar.init (P_<wn-name>, P_<max-value>) which writes a window-header in the wn_pbar and a max-value in a package-variable.
    another function named pbar.next (P_<value> DEFAULT 1) increments an internal variable act-value. This act-value is initially 0 and can increment to max-value. The act-value/max-value is the percentage of the width of the button. e.g. 1200/2000 means 60% -> 60% of width 300 = 180 width for the button.
    another procedure pbar.destroy deletes the variables, closes the window wn_pbar and goes back to the item, where the focus was before the pbar started.
    with this steps you can easily group these objects in a objectgroup and inherit it to all forms you need a pbar. the sourcecode is still in a library pbar.pll which you have to attach.
    it looks like your functionality, but you can use it anywhere you need it.
    try it
    Gerd
    PS: This is a very useful method for forms client/server. In the web you have to check, that the button not refreshes to open.... the more network-roundtrips, the fewer performance...

  • Progress Bar - HttpServletResponse

    Hi,
    My Setup:
    - Windows XP Pro
    - Jakarta-Tomcat-3.2.4
    - J2SE1.4.1_02
    - IE 6
    I would like to know if there is a way to 'emulate/plug into' the progress bar on IE.
    I have a couple of web-apps running on tomcat, and I would like to implement a global progress bar. All the examples I've seen works with
    threads and you need to update the status of the progress bar.
    I need something that picks up the status/progress of the Response
    itself.

    Thanks for the replies,
    I want to track the progress of the response from the server without
    having to implement code on all servers (web services). My testing is
    done on IE with the response being written to the browser. In this case
    IE probably tracks the loading of the page/html code, like when opening
    a new url.
    My question is, is there a clever way of measuring the response for different clients. I have seen the response.isCommitted() method which
    returns true if the server has finished, but this is only useful if
    you want to display a "indeterminate" bar(like with JProgressBar).
    The simplest way to state this problem is:
    (1) Can one measure the total length of time it will take to respond to
    a request?
    (2) Can one pick up the current status of the response so that you can compare it to the total?

Maybe you are looking for