Cancel
Showing results for 
Search instead for 
Did you mean: 

TxErrorWindow - How does it work?

Creator
Creator

How does the TxErrorWindow work?

 

The Class TxErrorWindow (Namespace: Tecnomatix.Engineering.Utilities) has two different subs.

 

(1) Show ==> This Sub works fine.

 

(2) ShowDialog ==> This Sub want to have the errors and warnings as Hashtable.

 

How could i build this Hashtable if i have a List(Of Exceptions)???

 

Thanks.

1 REPLY

Re: TxErrorWindow - How does it work?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi EDAG-PS,

 

The Hashtables contain a string that defines the error/warning message and an array of strings that defines the suberrors/subwarnings.

 

Here is an example:

private void ShowErrorWindow(TxObjectList failedObjects)
{
       Hashtable errorsTable = new Hashtable();
       List<string> failedObjectsNames = new List<string>();
       foreach (ITxObject obj in failedObjects)
       {
           failedObjectsNames.Add(obj.Name);
       }

       errorsTable.Add("The following objects failed to ...", failedObjectsNames.ToArray());
                 
       TxErrorWindow.ShowDialog("My Command", "The command encountered some problems during ...", errorsTable, 
new Hashtable(), true); }

 

Best Regards,

DianaG