Product: | Elvis |
Version: | from 2.0 |
Booth: | 2005-02-10 |
Summary
Time programs can be deactivated and activated via a small calculation.
Details
Unfortunately, it is not possible to deactivate the time program as a whole, but only the entries contained in a time program (schedule.item). Therefore, all items are deactivated or activated one after the other.
Example project: schedule_disable.zip (108 KB)
The calculation is stored in a data point:
CODE:vb:Dim schedules As Object
Dim schedule As Object
Dim i As Integer
Dim bActive As Boolean
bActive = @(ZP_Active). NominalValue
Set schedules = Database.Schedule(“ZP1”). Schedules
For i = 1 To schedules. Count
Set schedule = schedules. Item(i)
schedule. Enabled = bActive
schedule. Save
Set schedule = Nothing
Next i
Result = bActive
Database.RestartSchedules