CreateOpFromStdOp(Int32,String,String,String,DBString,Int32) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The CreateOpFromStdOp() method creates an operation for a process based on a standard operation.
This overload of the method creates one operation based on a specified standard operation.
public static void CreateOpFromStdOp(
int sessionId,
string processId,
string stdOperId,
string operId,
DBString operDesc,
int displaySeq
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- processId
- Required. Holds the ID of the process for which the operation is being created.
- stdOperId
- Required. Holds the ID of the standard operation on which the new operation is based.
- operId
- Required. Holds the ID of the new operation.
- operDesc
- Optional. Holds the description for the new operation.
- displaySeq
- Required. Holds the display sequence of the operation within the process.
A new operation for a process is created based on 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 specified standard operation (std_oper). It retrieves the all the items in BOM position zero for specified process ID from the Item_Process_Link and Bom_Item tables, and updates the Bom_Item_Oper_Link table, if found; otherwise, it inserts a new record into the Bom_Item_Oper_Link table.
The new operation is created for the process as follows:
- 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.
- Oper_Attr: All standard operation attributes linked to the supplied standard operation are copied to the operation.
- Oper_Ent_links: All standard operation entity links linked to the supplied standard operation are copied to the operation.
- Oper_Step_Grp: All standard operation step groups linked to the supplied standard operation are copied to the operation.
- Oper_Step: All standard operation steps linked to the supplied standard operation are copied to the operation.
- 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 data collection schedule for the standard operation step(s) are recursively copied over to operation step(s) accordingly.
- Oper_Step_Choice: All standard operation step choices linked to the supplied standard operation are copied to the operation.
- Oper_Step_File: All standard operation step files linked to the supplied standard operation step files are copied to operation.
- Oper_Step_ent_Exc: All standard operation step entity executes linked to the supplied standard operation step files are copied to operation.
- Oper_Spec_Ver: All standard operation specification versions linked to the supplied standard operation step files are copied to operation.
- Oper_Ent_Spec: All standard operation entity specifications linked to the supplied standard operation step files are copied to operation.
- Res_Oper_Link: All standard response operation links linked to the supplied standard operation are copied to the operation.
- Cert_Oper_Link: All standard certification operation links linked to the supplied standard operation are copied to the operation.
- SPC_Char_Oper_Link: All SPC characteristics linked to the supplied standard operation are copied to the operation characteristics accordingly.
- Data_Log_Grp_Oper_Link: All data log groups linked to the supplied standard operation are copied to the operation.
- Data_Log_Grp_Oper_Step_Link: All data log groups linked to the supplied standard operation step(s) are copied to the operation step(s) accordingly.
Note that the following must be true for the method to succeed:
- The specified process ID (process_id) exists in the Process table.
- The specified process ID is checked out by user.
- The specified operation does not already exist in the database.