CreateJobsFromStdOps(Int32,String,String,String,Int32,String,String,JobStateCode,Int32,Double,Double,Int32) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The CreateJobsFromStdOps() method creates a job and job components from a standard operation.
This overload of the method uses the entity ID to identify the entity that is linked to the standard operation.
'Declaration
Public Overloads Shared Sub CreateJobsFromStdOps( _
ByVal sessionId As Integer, _
ByVal woId As String, _
ByVal stdOperId As String, _
ByVal operId As String, _
ByVal seqNo As Integer, _
ByVal jobDesc As String, _
ByVal itemId As String, _
ByVal stateCd As JobStateCode, _
ByVal entId As Integer, _
ByVal qtyReqd As Double, _
ByVal qtyAtStart As Double, _
ByVal displaySeq As Integer _
)
'Usage
Dim sessionId As Integer
Dim woId As String
Dim stdOperId As String
Dim operId As String
Dim seqNo As Integer
Dim jobDesc As String
Dim itemId As String
Dim stateCd As JobStateCode
Dim entId As Integer
Dim qtyReqd As Double
Dim qtyAtStart As Double
Dim displaySeq As Integer
JobExec.CreateJobsFromStdOps(sessionId, woId, stdOperId, operId, seqNo, jobDesc, itemId, stateCd, entId, qtyReqd, qtyAtStart, displaySeq)
public static void CreateJobsFromStdOps(
int sessionId,
string woId,
string stdOperId,
string operId,
int seqNo,
string jobDesc,
string itemId,
JobStateCode stateCd,
int entId,
double qtyReqd,
double qtyAtStart,
int displaySeq
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- woId
- Required. Holds the ID of the work order that is being created.
- stdOperId
- Required. Holds the ID of the standard operation from which this job is being created.
- operId
- Required. Holds the ID of the operation for the new job.
- seqNo
- Required. Holds the sequence number for the new job.
- jobDesc
- Required. Holds the description for the new job.
- itemId
- Required. Holds the ID of the item produced by the job.
- stateCd
- Required. Holds the default state code for the new job.
- entId
- Required. Holds the ID of the entity linked to this standard operation.
- qtyReqd
- Required. Holds the quantity expected to be produced if there is no scrap, waste, or rejects for this job.
- qtyAtStart
- Required. Holds the quantity that is required to be produced before the job can be completed.
- displaySeq
- Required. Holds an integer that specifies the sequence of jobs independent of oper_id.
A new job is created using the supplied parameter along with other supplied defaults. The default value for deviation above, deviation below, associated file path, and check inventory are used from the specified standard operation. Similarly, the estimated fixed labor hours, estimated labor rate, estimated setup time, estimated teardown time, estimated production rate, estimated unit of measurement, batch size, estimated transfer time, and initial production percentage are used from standard operations linking to the supplied entity (std_oper_Ent_Link).
- Data_Entry_Sched: If the supplied standard operation is linked to a data collection schedule whose key type is 2 in the Data_Entry_Sched table, then all data from that data collection schedule is copied to the new job that is being created. Thus the new job would be enabled to collect data periodically.
- Job_Attr: All standard operation attributes linked to the supplied standard operation are copied to the job.
- Job_Step_Grp: All standard operation step groups linked to the supplied standard operation are copied to the job.
- Job_Step: All standard operation steps linked to the supplied standard operation are copied to the job.
- Data_Entry_Sched: If there are steps linked to the supplied standard operation to collect data whose key type is 3 in the Data_Entry_Sched table, then all data from the data collection schedule for the standard operation steps are recursively copied over to job steps accordingly.
- Job_Step_Choice: All standard operation step choices linked to the supplied standard operation are copied to the job.
- Job_Step_File: All standard operation step files linked to the supplied standard operation step files are copied to job.
- Job_Spec: All standard operation entity specs linked to the supplied standard operation specs are copied to the job.
- Res_Job_Link: All standard operation resources linked to the supplied standard operation are copied to the job.
- Data_Log_Grp_Job_Link: All data log groups linked to the supplied standard operation are copied to the job.
- Data_Log_Grp_Job_Step_Link: All data log groups linked to the supplied standard operation steps are copied to the job steps accordingly.
- Spc_Char_Job: All spc characteristics linked to the supplied standard operation are copied to the job characteristics accordingly.
For the method to succeed:
- The supplied work order (wo_id) must exist in the database (WO table).
- The supplied standard operation is must be linked to an entity.
- The supplied job must not already exist in the database.