CreateJobsFromStdOps(Int32,String,String,JobFromStdOp[]) 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 creates multiple jobs, specified in a job list.
'Declaration
Public Overloads Shared Sub CreateJobsFromStdOps( _
ByVal sessionId As Integer, _
ByVal woId As String, _
ByVal itemId As String, _
ByVal jobList() As JobFromStdOp _
)
'Usage
Dim sessionId As Integer
Dim woId As String
Dim itemId As String
Dim jobList() As JobFromStdOp
JobExec.CreateJobsFromStdOps(sessionId, woId, itemId, jobList)
public static void CreateJobsFromStdOps(
int sessionId,
string woId,
string itemId,
JobFromStdOp[] jobList
)
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.
- itemId
- Required. Holds the ID of the item that is produced by the job.
- jobList
- Required. Holds an array of JobFromStdOp objects, each containing the fields needed to create a new job. For more information about the structure of this array, refer to the Remarks section.
Each element in the JobList array is an instance of the JobFromOpJob class. The fields in this class, all required by the class constructor, are shown in the following table.
|
Field Name |
Description |
|---|---|
|
StdOperId |
A string that is the standard operation from which this job is being created. |
|
OperId |
A string that is the operation for the new job. |
|
SeqNo |
An integer that is the sequence number for the new job. |
|
EntId |
An integer that is the ID of the entity linked to this standard operation. |
|
JobDesc |
A string that is the description for the new job. |
|
DisplaySeq |
An integer that is the sequence of jobs independent of oper_id. It is used to sequence jobs in a tree or flow diagram. |
|
QtyAtStart |
A floating point number that is the quantity expected to be produced if there is no scrap, waste, or rejects for this job. |
|
QtyReqd |
A floating point number that is the quantity that is required to be produced before the job can be completed. |
|
StateCd |
An integer that is the default state code for the job being created. |
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.