IEstimate.DisplayAnomalies Method
Sub DisplayAnomalies( _
ByVal anomalies As IEnumerable(Of Anomaly) _
)
This language is not supported or no code example is available.
Parameters
- anomalies
- IEnumerable<Anomaly>
The list of anomalies to be displayed.
Exception type | Condition |
---|---|
The anomalies is null reference (Nothing in Visual Basic). |
If the anomalies is empty, then no window will be displayed.
The following example macro creates two anomalies and calls a request that also creates some anomalies. The anomalies from the request are joined with the anomalies from the macro. At the end, all anomalies are displayed in the QDV standard "Anomalies" window
' Define a list of all cumulated anomalies created during execution of this macro. Dim allAnomalies As New List(Of Anomaly)() ' Get a random task and create an anomaly for its line 1 Dim taskWithAnomaly As ITask = Es.CurrentVersion.Wbs.Root.SubTasks(0).SubTasks(0) Dim MyAnomaly As New Anomaly(taskWithAnomaly.HexID, 1, "My anomaly 1") allAnomalies.Add(MyAnomaly) ' Call a request that fills some anomalies, they will be accessible in Es.Anomalies. ' Suppress displaying anomalies automatically in the request - set the last parameter of RunQdvRequest to False. Dim requestError As New MacroExecutionError() Es.RunQdvRequest("my_request", 1, 1, 1, requestError, False) ' Read the anomalies from the last request (stored in Es.Anomalies) and append them to our cumulated anomalies. allAnomalies.AddRange(Es.Anomalies) ' Add one more anomaly, for the same line as the first anomaly myAnomaly = New Anomaly(taskWithAnomaly.HexID, 1, "My anomaly 2") allAnomalies.Add(MyAnomaly) ' Now display all anomalies Es.DisplayAnomalies(allAnomalies)
This language is not supported or no code example is available.
Available since QDV 7.19.753.