Admin Production ni-theme
Current Publication

ProgressBar_LoadMilestones

LabWindows/CVI

ProgressBar_LoadMilestones

int ProgressBar_LoadMilestones (int panel, int progressBarCtrl, char *dataFile, int includeTimeData);

Purpose

Loads a set of milestones for the progress bar.

Because the position of a milestone can change during the operation of a progress bar, it can be useful to save the current set of milestones, as well as the total estimated time of the task, so that you can continue using the adjusted milestones in subsequent runs of the application.

When you call this function, any previously defined milestones are discarded from the progress bar control.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
progressBarCtrl int The ID you specified as the slideCtrl parameter in the ProgressBar_ConvertFromSlide function call or the ID returned by the ProgressBar_Create function.
dataFile char * Pass the pathname of the file from which to read the milestones. You must first create this file using the ProgressBar_SaveMilestones function.

If the pathname is not absolute, make sure that the file is located relative to the current working directory.
includeTimeData int If you saved the milestones with time data and you specify a nonzero value or select yes in the function panel, the function loads the historical time data associated with each milestone and with the task as a whole.

Specify 0 or select no in the function panel to load only the saved milestone percentages.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message.

Additional Information

Library: Progress Bar Control

Include file: custctrl\progressbar.h

LabWindows/CVI compatibility: LabWindows/CVI 2009 and later