Recipe.Delete



Delete(PvID As Long,vProjekt As [optional]Variant) As Boolean

Parameters

PvID As Long
PvID from the "Variable" object that should be deleted.
vProjekt As [optional]Variant
Defines the project, where the "RecipeValue" object should be deleted. If this value is not specified the current project will be selected.
ED
avaliable
RT
avaliable

Remarks

Deletes a "RecipeValue" object from the collection by the PvID of the "Variable" object that was assigned to the "RecipeValue" object.

Sample


Private Sub DeleteRecipeValue(ByRef zRecipe As recipe)

	'Declarations
	Dim zVariable As Variable
	Dim i As Integer

	'Initialization of zVariable with the variable that is named "zenOn_Test"
	Set zVariable = thisProject.Variables.Item("zenOn_Test")

	'Deletes the variable "zenOn_Test" from the recipe
	zRecipe.Delete zVariable.PvID

	'For every "RecipeValue" object within zRecipe...
	For i = 0 To zRecipe.Count - 1
		'...output the value
		Debug.Print i + 1 & ". value: " & zRecipe.Item(i).Value
	Next i

End Sub


See Also

Recipe