RGMRecipeGroup

 

Remarks Properties Methods DynProperties Samples

ED
avaliable
RT
avaliable

Remarks:Top

The "RGMRecipeGroup" object manages the "RGMRecipe" collection and the utilized "RGMRecipeVar" variables.

Properties:Top

Parent RecipeCount VariableCount

Methods:Top

AddVariable CreateRecipe DeleteRecipe
DeleteVariable DynPropertiesEnum[GET] DynProperties[GET]
DynProperties[PUT] RecipeItem RenameRecipe
VariableItem    

DynProperties:Top

Name Type Description
Name String This property returns the name of the recipe group.

Samples:Top

Public Sub zenOn_RGMGroup()

	'Declarations
	Dim zRGM_Group As RGMRecipeGroup
	Dim zVariable As Variable
	Dim zRGMGroup_Name As String

	'Initialization of zRGMGroup_Name with the name of the created group
	'zRGMGroup_Name = "zenOn_RGMGroup"
	zRGMGroup_Name = MyWorkspace.ActiveDocument.RGMGroups.CreateGroup("zenOn_RGMGroup").DynProperties("Name")
	'Initialization of zRGM_Group with the former created group
	Set zRGM_Group = MyWorkspace.ActiveDocument.RGMGroups.Item(zRGMGroup_Name)

	'Initialization of zVariable with the first element in the "Variables" object of the current project
	Set zVariable = MyWorkspace.ActiveDocument.Variables.Item(0)

	'Add variable to the recipe group
	zRGM_Group.AddVariable zVariable
	'Create a new recipe in the recipe group
	zRGM_Group.CreateRecipe ("zenOn_RGMRecipe")

	'Output the number of variables and recipes in the group
	Debug.Print "Number of variables: " & zRGM_Group.VariableCount
	Debug.Print "Number of recipes: " & zRGM_Group.RecipeCount & vbNewLine

	'Rename the recipe
	zRGM_Group.RenameRecipe "zenOn_RGMRecipe", "zenOn_RGMRecipeRenamed"

	'Delete the whole recipe group
	zRGM_Group.Parent.DeleteGroup (zRGM_Group.DynProperties("Name"))

End Sub