Relevant Preactor API methods

Refer to the help files for more information concerning these methods.

UpdatePrimaryResourceCalendar(int resourceRecordNumber)
UpdateSecondaryResourceCalendar(int resourceRecordNumber)

UpdateCalendar(int record) ??? not sure what record this refers to.

CalendarFormat -> Deprecated since version 10.

Preactor.ObjectModelExtensions methods:

bool IsCalendarWindowOpen()

void DeleteAllCalendar


You cannot loadCalendarData() if the Primary or Secondary Calendar window is open, since Preactor will throw an exception.

You can actually use this fact to create an IsCalendarWindowOpen() function to find out if a calendar window is open or not. There is an implementation in Preactor.ObjectModelExtensions which uses this fact.

When Creating new PrimaryCalendarExceptions use the UpdatePrimaryResourceCalendar method to refresh the planning board with the correct data.
In this case you can run these methods with the calendar windows open, because no calendar data is being committed back to the database.

When the user closes the planning board they will be asked then, whether they want to save the changed calendar data.

When deleting rows directly from the Database call PlanningBoard.LoadCalendarData(); to refresh the planning board. It will automatically recalculate operation durations that were effected by calendar exceptions.


POM has a DataCotext that maps the CalendarException table in the SQL database. You can use the DeleteCalendarException() method which accepts a predicate to delete calendar exceptions that have a given state name, or start or end in a given period etc... it is very flexible.

You need to make sure the calendarException data is commited to the database first, and then reload the updated data into Preactor after running the method.

Last edited Oct 3, 2012 at 4:55 AM by bvsms, version 4


No comments yet.