IDVBCMRecipeEdit/Info::getunitbindings

Method Signatures

 

C\C++

HRESULT GetUnitBindings(

LPVARIANT vArrayStepNames,

LPVARIANT vArrayUnitNames,

LPVARIANT vArrayUnitIDs,

LPVARIANT vArrayAreaNames,

LPVARIANT vArrayAreaIDs,

long lWait)

VB

Public Sub GetUnitBindings(

ByRef vArrayStepNames As Variant,

ByRef vArrayUnitNames As Variant,

ByRef vArrayUnitIDs As Variant,

ByRef vArrayAreaNames As Variant,

ByRef vArrayAreaIDs As Variant,

ByVal lWait As Long)

Returns the step names, bound unit names, unit IDs, area names, and area IDs for the recipe.

Return Values

S_OK - success

else - failed

Memory Allocation

The caller is responsible for releasing all three of the name safearrays and both ID safearrays.

Visual Basic Usage Example

Private Sub Button1_Click()
    Dim  vArrayStepNames As Variant, vArrayUnitNames As Variant
    Dim vArrayUnitIDs As Variant, vArrayAreaNames As Variant
    Dim vArrayAreaIds As Variant
    Dim objRecipeInfo As DVBCMRecipeInfo
    Call GetRecipeInfoObject(objRecipeInfo)
    Call objRecipeInfo.GetUnitBindings(vArrayStepNames, _
            vArrayUnitNames, vArrayUnitIDs, vArrayAreaNames, vArrayAreaIDs)
    Call UseRecipeUnitBindingInfo(vArrayStepNames, vArrayUnitNames, _
            vArrayUnitIDs, vArrayAreaNames, vArrayAreaIDs)
End Sub

Parameter Name

Purpose

vArrayStepNames

Safearray of strings representing the names of all recipe steps.

vArrayUnitNames

Safearray of strings representing the name of the bound unit for each step.

vArrayUnitIDs

Safearray of long integers representing the IDs of the bound unit for each step.

vArrayAreaNames

Safearray of strings representing the names of the areas containing the bound unit for each step.

vArrayAreaIDs

Safearray of strings representing the IDs of all area for each steps.

lWait

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