Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Entity

Entity is derived class of VertexElem and represents an entity.

Fields

FieldTypeDescription
isEntitybooleanRead only. Returns True.
titlestringThe title of the Entity.
confidencenumberThe confidence, as a value between 0.0 and 1.0.
canDrivebooleanRead Only. True if this entity can drive confidence; i.e., it has no predecessors ignoring back edges.
completionnumberRead Only. The completion, as a value between 0.0 and 1.0. Zero if project management not enabled.
effortHoursnumberThe effort in hours, as a positive floating-point value or zero for a milestone. Zero if project management not enabled. Prefer setting this over calling setDuration() when changing a task's size — Flying Logic is effort-centric, and effort is the primary scheduling input from which duration is derived.
durationTime or NoneAPI 1.18
Read-only. The calculated duration as a Time. Zero if a milestone. None if project management not enabled. Use setDuration() to change it; prefer effortHours when you know the task size in hours.
startDateDate or NoneThe start date, as a Date. None if project management not enabled.
finishDateDate or NoneThe finish date, as a Date. None if project management not enabled.
startTimeTime or NoneRead only. The start time, as a Time. None if project management not enabled.
finishTimeTime or NoneRead only. The finish time, as a Time. None if project management not enabled.
resourceslist of ResourceRead only. A list of resources assigned to a task. The list can be empty.
resourceAssignmentResource Assignment TypeThe current setting for how resources are assigned to a task.
symbolSymbol or NoneThe directly set symbol for this entity, as a Symbol, otherwise None.
inheritedSymbolSymbol or NoneRead only. The symbol for this entity, either the directly set Symbol or the one inherited from its EntityClass. None if both values are None.
entityClassImmutableEntityClassThe class of the entity, as a read-only reference. To modify the class definition, look it up from the document via document.getDomainByName(name).getEntityClassByName(name).
entityIDintegerRead only. The element’s entity ID. Can be zero if entityID are not currently visible.
chartRowEffortStringstringRead only. The string that would be displayed for the entity’s effort in chart view or None is project management not enabled.
preferredStartDateDate or NoneThe preferred start date, as a Date. None if the entity has no preferred start date or project management not enabled.
preferredFinishDateDate or NoneThe preferred finish date, as a Date. None if the entity has no preferred finish date or project management not enabled.
preferredDateErrorbooleanRead only. Set to True if the entity exhibits a date error, otherwise False.
resourceStringstring or NoneRead only. The string that would be displayed for the entity’s resources in graph view, or None if no resources assigned or project management not enabled.
chartRowResourceStringstring or NoneRead only. The string that would be displayed for the entity’s resources in chart view, or None if no resources assigned or project management not enabled.
startDateStringDate or NoneRead only. The string that would be displayed for the entity’s start date, or None if project management not enabled.
finishDateStringDate or NoneRead only. The string that would be displayed for the entity’s finish date, or None if project management not enabled.
titleFontFontSpecRead only. The FontSpec used to render the entity title.
titleLineslist of LayoutLineRead only. A list of LayoutLines providing position information for the entity title.

Methods

equals( object )

Returns True if object represents the same entity as self.

setDuration( time )

Sets the duration of this entity. Because duration is always a calculated value (finish date minus start date), this method works indirectly: it back-calculates and stores the effort required to produce the given time, using the entity's current resource assignments and calendar. Duration is then recomputed from that effort during scheduling. This mirrors editing duration directly in the Element Inspector.

addResource( resource )

Assigns the given resource to the task.

removeResource( resource )

Removes the given resource assigned to the task.