IDVBCMRecipeEdit::setunitbinding

Note:

There is not an equivalent Info method.

Method Signatures

 

C\C++

HRESULT SetUnitBinding(

BSTR bstrStepName,

BSTR bstrUnitName,

long lUnitID,

long lWait)

VB

Public Sub SetUnitBinding(

ByVal bstrStepName As String,

ByVal bstrUnitName As String,

ByVal lUnitID As Long,

ByVal lWait As Long)

Sets a unit binding pair for the recipe.

Return Values

S_OK - success

else - failed

Memory Allocation

none

Visual Basic Usage Example

Private Sub Button1_Click()
    Dim strStepName As String, strUnitName As String
    Dim lUnitID As Long
    Dim objRecipeInfo As DVBCMRecipeInfo
    Call GetRecipeInfoObject(objRecipeInfo)
    Call GetNewBoundUnitForRecipeStep(objRecipeInfo, strStepName, _
            strUnitName, lUnitID)
    Call objRecipeInfo.SetUnitBinding(strStepName, strUnitName, _
            lUnitID)
End Sub

Parameter Name

Purpose

strStepName

The name of the step that is being changed.

strUnitName

The name of the bound unit for the step being changed.

lUnitID

The unit ID of the new bound unit.

lWait

Optional. Default = 30000. Time to wait for a server resource in milliseconds.

Set the unit binding for the deferred alias by using the SetUnitBinding method and supplying the deferred unit alias name for the second argument as follows:

Call objRecipeEdit.SetUnitBinding("Step Name", ""#Unit Alias Name#, _
    UnitID)