Recipe.Create



Create(PvID As Long,dfValue As double,vProjekt As [optional]Variant) As RecipeValue

Parameters

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

Remarks

Creates a new "RecipeValue" object.

Sample


Private Sub CreateRecipeValue(ByRef zRecipe As recipe)
	'Declarations
	Dim zVariable As Variable
	Dim i As Integer

	'Initialization of zVariable with the first "Variable" object within the "Variables" object
	Set zVariable = thisProject.Variables.Item(0)

	'Create new "RecipeValue" object within zRecipe
	'zVariable.PvID assigns zVariable to the recipe
	'22 will be the default value of zVariable
	zRecipe.Create zVariable.PvID, 22

	'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, RecipeValue