Add Method (Line)
- Last UpdatedNov 06, 2025
- 3 minute read
The Add() method adds a production line or line class to the Line table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal lineName As String, _
ByVal lineClass As Nullable(Of Boolean), _
ByVal originLineClassId As DBInt, _
ByVal laborLoad As DBInt, _
ByVal maxWO As DBInt, _
ByVal prodEntId As DBInt, _
ByVal prodUnitOfMeasure As Nullable(Of Integer), _
ByVal batchSize As Nullable(Of Double), _
ByVal stdItemId As DBString, _
ByVal bottleneckEntId As DBInt, _
ByVal targetUtil As DBDouble, _
ByVal targetQuality As DBDouble, _
ByVal targetPerformance As DBDouble, _
ByVal targetOee As DBDouble, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date, _
ByRef lineId As Integer _
)
'Usage
Dim sessionId As Integer
Dim lineName As String
Dim lineClass As Nullable(Of Boolean)
Dim originLineClassId As DBInt
Dim laborLoad As DBInt
Dim maxWO As DBInt
Dim prodEntId As DBInt
Dim prodUnitOfMeasure As Nullable(Of Integer)
Dim batchSize As Nullable(Of Double)
Dim stdItemId As DBString
Dim bottleneckEntId As DBInt
Dim targetUtil As DBDouble
Dim targetQuality As DBDouble
Dim targetPerformance As DBDouble
Dim targetOee As DBDouble
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
Dim lineId As Integer
Line.Add(sessionId, lineName, lineClass, originLineClassId, laborLoad, maxWO, prodEntId, prodUnitOfMeasure, batchSize, stdItemId, bottleneckEntId, targetUtil, targetQuality, targetPerformance, targetOee, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt, lineId)
public static void Add(
int sessionId,
string lineName,
Nullable<bool> lineClass,
DBInt originLineClassId,
DBInt laborLoad,
DBInt maxWO,
DBInt prodEntId,
Nullable<int> prodUnitOfMeasure,
Nullable<double> batchSize,
DBString stdItemId,
DBInt bottleneckEntId,
DBDouble targetUtil,
DBDouble targetQuality,
DBDouble targetPerformance,
DBDouble targetOee,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out DateTime lastEditAt,
out int lineId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- lineName
- Required. Holds the name of the line or line class being added.
- lineClass
- Optional. Holds the flag that indicates whether this is a line class. The default is false.
- originLineClassId
- Optional. Holds the ID of the line class to which the line belongs. If null (the default) and the lineClass flag is false, this line will not be part of a line class. If null and the lineClass flag is true, this record defines a line class.
- laborLoad
- Optional. Holds the number of people to run the line reported to ERP. The default is null.
- maxWO
- Optional. Holds the maximum number of simultaneous work orders permitted on the line. The default is 1.
- prodEntId
Optional. Holds the ID of the entity in the line that is used as the source for the production amount of the line. The default is null.
If an entity is not specified by this parameter, one of the entities in the last position of the line will be designated as the production source entity.
- prodUnitOfMeasure
- Optional. Holds the standard production rate unit of measure for reporting production rate. The default is 0 (hours/batch).
- batchSize
- Optional. Holds the standard batch size for reporting production rate. The default is 1.
- stdItemId
- Optional. Holds the standard item to use for reporting production rate. The default is null.
- bottleneckEntId
Optional. Holds the identity of the entity that is designated as the bottleneck on the line. The default is null.
If an entity is not specified by this parameter, the bottleneck entity will be determined by calculations based on the expected production rates.
- targetUtil
- Optional. Holds the KPI target for utilization (availability). The default is null.
- targetQuality
- Optional. Holds the KPI target for quality. The default is null.
- targetPerformance
- Optional. Holds the KPI target for performance. The default is null.
- targetOee
- Optional. Holds the KPI target for OEE. The default is null.
- spare1
- Optional. Holds user-defined content for the spare1 field. The default is null.
- spare2
- Optional. Holds user-defined content for the spare2 field. The default is null.
- spare3
- Optional. Holds user-defined content for the spare3 field. The default is null.
- spare4
- Optional. Holds user-defined content for the spare4 field. The default is null.
- lastEditComment
- Optional. Holds comments about why this record is being added.
- lastEditAt
Output. Holds the returned date/time when this record was created. The lastEditAt parameter is used in other methods that modify or delete this record for optimistic concurrency control.
- lineId
- Output. Holds the returned line ID for the new line or line class.