Assignment

An assignment.

Properties

Property Type Access Description
assignedStories AssignedStories readonly A collection of assigned stories.
assignmentFileStatus AssignmentStatus :
ASSIGNMENT_UP_TO_DATE
ASSIGNMENT_OUT_OF_DATE
ASSIGNMENT_FILE_MISSING
readonly The status of the assignment file.
documentPath File readonly The path to the document that the hyperlink destination points to.
exportOptions AssignmentExportOptions :
EMPTY_FRAMES
ASSIGNED_SPREADS
EVERYTHING
r/w The content to export in the assignment.
filePath string readonly The file path (a colon delimited path for Mac). Can also accept: File.
frameColor any r/w The color of the assignment's frames. Can return: Array of 3 Reals (0 - 255), UIColors enumerator or NothingEnum enumerator.
id number readonly The unique ID of the Assignment.
includeLinksWhenPackage bool r/w If true, includes linked files when packaging the assignment.
index number readonly The index of the Assignment within its containing object.
label string r/w A property that can be set to any string.
name string r/w The name of the Assignment.
packaged bool readonly If true, the assignment is packaged.
packageUpToDate bool readonly If true, the assignment package is up to date.
parent Document readonly The parent of the Assignment (a Document).
properties Object r/w A property that allows setting of several properties at the same time.
userName string r/w The user name to assign to tracked changes and notes.

Methods

void cancelPackage ()
Cancels the package for an assignment.

File createPackage (filePath: File[, submit: bool=true][, withProperties: Object])
Creates an assignment package.

Parameter Type Description
filePath File The full path name of the assignment package file.
submit bool If true, submits assigned stories before packaging the assignment. (Optional) (default: true)
withProperties Object Initial values for properties of the new Assignment (Optional)

string extractLabel (key: string)
Gets the label value associated with the specified key.

Parameter Type Description
key string The key.

Array of Assignment getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

Parameter Type Description
key string The key.
value string The value.

Assignment remove ()
Deletes the assignment and its file.

string toSource ()
Generates a string which, if executed, will return the Assignment.

string toSpecifier ()
Retrieves the object specifier.

void update ([versionComments: string][, forceSave: bool=false])
Updates the assignment file.

Parameter Type Description
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional) (default: false)

Element of:

AssignedStory.parent

Used in:

Assignments.previousItem ( obj: Assignment)
Assignments.nextItem ( obj: Assignment)

Returned by:

Array of Assignment Assignment.getElements ( )
Assignment Assignment.remove ( )
Assignment Assignments.add ( filePath: File[, versionComments: string][, forceSave: bool=false][, withProperties: Object] )
Assignment Assignments.anyItem ( )
Array of Assignment Assignments.everyItem ( )
Assignment Assignments.firstItem ( )
Assignment Assignments.item ( index: any )
Assignment Assignments.itemByID ( id: number )
Assignment Assignments.itemByName ( name: string )
Array of Assignment Assignments.itemByRange ( from: any, to: any )
Assignment Assignments.lastItem ( )
Assignment Assignments.middleItem ( )
Assignment Assignments.nextItem ( obj: Assignment )
Assignment Assignments.previousItem ( obj: Assignment )