

In the example shown below, the taskNamed() function is called on the main project scenario ( actual) and so will search the entire scenario. NOTE: Both the taskNamed() and the resourceNamed() functions search the entire chain of tasks and resources contained within the container the function is called on, even locating tasks within other tasks. Var rsc = actual.resourceNamed("Margret Jensen") if(rsc) If there is more than one with the same name, only returns the first.

TaskNamed( name: String) → ( Task or null)

ResourceNamed( name: String) → ( Resource or null) Instance functions for the Scenario class. Documentation regarding the Decimal Formatter class can be found here. NOTE: Information regarding Locale codes can be found in the Calendar class documentation.
#Omniplan cost code#
Var projectCost = actual.totalCost //-> var code = new Locale("en_US").currenc圜ode //-> "USD" var fmtr = (code) var costString = fmtr.stringFromDecimal(projectCost) //-> "$9,000.00" new Alert("Total Cost", costString).show() 03 This illustration shows a project with a fixed start: 01Įxamples of Scenario properties used in scripts: Scenario Properties CopyĪctual.name //-> "Actual" pleted //-> 23 // top-level tasks var tasks = // all tasks var allTasks = () // new top-level task var newTask = () // top-level resources var resources = // all resources) var allResources = () // new top-level resource var newResource = () // all milestones actual.milestones (⬇ see below ) The hasFixedEndDate and hasGenericDates properties control the input and display of dates for the scenario. 03 This illustration shows a project with a fixed end: 01 The Fixed Start/End and Specific/Relative Dates Properties Setting a date value to this property will change scenario to: “Forward from fixed start” 01 (see below)

This is a hidden group which contains all top-level tasks. This is a hidden group which contains all top-level resources. A list of all milestones in the project.( true = Dates:To Be Determined) ( false = Dates:Specific) 02 (see below) ( true = “Backward from fixed end”) ( false = “Forward from fixed start”) 01 (see below) Whether tasks in this scenario scheduled forward from a fixed overall start, or backwards from a fixed overall end.Setting a date value to this property will change scenario to: “Backward from fixed end” 01 (see below) Overall project percentage completed.ĮndDate ( Date).The actuals for a project are one scenario, and saved baselines are the others. A Scenario represents a set of tasks and resources and associated schedules.
