Movicon Help on Line - Rel. 11.7.1301
The Scheduler objects can also be used to set and manage holidays. When a Scheduler is enabled through the appropriate property to allow this, it will memorize internally the dates set as holidays. This allows you to use two types of planning, one for normal planning and one for holiday planning, both of which can be set by means of using the "Scheduler Window" object.
The holidays are checked only when the Scheduler is a 'Date' type or 'Daily plan' type by checking the day and month of the holiday date only (if they correspond with the current day and month). The remaining date field is not checked.
The holidays are only managed when the Scheduler is 'Date' type or 'Daily plan' type in the two following modes:
Daily Plan: By means of using the "Scheduler Window" object, you will be able set two different daily plans: normal and holidays. The Scheduler object's "Holiday Button" is used to switch from one daily plan to another. The hours in both of the two plans are composed of a 24/7 grid. The holiday daily plan settings are divided in periods of 15 minutes. The periods selected in the holiday daily plan are represented in grey for default; while the normal ones are in blue. At this point, the Scheduler will use the appropriate daily plan according to whether the day has been set as a holiday or not
Date: In addition to set date, the scheduler will also execute the preset command the date set as a holiday.
Setting Holidays
In order to set holidays, you will need to use the VBA methods from the "SchedulerCmdTarget" interface. The methods available for managing holidays are:
AddHoliday: allows a holiday to be added to the scheduler object.
RemoveHoliday: allows a holiday to be deleted from the scheduler object.
HasHolidays: lets you know in write whether the scheduler object has been set for managing holidays.
IsHoliday: allows you to verify whether a date has been set as a holiday in the scheduler object.
GetHolidaysString: returns a string divided by a pre-selected separator character (parameter from function) with the list of all the holiday dates set in the scheduler object.
HolidaysPlan: allows you to read the current weekly daily plan from a "Daily plan" scheduler.
SaveRetentive: allows you to save the daily plans (normal or holiday) and the days of the holidays on external files which will be retained after application re-startup.
You can also set a list of holiday dates by editing XML files which must be saved in the project folder with the same name of the project and "defhol" extension. All the "fixed Date" type schedulers, which do not have holiday lists, will use those defined in XML file with the ".defhol" extension as their holidays.
When a ".defhol" file cannot be found in the project folder, it will be searched for in the Movicon installation folder with the fixed "Holidays.defhol" name.
The XML file with the holidays list is read only at the project startup and any modifications to the file will not be managed until the project is re-started. |
The Holiday XML file structure must be in the same way as shown below:
<?xml version="1.0" encoding="ISO-8859-1" ?> <DefaultHolidays> <HolidaysDates n0="2000-01-01T00:00:00Z" n1="2000-01-06T00:00:00Z" n2="2000-04-25T00:00:00Z" n3="2000-05-01T00:00:00Z" n4="2000-06-02T00:00:00Z" n5="2000-08-15T00:00:00Z" n6="2000-11-01T00:00:00Z" n7="2000-12-08T00:00:00Z" n8="2000-12-25T00:00:00Z" n9="2000-12-26T00:00:00Z" /> </DefaultHolidays> |
This example shows the Italian national holidays.