Released on August 8, 2021
The new Qdv.UserAPI.IGlobalErrors interface was added which provides read-only access to the old error handling mechanism in the API.
Most methods in the API use structured error handling and throw standard .NET exceptions when errors are encountered. But for historical reasons and for backward compatibility with old macros, some methods in the API don't throw exceptions when an error is encountered. Instead, some of them set a global error message. And some methods use so called message stack, to store all encountered errors there. These global error messages are automatically displayed by QDV after a macro has finished.
This interface allows to read this error info programmatically. You can get it from IQdvEnvironment.GlobalErrors property. In macros, it's accessible from the Context parameter: Context.QdvManager.Environment.GlobalErrors
The DisplayStimulsoftReport() function of the API has been enriched with a new signature allowing grasp over the preview window and the generation of output files.
DisplayStimulsoftReport(
ReportPath As String,
DataSourcePath As String,
ShowPreviewWindow As Boolean,
PreviewWindowState As System.Windows.Forms.FormWindowState,
ShowProgressBar As Boolean,
CloseAfterRendering As Boolean,
Optional ByVal ExportResultToFile As String = "")
Please see API documentation for more information.
If a value of a minute field was modified in a request or a macro, the change was correctly applied to the estimate. But if then, in the same request or macro, the value of the modified field was read, the retrieved value was incorrect, it contained the old value instead of the new one.
Example code in a request:
Minutes.[Description] = "ABC"
Display_Message(Minutes.[Description], 0)
The message box displayed the old description instead of “ABC”.
Example code in a VB macro:
Dim task As ITask = Es.CurrentVersion.Wbs.Root.SubTasks(0).SubTasks(0)
task.Minute.SetFieldValue(1, "Description", "ABC")
Dim description As String = task.Minute.GetFieldValue(1, "Description")
MessageBox.Show(description)
Again, the message box displayed the old description instead of “ABC”.
When master/slave lists were used in the minutes and wrong association was entered (E.g.: using copy/paste operation) this was properly detected as computing time but if the master value or the parent value contained a dash (-), the window pointing out the anomaly was not displayed.