Entity
Entity is derived class of VertexElem and represents an entity.
Fields
| Field | Type | Description |
|---|---|---|
isEntity | boolean | Read only. Returns True. |
title | string | The title of the Entity. |
confidence | number | The confidence, as a value between 0.0 and 1.0. |
canDrive | boolean | Read Only. True if this entity can drive confidence; i.e., it has no predecessors ignoring back edges. |
completion | number | Read Only. The completion, as a value between 0.0 and 1.0. Zero if project management not enabled. |
effortHours | number | The 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. |
duration | Time or None | 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. |
startDate | Date or None | The start date, as a Date. None if project management not enabled. |
finishDate | Date or None | The finish date, as a Date. None if project management not enabled. |
startTime | Time or None | Read only. The start time, as a Time. None if project management not enabled. |
finishTime | Time or None | Read only. The finish time, as a Time. None if project management not enabled. |
resources | list of Resource | Read only. A list of resources assigned to a task. The list can be empty. |
resourceAssignment | Resource Assignment Type | The current setting for how resources are assigned to a task. |
symbol | Symbol or None | The directly set symbol for this entity, as a Symbol, otherwise None. |
inheritedSymbol | Symbol or None | Read only. The symbol for this entity, either the directly set Symbol or the one inherited from its EntityClass. None if both values are None. |
entityClass | ImmutableEntityClass | The 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). |
entityID | integer | Read only. The element’s entity ID. Can be zero if entityID are not currently visible. |
chartRowEffortString | string | Read only. The string that would be displayed for the entity’s effort in chart view or None is project management not enabled. |
preferredStartDate | Date or None | The preferred start date, as a Date. None if the entity has no preferred start date or project management not enabled. |
preferredFinishDate | Date or None | The preferred finish date, as a Date. None if the entity has no preferred finish date or project management not enabled. |
preferredDateError | boolean | Read only. Set to True if the entity exhibits a date error, otherwise False. |
resourceString | string or None | Read 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. |
chartRowResourceString | string or None | Read 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. |
startDateString | Date or None | Read only. The string that would be displayed for the entity’s start date, or None if project management not enabled. |
finishDateString | Date or None | Read only. The string that would be displayed for the entity’s finish date, or None if project management not enabled. |
titleFont | FontSpec | Read only. The FontSpec used to render the entity title. |
titleLines | list of LayoutLine | Read only. A list of LayoutLines providing position information for the entity title. |
Methods
equals( object )
Returns
Trueifobjectrepresents 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
resourceto the task.
removeResource( resource )
Removes the given
resourceassigned to the task.