Add Method (UtilExec)
- Last UpdatedNov 06, 2025
- 3 minute read
The Add() method adds a new utilization exec record to the Util_Exec table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal entId As Integer, _
ByVal curStateCd As DBInt, _
ByVal curReasCd As DBInt, _
ByVal curReasStartLocal As DBDateTime, _
ByVal curRawReasCd As DBString, _
ByVal reasReqd As Nullable(Of Boolean), _
ByVal curLogId As DBInt, _
ByVal targetUtil As DBDouble, _
ByVal currentUtil As DBDouble, _
ByVal jobStartReasCd As DBInt, _
ByVal jobEndReasCd As DBInt, _
ByVal shiftStartReasCd As DBInt, _
ByVal shiftEndReasCd As DBInt, _
ByVal unknStopReasCd As DBInt, _
ByVal breakStartReasCd As DBInt, _
ByVal breakEndReasCd As DBInt, _
ByVal inheritFromParent As Nullable(Of Boolean), _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim entId As Integer
Dim curStateCd As DBInt
Dim curReasCd As DBInt
Dim curReasStartLocal As DBDateTime
Dim curRawReasCd As DBString
Dim reasReqd As Nullable(Of Boolean)
Dim curLogId As DBInt
Dim targetUtil As DBDouble
Dim currentUtil As DBDouble
Dim jobStartReasCd As DBInt
Dim jobEndReasCd As DBInt
Dim shiftStartReasCd As DBInt
Dim shiftEndReasCd As DBInt
Dim unknStopReasCd As DBInt
Dim breakStartReasCd As DBInt
Dim breakEndReasCd As DBInt
Dim inheritFromParent As Nullable(Of Boolean)
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
UtilExec.Add(sessionId, entId, curStateCd, curReasCd, curReasStartLocal, curRawReasCd, reasReqd, curLogId, targetUtil, currentUtil, jobStartReasCd, jobEndReasCd, shiftStartReasCd, shiftEndReasCd, unknStopReasCd, breakStartReasCd, breakEndReasCd, inheritFromParent, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Add(
int sessionId,
int entId,
DBInt curStateCd,
DBInt curReasCd,
DBDateTime curReasStartLocal,
DBString curRawReasCd,
Nullable<bool> reasReqd,
DBInt curLogId,
DBDouble targetUtil,
DBDouble currentUtil,
DBInt jobStartReasCd,
DBInt jobEndReasCd,
DBInt shiftStartReasCd,
DBInt shiftEndReasCd,
DBInt unknStopReasCd,
DBInt breakStartReasCd,
DBInt breakEndReasCd,
Nullable<bool> inheritFromParent,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entId
- Required. Holds the ID of the entity to which this utilization exec is being added.
- curStateCd
- Optional. Holds the current utilization state code.
- curReasCd
- Optional. Holds the current utilization reason code.
- curReasStartLocal
- Optional. Holds the start time of the current reason in local time.
- curRawReasCd
- Optional. Holds the current raw reason code.
- reasReqd
- Required. Holds a flag that, when set to true, specifies that the machine requires a final reason.
- curLogId
- Optional. Holds the ID of the current utilization log.
- targetUtil
- Optional. Holds the value for the target utilization for this entity.
- currentUtil
- Optional. Holds the value for the current utilization for this entity.
- jobStartReasCd
- Optional. Holds the job start reason code.
- jobEndReasCd
- Optional. Holds the job end reason code.
- shiftStartReasCd
- Optional. Holds the shift start reason code.
- shiftEndReasCd
- Optional. Holds the shift end reason code.
- unknStopReasCd
- Optional. Holds the unknown stop reason code.
- breakStartReasCd
- Optional. Holds the break start reason code.
- breakEndReasCd
- Optional. Holds the break end reason code.
- inheritFromParent
- Required. Holds a flag that, if set to true, specifies that a change in the current reason code for a parent entity should be applied to this child entity.
- spare1
- Optional. Holds the contents of the user-defined spare1 field.
- spare2
- Optional. Holds the contents of the user-defined spare2 field.
- spare3
- Optional. Holds the contents of the user-defined spare3 field.
- spare4
- Optional. Holds the contents of the user-defined spare4 field.
- lastEditComment
- Optional. Holds comments that describe why this record is being added.
- lastEditAt
Holds the returned date/time when this record was added. The lastEditAt parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.