IRecipeExchange::assigntoworkstations

Method Signatures

 

C\C++

HRESULT

AssignToWorkstations(

RecipeExchangeType rType,

BSTR recipeName,

SAFEARRAY** bstrNodes,

BOOL bAutoCheckOut,

BOOL BAutoCheckIn

)

VB

Public Sub

AssignToWorkstations(

ByVal rType As RecipeExchangeType,

ByVal recipeName As String,

ByRef bstrNodes() As String,

ByVal bAutoCheckOut As Boolean,

ByVal bAutoCheckIn As Boolean

)

This method assigns the specified recipe to the batch executive of the specified workstations.

Return Values

S_OK - success

E_NOT_CONNECTED - Please call Connect First.

E_ASSIGNMENT_FAILED - The assignment Failed.

E_INVALID_TYPE - The type is not supported.

else - failed

Memory Allocation

None

Visual Basic Usage Example

Private Sub Button1_Click()

  Dim myRecipeExchange As RecipeExchange
  Set myRecipeExchange = New RecipeExchange
  myRecipeExchange.Connect
  
  Dim itemType As tagRecipeExchangeType
  itemType = Procedure
  Dim itemName As String
  itemName = "OP_CS_ADDITION"
  Dim strNodes(1 to 1) As String
  strNodes(1) = "Node1"
  Dim bAutoCheckOut As Boolean
  bAutoCheckOut = True
  Dim bAutoCheckIn as Boolean
  bAutoCheckIn = True
  
  Call myRecipeExchange.AssignToWorkstations(itemType, 
                                             itemName, 
                                             strNodes)
  
  myRecipeExchange.Disconnect

End Sub

Parameter Name

Purpose

rType

The type of the specified recipe to be assigned to the batch executives of the specified workstations.

recipeName

The name of the specified recipe to be assigned to the batch executives of the specified workstations.

This name should include the path.

e.g., "operationFolder1/op1","procedure1/formula1".

bstrNodes

The array of the workstation name.

bAutoCheckOut

=True, turn on the auto check out VCAT preference.

=False, turn off the auto check out VCAT preference.

bAutoCheckIn

=True, turn on the auto check in VCAT preference.

=False, turn off the auto check in VCAT preference.

Notes:

typedef enum tagRecipeExchangeType

{

      SYSTEM,

        ENUMSETS,

        RECIPES,

        OPERATION,

        OPERATIONS,

        PROCEDURE,

        PROCEDURES,

        UNITPROCEDURE,

        UNITPROCEDURES,

        FORMULA,

        UNITCLASS,

        UNITCLASSES,

        PHASECLASS,

        PHASECLASSES,

        PROCESSCELLCLASS,

        PROCESSCELLCLASSES,

        AREAS,

        AREA,

        PROCESSCELL,

        UNITMODULE,

        NODES,

        NODE

} RecipeExchangeType;