UL_ERROR

Data members

   
area UL_AREA
area2 UL_AREA (see note)
code int (identification number)
description string
layer int
modulename string
s1 string (see note)
s2 string
s3 string
s4 string
s5 string
s6 string
sheet int (sheet number)
signature string (signature string)
state int (ERROR_STATE_...)
type int (ERROR_TYPE_...)
x, y int (center point)

Loop members

   
contours() UL_WIRE (see note)

See also UL_BOARD, UL_SCHEMATIC

Constants

   
ERROR_STATE_ACTIVE error has not yet been approved or processed
ERROR_STATE_APPROVED error has been approved
ERROR_STATE_PROCESSED error has been processed
ERROR_TYPE_NONE no error
ERROR_TYPE_WARNING warning
ERROR_TYPE_ERROR error
ERROR_TYPE_CONSISTENCY consistency error

Notes

A UL_ERROR is an abstract object which gives informations about ERC/DRC errors.

The members layer and contours() are only available in UL_BOARD context and the members area2, modulename, s1...s6 and sheet are only available in UL_SCHEMATIC context.

The member area2 is a second area, only available on some ERC errors and refers to the corresponding area in the board. The members s1...s6 are string values, which for ERC errors, contain specific informations like names.

The contours() loop member loops through the contour wires of the DRC error polygon.

Example

string s1;
string ErrLst[];
int ErrCnt = 0;
string ErrLstHeader;
if (board) board(B) {
   ErrLstHeader = "Code\tState\tDescription\tLayer\tSignature";
   if (B.checked) {
      B.errors(ER) {
         if (ER.state == ERROR_STATE_ACTIVE) {
            sprintf(s1, "%d\t%d\t%s\t%d\t%s", ER.code, ER.state, ER.description, ER.layer, ER.signature);
            ErrLst[ErrCnt++] = s1;
         }
      }
   }
}
if (schematic) schematic(SCH) {
   ErrLstHeader = "Code\tState\tDescription\tSheet\tModule\ts1\ts2\ts3\ts4\ts5\ts6";
   if (SCH.checked) {
      SCH.errors(ER) {
         if (ER.state == ERROR_STATE_ACTIVE) {
            sprintf(s1, "%d\t%d\t%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s", ER.code, ER.state, ER.description, ER.sheet, ER.modulename, ER.s1, ER.s2, ER.s3, ER.s4, ER.s5, ER.s6);
            ErrLst[ErrCnt++] = s1;
         }
      }
   }
}
dlgDialog("Errors") {
   int sel = -1;
   dlgListView(ErrLstHeader, ErrLst, sel);
   dlgPushButton("+OK") dlgAccept();
};