PfsGroups

 

Remarks Properties Methods Samples

ED
avaliable
RT
avaliable

Remarks:Top

The Groups collection contains the groups of the PFS module (in the editor also called "equipments).

Properties:Top

Count Parent Session

Methods:Top

CreateGroup DeleteGroup Item

Samples:Top



'''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''Test Groups''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''
Private Sub TEST()

Dim myPFS As PfsEngine
Set myPFS = MyWorkspace.ActiveDocument.PFS

	Call CreateGroups(myPFS)
	Call ReadGroups(myPFS)

	Call DeleteGroups(myPFS)
		DoEvents

	Call ReadGroups(myPFS)

End Sub
''''''''''''''''''''''''''''''''''''''''''''''
''''''''''Creates 5 Test Groups'''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''
Function CreateGroups(myPFS As PfsEngine)

Dim i As Integer
Dim myString As String

	For i = 0 To 4
		myString = "testgruppe " & i
		myPFS.Groups.CreateGroup (myString)
	Next i

Debug.Print "Groups were created!"

End Function
''''''''''''''''''''''''''''''''''''''''''''''
''''''''''Read out all Group names''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''
Function ReadGroups(myPFS As PfsEngine)

Dim i As Integer

	For i = 0 To myPFS.Groups.Count - 1
		Debug.Print myPFS.Groups.Item(i).Name
	Next i

End Function
''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''Delete all Groups''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''
Function DeleteGroups(myPFS As PfsEngine)

Dim strTMP As String
Dim i As Double

	Debug.Print myPFS.Groups.Count & " Groups to delete!"

	For i = myPFS.Groups.Count - 1 To 0 Step -1
		strTMP = myPFS.Groups.Item(i).Name
		Debug.Print "Group deleted! - " & strTMP & " - " & myPFS.Groups.DeleteGroup(strTMP)
	Next i

	myPFS.Save

End Function