PfsScheduleLinks

 

Remarks Properties Methods Samples

ED
avaliable
RT
avaliable

Remarks:Top

The "IPfsScheduleLinks" object manages the collection of the "IPfsScheduleLink" objects.

Properties:Top

Count Parent Session

Methods:Top

CreateFktLink CreateVarLink DeleteFktLink
DeleteVarLink Item  

Samples:Top

Sub PFS_Sample()
Dim i As Integer
Dim zPFS As PfsEngine
Dim zPFS_GRP As PfsGroup
Dim zPFS_SCD As PfsSchedule
Dim zPFS_SCL As PfsScheduleLink
Dim zFCT As RtFunction
Dim zVAR As Variable
  
  'get PFS Engine
  Set zPFS = MyWorkspace.ActiveDocument.Pfs
  'get 1st found group
  Set zPFS_GRP = zPFS.Groups.Item(0)
  'get 1st found schedule
  Set zPFS_SCD = zPFS_GRP.Schedules.Item(0)
  'get count of ScheduleLinks
  Debug.Print "ScheduleLinks: " & zPFS_SCD.ScheduleLinks.Count
  'create new FunctionLink
  Set zFCT = MyWorkspace.ActiveDocument.RtFunctions.Item("myFunction")
  Set zPFS_SCL = zPFS_SCD.ScheduleLinks.CreateFktLink(zFCT)
  Debug.Print zPFS_SCL.Name
  'create new VariableLink
  Set zVAR = MyWorkspace.ActiveDocument.Variables.Item("myVAR")
  Set zPFS_SCL = zPFS_SCD.ScheduleLinks.CreateVarLink(zVAR)
  Debug.Print zPFS_SCL.Name
  'enumerate ScheduleLinks
  For i = 0 To zPFS_SCD.ScheduleLinks.Count - 1
	Set zPFS_SCL = zPFS_SCD.ScheduleLinks.Item(i)
	Debug.Print "Nr." & i & ": " & zPFS_SCL.Name & " [" & zPFS_SCL.Type & "]"
  Next i
  Set zPFS_SCL = Nothing
  'delete ScheduleLinks
  zPFS_SCD.ScheduleLinks.DeleteVarLink ("MyVAR")
  'save changes
  zPFS.Save
End Sub