Classes

Classes, Alert, Application, Array, Assignment, Calendar, CalendarEvent, Color, ColorSpace, Console, Data, Dependency, DependencyKind, Document, PlanDocument, Duration, Error, FilePicker, FileSaver, FileType, FileWrapper, FileWrapper.Type, Form, Form.Field, Form.Field.Checkbox, Form.Field.Date, Form.Field.Option, Form.Field.String, Function, Image, MenuItem, PlugIn, PlugIn.Action, PlugIn.Handler, PlugIn.Handler.Registration, PlugIn.Library, Project, Promise, Resource, ResourceAssignmentType, ResourceType, Scenario, Schedule, Selection, Task, TaskType, Timer, ToolbarItem, URL, Version, Window

Alert

An alert interface for displaying information to the user, blocking further interaction until the alert is dismissed.

Constructors

new Alert(title:String, message:String)Alert

Create a new alert panel with the given title and text contents.

Instance Functions

function show(callback:Function or null)Promise

Displays the alert, unless an alert is already being displayed, in which case an error is thrown. If no options have yet been added, a default "OK" option is added. Once the user selects an option, the alert is dismissed. If a callback function was supplied, it is invoked with the zero-based index of the selected option as its argument. A Promise is returned as well, which may also be used to collect the result of the Alert.

function addOption(string:String)

Adds an option button to the alert.

Application

No documentation available.

Instance Functions

function openDocument(from:Document or null, url:URL, completed:Function)

Attempts to open the specified document and return a reference to it asynchronously. If the document is already open, the reference is passed along. Note that due to platform sandboxing restrictions, opening the document may fail if the application doesn't have currently permission to access the given URL. The document, if any, that is associated with the calling script can be passed along to help grant permission to open the new document. The passed in function will be passed two argument. The first will be either either the Document or an Error. On success, the second argument is a Boolean specifying whether the document was already open.

Instance Properties

var commandKeyDownBoolean read-only

No documentation available.

var controlKeyDownBoolean read-only

No documentation available.

var nameString read-only

Application name.

var optionKeyDownBoolean read-only

No documentation available.

var platformNameString read-only

No documentation available.

var shiftKeyDownBoolean read-only

No documentation available.

var versionString read-only

Application version number.

Array

A JavaScript Array.

Assignment

An Assignment from a Resource to a Task.

Instance Functions

function remove()

Call to delete this assignment, removing it from it's task and resource.

Instance Properties

var isLocalBoolean read-only

Whether this assignment is part of this project or not. A non-local assignment comes from sharing resource loads from a server project repository.

var resourceResource read-only

The Resource of this assignment.

var specificAssignmentsArray of Assignment read-only

When the assigned resource is to a resource group, the specific resources within that group who are actually assigned to do the work.

var taskTask read-only

The Task of this assignment.

var totalCostNumber read-only

Total cost of this assignment.

var totalDurationNumber read-only

Total duration of this assignment.

var totalEffortNumber read-only

Total effort performed during this assignment.

var unitsAssignedNumber

Resource units assigned to this task.

Calendar

No documentation available.

Instance Properties

var eventsArray of CalendarEvent read-only

All events in this calendar.

var nameString read-only

Name of this calendar.

var overtimeBoolean read-only

Whether events in this calendar represents overtime for the resource/project or vacation/off-time.

CalendarEvent

No documentation available.

Instance Properties

var endDate read-only

Ending date for this event.

var startDate read-only

Starting date for this event.

var titleString read-only

Title of this event.

Color

No documentation available.

Class Functions

function RGB(r:Number, g:Number, b:Number, a:Number or null)Color

Makes a new color in the RGB colorspace, with the given components. If the alpha component is not given, 1.0 is used.

function HSB(h:Number, s:Number, b:Number, a:Number or null)Color

Makes a new color in the HSB colorspace, with the given components. If the alpha component is not given, 1.0 is used.

function White(w:Number, a:Number or null)Color

Makes a new color in the White colorspace, with the given components. If the alpha component is not given, 1.0 is used.

Class Properties

var blackColor read-only

A color in the White colorspace with white component of 0.0.

var blueColor read-only

A color in the RGB colorspace with components (0, 0, 1, 1).

var brownColor read-only

A color in the RGB colorspace with components (0.6, 0.4, 0.2, 1).

var clearColor read-only

A color in the White colorspace with white component of 0.0 and alpha of 0.0 ("transparent black").

var cyanColor read-only

A color in the RGB colorspace with components (0, 1, 1, 1).

var darkGrayColor read-only

A color in the White colorspace with white component of 0.333.

var grayColor read-only

A color in the White colorspace with white component of 0.5.

var greenColor read-only

A color in the RGB colorspace with components (0, 1, 0, 1).

var lightGrayColor read-only

A color in the White colorspace with white component of 0.667.

var magentaColor read-only

A color in the RGB colorspace with components (1, 0, 1, 1).

var orangeColor read-only

A color in the RGB colorspace with components (1, 0.5, 0, 1).

var purpleColor read-only

A color in the RGB colorspace with components (1, 0, 1, 1).

var redColor read-only

A color in the RGB colorspace with components (1, 0, 0, 1).

var whiteColor read-only

A color in the White colorspace with white component of 1.0.

var yellowColor read-only

A color in the RGB colorspace with components (1, 1, 0, 1).

Instance Functions

function blend(otherColor:Color, fraction:Number)Color or null

Returns a new color that is a linear combination of the receiver and fraction of the other color (so, a fraction of 1.0 would just return the otherColor. If the colors cannot be blended (for example, if they cannot be converted to the same colorspace), then null is returned.

Instance Properties

var alphaNumber read-only

Returns the alpha component of the color.

var blueNumber read-only

Returns the blue component of the color, after converting to a RGB colorspace.

var brightnessNumber read-only

Returns the brightness component of the color, after converting to a HSB colorspace.

var colorSpaceColorSpace read-only

Returns the colorspace of the instance.

var greenNumber read-only

Returns the green component of the color, after converting to a RGB colorspace.

var hueNumber read-only

Returns the hue component of the color, after converting to a HSB colorspace.

var redNumber read-only

Returns the red component of the color, after converting to a RGB colorspace.

var saturationNumber read-only

Returns the saturation component of the color, after converting to a HSB colorspace.

var whiteNumber read-only

Returns the white component of the color, after converting to a White colorspace.

ColorSpace

No documentation available.

Class Properties

var CMYKColorSpace read-only

A colorspace with cyan, magenta, yellow, black, and alpha components.

var HSBColorSpace read-only

A colorspace with hue, saturation, and value (or brightness) components.

var NamedColorSpace read-only

A space for named colors, like system defined colors, or specific color palette spaces.

var PatternColorSpace read-only

A colorspace that wraps a pattern image.

var RGBColorSpace read-only

The sRGB colorspace with red, green, blue, and alpha components.

var WhiteColorSpace read-only

A colorspace with white and alpha components.

var allArray of ColorSpace read-only

An array of all items of this enumeration.

Console

The Console allows scripts to log debugging, warning, or error information where it can be viewed in the system console or in the console output area. A single instance of Console is available to scripts as the console global variable.

Instance Functions

function log(message:Object, additional:Array of Object or null)

Appends a line to the application console formed by concatenating the given message (after converting it to a String), any additional arguments separated by spaces, and finally a newline.

function error(message:Object, additional:Array of Object or null)

No documentation available.

function info(message:Object, additional:Array of Object or null)

No documentation available.

function warn(message:Object, additional:Array of Object or null)

Just calls Console.log, currently.

function clear()

Clears the console in the user-visible window.

Data

A generic bag of bytes. Mainly useful to be interpreted / converted to some other type.

Class Functions

function fromString(string:String)Data

Convert from a String to the UTF8 encoding of that string as Data

function fromBase64(string:String)Data

No documentation available.

Instance Functions

function toString()String

Convert to a String, assuming that this Data is encoded as UTF8.

function toBase64()String

Convert to a Base-64 encoded string.

Instance Properties

var lengthNumber read-only

Number of bytes in this data.

var toObjectObject or null read-only

No documentation available.

Dependency

A Dependency between two tasks.

Instance Functions

function remove()

Call to delete this dependency, removing it from it's prerequisite and dependent tasks.

Instance Properties

var dependentTask read-only

The dependent of this dependency, which is the target Task whose schedule is effected.

var dependentAlignedToEndBoolean

Whether this dependency aligned to the start or the end date of its dependent task.

var kindDependencyKind

The kind of dependency.

var leadTimeDurationDuration or null

The lead time before the dependent task, as a duration.

var leadTimePercentageNumber or null

The lead time before the dependent task, as a percentage of the duration of the prerequisite.

var prerequisiteTask read-only

The prerequisite of this dependency, which is the source Task that helps determine when the target Task is scheduled.

var prerequisiteAlignedToEndBoolean

Whether this dependency aligned to the start or the end date of its prerequisite task.

DependencyKind

No documentation available.

Class Properties

var FinishFinishDependencyKind read-only

From finish of prerequisite to finish of dependent.

var FinishStartDependencyKind read-only

From finish of prerequisite to start of dependent.

var InvalidDependencyKind read-only

An invalid dependency kind.

var StartFinishDependencyKind read-only

From start of prerequisite to end finish of dependent.

var StartStartDependencyKind read-only

From start of prerequisite to start of dependent.

var allArray of DependencyKind read-only

An array of all items of this enumeration.

Document

No documentation available.

Class Functions

function makeNew(resultFunction:Function)

Create a new document, which can be populated with data and then presented. On iOS, if the document is not presented by the time the resultFunction returns, it will be closed. On macOS, the document will be left around and accessible to the running script. The resultFunction will be passed either the new document or an Error if there was a problem creating the document.

function makeNewAndShow(resultFunction:Function)

Create a new document and presents it. The resultFunction will be passed either the new document or an Error if there was a problem creating the document.

Instance Functions

function close(didCancel:Function or null)

Close this document. If for some reason the document cannot be closed, the didCancel function may be called at some point in the future, with the original document as the single argument. For example, on the Mac the user may review unsaved changes and may cancel the close operation. If the document is closed, the didCancel function will not be called at all.

function save()

Save this document.

function fileWrapper(type:String or null)FileWrapper

Deprecated: Please use makeFileWrapper() instead. Returns a new FileWrapper representing the contents of the document formatted as the specified type, or its current fileType if a null is passed for the type.

function makeFileWrapper(baseName:String, type:String or null)Promise

Generates a FileWrapper representing the contents of the document formatted as the specified type, or its current fileType if a null is passed for the type. Returns a Promise that will yield the file wrapper or an error. The returned file wrapper will have a name based off the given baseName and the default path extension for the requested file type.

function undo()

Undo the last done action.

function redo()

Redo the last undone action.

function show(resultFunction:Function or null)

Presents the document, ordering the window forward on macOS, and possibly closing the existing document and opening the new on on iOS.

Instance Properties

var canRedoBoolean read-only

Whether there are currently any actions that can be redone.

var canUndoBoolean read-only

Whether there are currently any actions that can be undone.

var fileTypeString or null read-only

The file type identifier the document uses when saving, if set.

var nameString or null read-only

Document name.

var writableTypesArray of String read-only

A list of all of the file types that this document can be written as.

PlanDocument: Document

An OmniPlan document.

Instance Properties

var projectProject read-only

Project stored in this document.

var windowsArray of Window read-only

Currently open windows viewing this document.

Duration

A duration.

Class Functions

function workSeconds(s:Number)Duration

No documentation available.

function workHours(h:Number)Duration

No documentation available.

function elapsedHourMinSec(h:Number, m:Number, s:Number)Duration

No documentation available.

function elapsedDays(d:Number)Duration

No documentation available.

function elapsedYearMonthDay(y:Number, m:Number, d:Number)Duration

No documentation available.

Instance Properties

var elapsedBoolean read-only

Whether or not this duration is measured in project time or elapsed calendar time.

var elapsedDaysNumber read-only

Number of days, for a duration measued in elapsed time.

var elapsedHoursNumber read-only

Number of hours, for a duration measued in elapsed time.

var elapsedMinutesNumber read-only

Number of minutes, for a duration measued in elapsed time.

var elapsedMonthsNumber read-only

Number of months, for a duration measued in elapsed time.

var elapsedSecondsNumber read-only

Number of seconds, for a duration measued in elapsed time.

var elapsedWeeksNumber read-only

Number of weeks, for a duration measued in elapsed time.

var elapsedYearsNumber read-only

Number of years, for a duration measued in elapsed time.

var workSecondsNumber read-only

Number of project schedule work-seconds of duration, for a duration measured in project time.

Error

FilePicker

A FilePicker allows the user to select URLs for files via the system-supplied file picking interface.

Constructors

new FilePicker()FilePicker

Returns a new FilePicker with default settings.

Instance Functions

function show()Promise

Presents the system file selection interface to the user, allowing them to choose one or more files of the given types. The returned Promise will yield the chosen URLs on success. If the user cancels chosing, the Promise will be rejected. Note that even when picking a single file or folder, the result will be an array of URLs.

Instance Properties

var foldersBoolean

If true, then folders may be selected, but not files. In this case, types is ignored. Defaults to false.

var messageString

A message to display describing what files are being picked. This is currently only supported on macOS.

var multipleBoolean

If true, then multiple files may be selected. Defaults to false.

var typesArray of FileType or null

The file types that will be allowed. If null, all file types will be allowed. Defaults to null.

FileSaver

A FileSaver allows the user to save a FileWrapper to a URLs via the system-supplied file picking interface.

Constructors

new FileSaver()FileSaver

Returns a new FileSaver with default settings.

Instance Functions

function show(fileWrapper:FileWrapper)Promise

Presents the system file saving interface to the user, allowing them to choose a location and file name to save the file wrapper. The returned Promise will yield the chosen URL on success. If the user cancels chosing, the Promise will be rejected.

Instance Properties

var messageString

A message to display describing what file is being saved. This is currently only supported on macOS.

var nameLabelString

The label shown next to the user-editable file name field. This is currently only supported on macOS.

var promptString

The prompt shown on the the save button. This is currently only supported on macOS.

var typesArray of FileType or null

The file types that will be allowed. If null, all file types will be allowed. Defaults to null.

FileType

No documentation available.

Class Properties

var binaryPropertyListFileType read-only

The binary property list file type.

var csvFileType read-only

The comma-separated text file type.

var editableTypesArray of FileType read-only

The list of FileTypes that can be read and written natively by documents in this application.

var gifFileType read-only

The GIF image file type.

var imageFileType read-only

A generic file type that all image types conform to.

var jpegFileType read-only

The JPEG image file type.

var jsonFileType read-only

The JSON file type.

var pdfFileType read-only

The PDF file type.

var plainTextFileType read-only

The plain text file type.

var pngFileType read-only

The PNG image file type.

var propertyListFileType read-only

The generic property list file type.

var readableTypesArray of FileType read-only

The list of FileTypes that can be read by documents in this this application.

var rtfFileType read-only

The RTF file type.

var rtfdFileType read-only

The RTFD file type.

var tiffFileType read-only

The TIFF image file type.

var writableTypesArray of FileType read-only

The list of FileTypes that can be written by documents in this application (though some documents may be exportable only in a subset of these types).

var xmlPropertyListFileType read-only

The XML property list file type.

Constructors

new FileType(identifier:String)FileType

Returns a new FileType with the given identifier.

Instance Functions

function conformsTo(fileType:FileType)Boolean

Returns true if the instance is the same as the given argument or a more specific type. For example, FileType.png.conformsTo(FileType.image) will be true, but FileType.png.conformsTo(FileType.plainText) will be false.

Instance Properties

var displayNameString read-only

Returns a human-readable description of the file type.

var identifierString read-only

Returns a unique identifier for a file type, suitable for archiving or encoding in scripts.

var pathExtensionsArray of String read-only

The list of filesystem path extensions used by this file type.

FileWrapper

No documentation available.

Class Functions

function withContents(name:String or null, contents:Data)FileWrapper

Returns a new FileWrapper that represents a flat file containing the given data.

function withChildren(name:String or null, children:Array of FileWrapper)FileWrapper

Returns a new FileWrapper that represents a directory with the given child file wrappers. Each child file wrapper must have a unique name specified.

Instance Functions

function filenameForChild(child:FileWrapper)String or null

Returns the unique file name that will be used for the given child FileWrapper, or null if this file wrapper is not a child of the receiver.

Instance Properties

var childrenArray of FileWrapper read-only

Returns an Array of child FileWrappers, if this represents a directory. Otherwise, an empty array is returned.

var contentsData or null read-only

Returns the regular file contents of the wrapper, if this represents a regular file. Otherwise, null is returned.

var destinationURL or null read-only

Returns the destination if this represents a symbolic link. Otherwise, null is returned.

var filenameString or null

Returns the actual file name that was last read for this file wrapper. Depending on the names of other sibling wrappers, this may not be what file name will be written.

var preferredFilenameString or null

Returns the preferred file name that should be used when writing the file wrapper if no other file in the same parent directory wrapper is in use.

var typeFileWrapper.Type read-only

Returns the type of this FileWrapper.

FileWrapper.Type

No documentation available.

Class Properties

var DirectoryFileWrapper.Type read-only

A FileWrapper that represents a directory with zero or more child wrappers.

var FileFileWrapper.Type read-only

A FileWrapper that represents a regular file with data contents.

var LinkFileWrapper.Type read-only

A FileWrapper that represents a symbolic link to another location.

var allArray of FileWrapper.Type read-only

An array of all items of this enumeration.

Form

Form provides a mechanism to collect input from the user. Each form contains one or more instances of subclasses of Field, which are given a key. As the form is filled out, values object is populated with the values from the user interface.

Constructors

new Form()Form

No documentation available.

Instance Functions

function addField(field:Form.Field, index:Number or null)

Adds the new Field to the Form, at the indicated position, or at the end if no position is specified. If the field has a default value, it will be added to the values result object immediately.

function removeField(field:Form.Field)

Removes the Field from the Form. Any entry in the values` for this field will be removed as well.

function show(title:String, confirmTitle:String)Promise

Present the Form to the user, and return a Promise to be fullfilled or rejected when the user commits or cancels the form.

Instance Properties

var fieldsArray of Form.Field read-only

The current Field instances in the form, which will be visible to the user entering input.

var validateFunction or null

A function to check whether the entered values are acceptable. The form to validate is passed as the argument and the function is expected to return a boolean result. If an Error is thrown, it's message will be displayed in the form as the reason for validation failure. Note that the validation function may add or remove fields and update entries in the values object (which will cause the interface to be updated). This is called any time the user edits values, or a field is added or removed.

var valuesObject read-only

An object with the collected values for each field, stored under the key for that field.

Form.Field

A single entry for a user input value in a Form. Each field can only be added to a single Form. This class cannot be constructed directly.

Instance Properties

var displayNameString or null read-only

Human readable string used as the label for this field.

var keyString read-only

Key to use when storing the value for this field in the containing form's values object.

Form.Field.Checkbox: Form.Field

No documentation available.

Constructors

new Form.Field.Checkbox(key:String, displayName:String or null, value:Boolean or null)Form.Field.Checkbox

Returns a new Checkbox field, optionally with an initial value (which will be false if no value is specified).

Form.Field.Date: Form.Field

No documentation available.

Constructors

new Form.Field.Date(key:String, displayName:String or null, value:Date or null)Form.Field.Date

Returns a new Date field, optionally with an initial value. The user's date formatting preference will be used to display and determine component ordering when parsing dates. Relative dates like "1d", "tomorrow", "now" can also be entered.

Form.Field.Option: Form.Field

No documentation available.

Constructors

new Form.Field.Option(key:String, displayName:String or null, options:Array of Object, names:Array of String or null, selected:Object or null)Form.Field.Option

Returns a new Option field, allowing the user to pick from a list of option objects. A list of names may also be given, which must have the same length as the options array if so. If no names are given, the objects are converted to strings for display. An initially selected object (which must be a member of the options array) may also be given.

Form.Field.String: Form.Field

A field for entering a free-form String value.

Constructors

new Form.Field.String(key:String, displayName:String or null, value:String or null)Form.Field.String

Returns a new String field, optionally with an initial value.

Function

An object that represents a JavaScript function, allowing native code to call into JavaScript or JavaScript to call into native code.

Image

No documentation available.

MenuItem

No documentation available.

Instance Properties

var checkedBoolean

If true, a checkmark is displayed next to the MenuItem's label.

var labelString

The string displayed to describe the MenuItem's action.

PlugIn

No documentation available.

Class Functions

function find(identifier:String, minimumVersion:Version or null)PlugIn or null

No documentation available.

Class Properties

var allArray of PlugIn read-only

No documentation available.

Instance Functions

function library(identifier:String)Object or null

Looks for a PlugIn.Library in the receiver and returns it if found.

function action(identifier:String)PlugIn.Action or null

No documentation available.

function handler(identifier:String)PlugIn.Handler or null

No documentation available.

function resourceNamed(name:String)URL or null

No documentation available.

function imageNamed(name:String)Image or null

No documentation available.

Instance Properties

var URLURL or null read-only

Returns the original URL from whence this PlugIn came, if known.

var actionsArray of PlugIn.Action read-only

No documentation available.

var displayNameString read-only

Returns the localized, human-readable name for the PlugIn.

var handlersArray of PlugIn.Handler read-only

No documentation available.

var identifierString read-only

The unique identifier of the PlugIn.

var librariesArray of PlugIn.Library read-only

No documentation available.

var versionVersion read-only

Returns the current Version for the PlugIn.

PlugIn.Action

No documentation available.

Constructors

new PlugIn.Action(perform:Function)PlugIn.Action

Returns a new PlugIn.Action. Only used within an action JavaScript file embedded within a PlugIn.

Instance Properties

var nameString read-only

Returns the name of the PlugIn.Action.

var performFunction read-only

No documentation available.

var plugInPlugIn read-only

Returns the PlugIn that contains this object.

var validateFunction or null

A function to check whether the action is supported, given the current application state, as determined by the arguments passed (typically including the selection). This optional Function may be configured while the Action is being loaded, but after that the Action will be frozen.

PlugIn.Handler

No documentation available.

Constructors

new PlugIn.Handler(invoke:Function)PlugIn.Handler

Returns a new PlugIn.Handler. Only used within an handler JavaScript file embedded within a PlugIn.

Instance Properties

var invokeFunction read-only

The Function that will be executed for each handler registered for an event posted by an application object.

var nameString read-only

Returns the name of the PlugIn.Handler.

var plugInPlugIn read-only

Returns the PlugIn that contains this object.

var willAttachFunction or null

An optional Function that can be set on PlugIn.Handler as it is being loaded (but not after). This function is passed the application object that post events to trigger the handler. The return value should be a state object that is JSON archivable (or undefined if the handler has no state to maintain across invocations).

var willDetachFunction or null

An optional Function that can be set on PlugIn.Handler as it is being loaded (but not after). Called when a previously attached PlugIn.Handler is being detached from an application object. Any return value or thrown error are ignored.

PlugIn.Handler.Registration

No documentation available.

Instance Functions

function remove()

Removes a previously added event observation.

PlugIn.Library

An object that represents a library from a plug-in.

Constructors

new PlugIn.Library(version:Version)PlugIn.Library

Returns a new Library. Typically only used within a library JavaScript file embedded within a PlugIn.

Instance Properties

var nameString read-only

Returns the name of the PlugIn.Library.

var plugInPlugIn read-only

Returns the PlugIn that contains this object.

var versionVersion read-only

Returns the Version of this library, as passed to the constructor.

Project

A Project represents the main contents of an OmniPlan Document and is used as the global object in any scripting session that is related to a particular document.

Instance Functions

function baselineNamed(name:String)Scenario or null

Load the given named baseline scenario, if necessary, and return it.

Instance Properties

var actualScenario read-only

The scenario containing actual values for all tasks and resources, as opposed to baselines.

var baselineNamesArray of String read-only

Names of all of the baseline scenarios.

var documentPlanDocument or null read-only

Document that stores this project.

var titleString

Title of this project.

Promise

The built-in JavaScript Promise constructor.

Resource

A Resource.

Instance Functions

function addMember()Resource

Create new resource member and makes this resource into a group.

function descendents()Array of Resource

All descendents from this group.

function remove()

Delete this resource and remove it from the project, along with any associated assignments.

Instance Properties

var assignmentsArray of Assignment read-only

Assignments of this resource to tasks.

var completedCostNumber read-only

Expenditure on this resource that has already happened for work performed.

var costPerHourNumber

Cost per hour of work performed.

var costPerUseNumber

Cost per task that this resource is assigned to.

var efficiencyNumber

Amount of work actually performed per time. Defaults to 1.0 (100%).

var emailString or null

Email address of this resource.

var membersArray of Resource read-only

Member resources of this group.

var nameString

Name of this resource.

var noteString

Note for this resource.

var scheduleSchedule read-only

Schedule for this resource.

var totalCostNumber read-only

Total planned expenditure on this resource.

var totalHoursNumber read-only

Total assigned hours.

var typeResourceType

Resource type for this resource.

var uniqueIDNumber read-only

Unique ID number of this resource.

var unitsAvailableNumber

Number of units of this resource available for this project.

ResourceAssignmentType

No documentation available.

Class Properties

var adjustAssignedUnitsResourceAssignmentType read-only

When changing resource assignments, adjust other assignments' units.

var adjustDurationResourceAssignmentType read-only

When changing resource assignments, adjust the task duration.

var adjustEffortResourceAssignmentType read-only

When changing resource assignments, adjust the task effort.

var allArray of ResourceAssignmentType read-only

An array of all items of this enumeration.

ResourceType

No documentation available.

Class Properties

var allArray of ResourceType read-only

An array of all items of this enumeration.

var equipmentResourceType read-only

A resource that is shared amongst tasks like staff but normally contributes no work itself (efficiency defaults to zero).

var groupResourceType read-only

A group of other resources.

var materialResourceType read-only

A material - instead of having limited units to be shared amongst tasks, materials count up their total uses.

var staffResourceType read-only

A normal resource that performs work.

Scenario

A Scenario represents a set of tasks and resources and associated schedules. The actuals for a project are one scenario, and saved baselines are the others.

Instance Functions

function taskNamed(name:String)Task or null

Get a given task by name. If there is more than one with the same name, only returns the first.

function resourceNamed(name:String)Resource or null

Get a given resource by name. If there is more than one with the same name, only returns the first.

Instance Properties

var completedNumber read-only

Overall project percentage completed.

var endDateDate

Overall project end date.

var hasFixedEndDateBoolean

Whether tasks in this scenario scheduled forward from a fixed overall start, or backwards from a fixed overall end.

var hasGenericDatesBoolean

Generic dates (e.g. "Day 1", "Day 12") vs actual dates (e.g. "Jan 1, 2019")

var milestonesArray of Task read-only

A list of all milestones in the project.

var nameString

Name of this scenario.

var rootResourceResource read-only

Root resource of the project. This is a hidden group which contains all top-level resources.

var rootTaskTask read-only

Root task of the project. This is a hidden group which contains all top-level tasks.

var scheduleSchedule read-only

The overall project schedule.

var startDateDate

Overall project start date.

var totalCostNumber read-only

Overall project total cost.

Schedule

No documentation available.

Instance Functions

function endDate(start:Date, duration:Duration)Date

Compute the end date for a given start date and duration in this schedule.

function startDate(end:Date, duration:Duration)Date

Compute the start date for a given end date and duration in this schedule.

function durationBetween(start:Date, end:Date)Duration

Compute the work-second duration between a given start date and end date in this schedule.

Instance Properties

var calendarsArray of Calendar read-only

All calendars in this schedule. OmniPlan manages two built-in calendars for each schedule: an off-time calendar and an overtime calendar. Additional calendars may be added by synchronizing with Calendar.app or ical URLs, etc.

Selection

The 'selection' argument to plugin actions, letting them inspect the selection.

Instance Properties

var documentPlanDocument or null read-only

The current document.

var projectProject or null read-only

The current project.

var resourcesArray of Resource read-only

The currently selected resources.

var tasksArray of Task read-only

The currently selected tasks.

var windowWindow or null read-only

The current window.

Task

A Task.

Instance Functions

function descendents()Array of Task

All tasks which are descended from this one.

function clearResourceLeveledDate()

Remove the effects of resource leveling from this task.

function addPrerequisite(to:Task)Dependency

Create a new dependency where the passed in task is the prerequisite and this task is the dependent.

function addDependent(to:Task)Dependency

Create a new dependency where the passed in task is the dependent and this task is the prerequisite.

function addAssignment(to:Resource)Assignment

Create a new assignment to the given resource.

function addSubtask()Task

Create a new subtask, and making this task into a group.

function split(at:Date, resumingAt:Date)Boolean

Divide this task into multiple split chunks, with the same name, overall effort, and assignments, but with any duration after the split date moved to begin at the resume date.

function remove()

Delete this task and remove it from the project, along with any associated dependencies and assignments.

Instance Properties

var absoluteEndLimitDate read-only

Latest that this task could end without effecting the overall start or end of the project.

var absoluteStartLimitDate read-only

Earliest that this task could start without effecting the overall start or end of the project.

var assignmentsArray of Assignment read-only

Resources assigned to this task.

var assignmentsCostNumber read-only

The cost of assigned resources to this task (per use and per hour costs).

var currentEndLimitDate read-only

Latest that this task could end without effecting any other connected task.

var currentStartLimitDate read-only

Earliest that this task could start without effecting any other connected task.

var dependentsArray of Dependency read-only

Dependencies where this task is the prerequisite task.

var durationDuration

Duration of the task.

var effortNumber

Total effort needed to complete this task in person-seconds.

var effortDoneNumber

Effort already accomplished upon this task in person-seconds.

var effortRemainingNumber

Effort remaining until completion of this task in person-seconds.

var endDateDate read-only

Scheduled end date.

var endNoEarlierThanDateDate or null

Constraint that this task must end no earlier than the given date, if any.

var endNoLaterThanDateDate or null

Constraint that this task must end no later than the given date, if any.

var expectedEffortEstimateNumber

Three-point estimation expected effort estimate in person-seconds.

var freeSlackNumber read-only

Free slack (or float) is how much time a task can be delayed before any other connected task is effected.

var lockedEndDateDate or null

Locked end date of this task, if any.

var lockedStartDateDate or null

Locked start date of this task, if any.

var maxEffortEstimateNumber

Three-point estimation maximum effort estimate in person-seconds.

var minEffortEstimateNumber

Three-point estimation minimum effort estimate in person-seconds.

var noteString

Note for this task.

var prerequisitesArray of Dependency read-only

Dependencies where this task is the dependent task.

var priorityNumber

Priority of this task during resource leveling. The higher the priority, the sooner leveling will attempt to schedule the task.

var resourceAssignmentTypeResourceAssignmentType

How this task should react when resources are assigned to it.

var resourceLeveledDateDate or null read-only

The date that resource leveling has determined that this task ought to be scheduled at. May be missing if resource leveling isn't needed to place this task. (E.g. if the task is already locked or otherwise already scheduled at an appropriate date.)

var resourceLevelingDelayNumber read-only

The amount of time that resource leveling needs to delay this task beyond when it could otherwise be scheduled.

var startDateDate read-only

Scheduled start date.

var startNoEarlierThanDateDate or null

Constraint that this task must start no earlier than the given date, if any.

var startNoLaterThanDateDate or null

Constraint that this task must start no later than the given date, if any.

var staticCostNumber

The built-in cost of performing this task.

var subtasksArray of Task read-only

Child tasks contained within this task group, or split chunks of this task, if it is split.

var titleString

Title of this task.

var totalCostNumber read-only

The sum of static and assignment costs.

var totalSlackNumber read-only

Total slack (or float) is how much time a task can be delayed before effecting the overall start or end of the project.

var typeTaskType

Type of this task.

var uniqueIDNumber read-only

Unique ID number of this task.

TaskType

No documentation available.

Class Properties

var allArray of TaskType read-only

An array of all items of this enumeration.

var groupTaskType read-only

A container for other tasks.

var hammockTaskType read-only

A task whose length is determined by its dependencies rather than from a fixed effort or duration.

var milestoneTaskType read-only

A milestone. Has zero duration.

var taskTaskType read-only

A standard task.

Timer

No documentation available.

Class Functions

function once(interval:Number, action:Function)Timer

Makes a new Timer that will fire once, after the specified interval (in seconds from the current time). When the Timer fires, the passed in Function is called, passing the Timer as its argument.

function repeating(interval:Number, action:Function)Timer

Makes a new Timer that will fire repeatedly with the specified interval (in seconds, with the first invocation happening that interval after the current time). When the Timer fires, the passed in Function is called, passing the Timer as its argument.

Instance Functions

function cancel()

No documentation available.

Instance Properties

var intervalNumber read-only

No documentation available.

ToolbarItem

No documentation available.

Instance Properties

var imageImage or null

No documentation available.

var labelString

No documentation available.

var toolTipString or null

No documentation available.

URL

No documentation available.

Class Functions

function choose(types:Array of String)URL or null

Deprecated: Please use FilePicker instead.

Allows the user to choose a file URL if possible and returns a new instance, or null otherwise.

function chooseFolder()URL or null

Deprecated: Please use FilePicker instead.

Allows the user to choose a folder URL if possible and returns a new instance, or null otherwise.

function fromString(string:String)URL or null

Parses the string as a URL if possible and returns a new instance, or null otherwise.

function tellScript(app:String, js:String, arg:Object or null)URL or null

Creates a URL to invoke the given JS on the given app (url scheme) appropriate for use with the call function.

function tellFunction(app:String, jsFunction:Function, arg:Object or null)URL or null

Creates a URL to invoke the given JS function on the given app (url scheme) appropriate for use with the call function.

Instance Functions

function fetch(success:Function, failure:Function or null)

Get the contents at the destination of this URL.

function call(success:Function, failure:Function or null)

No documentation available.

function find(types:Array of FileType, recurse:Boolean or null)Promise

Scan a directory URL for files of the given types. If recurse is specified and is false, only the immediate contents of the directory will be considered. If recurse is not specified or is true, the full directory tree will be scanned.

function toString()String

No documentation available.

Instance Properties

var stringString read-only

String representation of this URL.

var toObjectObject or null read-only

No documentation available.

Version

No documentation available.

Constructors

new Version(versionString:String)Version

Parses a string representation of a Version and returns an instance, or throws an error if the string isn't a valid version.

Instance Functions

function equals(version:Version)Boolean

Returns true if the receiving Version is equal to the argument Version.

function atLeast(version:Version)Boolean

Returns true if the receiving Version is at the same as or newer than the argument Version.

function isAfter(version:Version)Boolean

Returns true if the receiving Version is strictly after the argument Version.

function isBefore(version:Version)Boolean

Returns true if the receiving Version is strictly before the argument Version.

Instance Properties

var versionStringString read-only

Returns as an opaque string representation of the Version, suitable for display or logging. This should never be used in comparisons of any sort.

Window

An OmniPlan window.

Instance Properties

var selectionSelection read-only

Current selection in this window.