RGMRecipeGroups

 

Remarks Properties Methods Samples

ED
avaliable
RT
avaliable

Remarks:Top

This object manages "RGMRecipeGroup" objects.

Properties:Top

Count Parent  

Methods:Top

CheckIn CheckOut CreateGroup
DeleteGroup Export Get
Import IsCheckedOut IsDifferent
IsLocked Item RenameGroup
UndoCheckOut    

Samples:Top

Public Sub zenOn_RGMGroups()
	'Declarations
	Dim zRGM_Groups As RGMRecipeGroups
	Dim zRGM_Group As RGMRecipeGroup
	Dim i As Integer

	'Initialize zRGM_Groups with the "RGMGroups" object of the current project
	Set zRGM_Groups = MyWorkspace.ActiveDocument.RGMGroups

	'Create a new group called "zenOn_RGMGroup"
	zRGM_Groups.CreateGroup ("zenOn_RGMGroup")

	'Enumerate all recipe groups
	For i = 0 To zRGM_Groups.Count - 1
		'Assign the current item to zRGM_Group
		Set zRGM_Group = zRGM_Groups.Item(i)
	
		'Enumerate the groups
		Debug.Print i + 1 & ". Group: "
		'Output name of the group
		Debug.Print " Name: " & zRGM_Group.DynProperties("Name")
		'Output amount of recipes within the collection
		Debug.Print " Recipes: " & zRGM_Group.RecipeCount
		'Output amount of variables within the collection
		Debug.Print " Variables: " & zRGM_Group.VariableCount
		'Output a blank line
		Debug.Print ""
	
		'If there are recipes available, then output them
		If zRGM_Group.RecipeCount > 0 Then
			Call GetRecipesOfGroup(zRGM_Group)
		End If
	
		'If there are variables available, then output them
		If zRGM_Group.VariableCount > 0 Then
			Call GetVariablesOfGroup(zRGM_Group)
		End If
	
	Next i

	'Delete the former created group
	zRGM_Groups.DeleteGroup ("zenOn_RGMGroup")

	Debug.Print ""
End Sub

Sub GetRecipesOfGroup(myRGMGroup As RGMRecipeGroup)
	'Declarations
	Dim zRGM_Recipe As RGMRecipe
	Dim i As Integer

	Debug.Print "Recipes"
	'Enumerate all recipes in the group
	For i = 0 To myRGMGroup.RecipeCount - 1
		'Assign the current recipe item to zRGM_Recipe
		Set zRGM_Recipe = myRGMGroup.RecipeItem(i)
		'Output the recipe
		Debug.Print " Recipe" & i + 1 & ": " & zRGM_Recipe.DynProperties("RecipeName")
	Next i
	'Output a blank line
	Debug.Print ""
End Sub

Sub GetVariablesOfGroup(myRGMGroup As RGMRecipeGroup)
	'Declarations
	Dim zRGM_Variable As RGMRecipeVar
	Dim i As Integer

	'Enumerate all variables of the group
	Debug.Print "Variables"
	For i = 0 To myRGMGroup.VariableCount - 1
		'Assign the current variable item to zRGM_Variable
		Set zRGM_Variable = myRGMGroup.VariableItem(i)
		'Output the variable
		Debug.Print " Var" & i + 1 & ": " & zRGM_Variable.Name
	Next i
	'Output a blank line
	Debug.Print ""
End Sub