PfsModellShift

 

Remarks Properties Methods Samples

ED
avaliable
RT
avaliable

Remarks:Top

The ModellShift object is a shift in a time model. Each shift consists of an unique name and a period of time (from/to). This period of time is the active production cycle. The defined period of time must be unique, i.e. you cannot define more than one shift for the same time. Each shift can contain any number of breaks, that interrupt the production cycle.

Properties:Top

EndTime Guid KeyNote
Name Notes Parent
Session StartTime  

Methods:Top

Breaks Rename  

Samples:Top



''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''Creating, Reading out''''''''''''
''''''''''and Deletion of some shifts'''''''''
''''''''''''''''''''''''''''''''''''''''''''''
Private Sub shifttest()

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

'''''''Creation''''''''
Dim i As Double
Dim mystring As String
Debug.Print "--Creation:"

	For i = 0 To 5
		mystring = "testshift " & i
		mypfs.Groups.Item(0).TimeModells.Item(0).Shifts.CreateShift (mystring)
		Debug.Print mystring & " was created!"
	Next i

mypfs.Save

''''Reading Out''''''
Dim o As Double
Debug.Print "--Reading Out:"

	For o = 0 To mypfs.Groups.Item(0).TimeModells.Item(0).Shifts.Count - 1
		Debug.Print mypfs.Groups.Item(0).TimeModells.Item(0).Shifts.Item(o).Name
	Next o

''''''Deletion''''''''
Dim f As Double
Debug.Print "--Deletion:"

	For f = mypfs.Groups.Item(0).TimeModells.Item(0).Shifts.Count - 1 To f = 1 Step -1
		mypfs.Groups.Item(0).TimeModells.Item(0).Shifts.DeleteShift (f)
		Debug.Print "shift " & f; " was deleted!"
	Next f

End Sub