Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiDisplayProgressBox

hiDisplayProgressBox(
?name s_name
[ ?banner t_banner ]
[ ?text t_text ]
[ ?location l_location ]
[ ?callback g_callback ]
[ ?totalSteps x_totalSteps ]
[ ?delay x_delay ]
[ ?autoClose g_autoClose ]
)
=> t / nil

Description

Creates a progress dialog box that displays the progress of a command. The progress dialog box is always modeless (non-blocking).

The progress dialog box has a progress bar, text that is displayed above the progress bar, and a Cancel button.

The progress bar displays the percentage of steps completed, you need to provide the total number of steps with the ?totalSteps argument and the number of steps completed with the hiSetProgress function.

The button text can be changed with the hiSetProgressButtonText function.

You can also specify the location of the progress dialog box on the screen, the delay before it appears, and whether you want the dialog box to close automatically when the progress bar reaches 100%. You can also provide a callback function that is called when the dialog box is closed.

Arguments

?name s_name

The progress box ID, specified as a symbol.

?banner t_banner

The banner text that is displayed on the dialog box frame.

?text t_text

The text that is displayed above the progress bar.

?location l_location

  

The location of the dialog box on the screen, specified as the xy coordinates of the upper left corner of the box:

list(x-coordinate y-coordinate)

If this argument is not specified or if it is specified incorrectly, then the default location set by hiSetDBoxDefaultLocation is used. If the default location has not been set, then the toolkit that implements the dialog box determines the location (usually the center of the screen).

?callback g_callback

  

Text string specifying the SKILL procedure to be called when the dialog box is closed. The callback is called whenever the dialog box is closed—whether it is automatically closed when the progress bar reaches 100%, canceled with the Cancel button, or canceled programatically with the hiCancelProgressBox function.

?totalSteps x_totalSteps

  

The total number of steps on the progress bar. The default number of steps is 100.

?delay x_delay

The time delay, in milliseconds, before the progress box appears. The default value is 0.

If the delay is set and the command is executed in a time less than the delay, then the progress box is not displayed. This is useful in cases where you want to prevent the progress box from appearing, such as while loading a simple design.

?autoClose g_autoClose

  

t or nil, specifying whether the progress box should be closed when the progress bar reaches 100%. The default value is t.

Values Returned

t

The progress dialog box was created and displayed.

nil

There was an error.

Example

RECT_COUNT = 100000
hiDisplayProgressBox(?name ’pb
    ?banner "Progress Box Test"
    ?text "Drawing Rectangles..."
    ?totalSteps RECT_COUNT
    ?autoClose nil
)
i=0
while(i<RECT_COUNT
    ;paint a rectangle on a graphics window
 i=i+1;
if(i==RECT_COUNT/4 hiSetProgressText(pb "1/4 done !"))
if(i==RECT_COUNT/2 hiSetProgressText(pb "1/2 done !"))
if(i==RECT_COUNT*3/4 hiSetProgressText(pb "3/4 done !"))
if(i==RECT_COUNT-1 hiSetProgressText(pb "Complete !!"))
    if(hiSetProgress(pb i)==nil i=RECT_COUNT) 
)

Related Topics

Progress Dialog Box Functions

hiIsProgressBoxCancelled

hiGetProgress

hiGetProgressTotalSteps

hiSetProgress

hiSetProgressText

hiSetProgressAndText


Return to top
 ⠀
X