CreateOpFromStdOp(Int32,String,OpFromStdOp[]) 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 multiple operations based on a supplied a list of standard operations.
'Declaration
Public Overloads Shared Sub CreateOpFromStdOp( _
ByVal sessionId As Integer, _
ByVal processId As String, _
ByVal operList() As OpFromStdOp _
)
'Usage
Dim sessionId As Integer
Dim processId As String
Dim operList() As OpFromStdOp
Process.CreateOpFromStdOp(sessionId, processId, operList)
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 to which the operations are being added.
- operList
- Required. Holds an array of OpFromStdOp objects, each containing the fields needed to create a new operation.
Each element in the OperList array is an instance of the OpFromStdOp class. The fields in this class, all required by the class constructor, are:
- StdOperId: A string that identifies the standard operation from which this operation is being created.
- OperId: A string that identifies the new operation for the process.
- OperDesc: A string containing the description for the new operation.
- DisplaySeq: An integer is used to specify the sequence of operations independently of oper_id. It is used to sequence operations in a tree or flow diagram.
New operations for the specified process are created based on the supplied parameters along with other supplied defaults. The default value for deviation above, deviation below, assoc file path, and check inventory are used from standard operation (std_oper) identified by the supplied parameter. It retrieves the all the items in BOM position zero for the supplied 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.
For each standard operation specified, a 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.