Skip to main content
Version: 8.1

Vision - Equipment Schedule Scripting

This page details the various component and extension functions available for Vision's Equipment Schedule component.

Component Functions​

.getDateAt(event)​

New in 8.1.10

  • Description

    • Returns a date time representing a point in time at the mouse event position.
  • Parameters

    • Event Object - A mouse event object.
  • Return

    • Date - A datetime, representing a point in time on the chart where the mouse event occurred.

Extension Functions​

onBackgroundDragged​

  • Description

    • Called when the user drags a segment on the schedule background.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int itemID - The ID of the equipment item of the row where the user dragged.

    • Date startDate - The datetime corresponding to where the user started dragging.

    • Date endDate - The datetime corresponding to where the user ended dragging.

    • Event Object event - The mouse event.

  • Return

    • None

onEventClicked​

  • Description

    • Called when the user clicks on a scheduled event. Use event.clickCount to detect double clicks.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int itemID - The ID of the equipment item of the event that was clicked on.

    • int eventId - The ID of the event that was clicked on.

    • Event Object event - The mouse event.

  • Return

    • None

onEventDropped​

  • Description

    • Called when the user drags and drops a scheduled event. It is up to this script to actually alter the underlying data to reflect the schedule change.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int eventId - The ID of the scheduled event that was moved.

    • int oldItemId - The ID of the item this event was originally correlated against.

    • int newItemId - The ID of the item whose schedule the event was dropped on.

    • Date oldStartDate - The original starting datetime of the event.

    • Date newStartDate - The new starting datetime of the event.

    • Date newEndDate - The new ending datetime of the event.

  • Return

    • None

onEventPopupTrigger​

  • Description

    • Called when the user right-clicks on a scheduled event. This would be the appropriate time to create and display a popup menu.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int itemId - The ID of the equipment item of the event that was right-clicked on.

    • int eventId - The ID of the event that was right-clicked on.

    • Event Object event - The mouse event that caused the popup trigger.

  • Return

    • None

onEventResized​

  • Description

    • Called when the user drags the edge of an event to resize its time span. It is up to this script to actually alter the underlying data to reflect the schedule change.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int eventId - The ID of the scheduled event that was resized.

    • int itemId - The ID of the item this event is correlated against.

    • Date oldStartDate - The original starting datetime of the event.

    • Date oldEndDate - The original ending datetime of the event.

    • Date newStartDate - The new starting datetime of the event.

    • Date newEndDate - The new ending datetime of the event.

  • Return

    • None

onPopupTrigger​

  • Description

    • Called when the user right-clicks outside of an event. This would be the appropriate time to create and display a popup menu.
  • Parameters

    • Component self - A reference to the component that is invoking this function.

    • int itemId - The item ID of the equipment line that was clicked on (if any).

    • Event Object event - The mouse event that caused the popup trigger.

  • Return

    • None