PowerProject OLE2 Automation Interface
Object Reference Guide

Introduction
This document details all objects in the PowerProject automation interface, all properties and methods are shown with their return types and parameter sets. Properties and methods that return an object have that object shown as their return type. The ClassName property is common to all objects and is useful for determining an object's type, the class name for each object is given in the ClassName description. Properties marked as "(stored x 100)" are 2 decimal place fixed point values multiplied by 100 so that they are stored as long integers.

Application Object
Description
The PowerProject application object
Properties
String Name
The name of the application
PowerProject Application
The application object itself
String FullName
The .EXE file name
PowerProject Parent
The application object itself
String ClassName
The name of the object's class: "Application"
Boolean Visible
Is the application visible ?
Boolean UserControl
Does the user control the application ?
Projects Projects
The collection of projects
Project CurrentProject
The current project - if any
Chart CurrentChart
The current chart - if any
Methods
Void Quit
Equivalent to a File.Exit command

Projects Object
Description
A collection object giving access to projects
Methods
Project Item (index)
Provides array type access to the projects
Project Add (filename)
If no argument is given, a new project is created if possible. Otherwise the named project is opened. If the username and password are provided (as the 2nd and 3rd parameters) then the pasword dialog is bypassed.
Example
Create a new project
Projects.Add

Open an existing project
Projects.Add("OFFICE.PDB")

Open an existing protected project
Projects.Add("OFFICE.PDB", "Username", "Password")

Properties
Int Count
The number of open projects
PowerProject Application
The application object
PowerProject Parent
The application object
String ClassName
The name of the object's class: "Projects"

Project Object
Description
Represents a PowerProject project
Properties
String Name
The name of the project (40 Characters)
PowerProject Application
The application object
String ClassName
The name of the object's class: "Project"
PowerProject Parent
The application object
Long Index
What number is this in the projects collection ?
Boolean UserControl
Does the user control the project ?
String FileName
The project file name
String Company
The client for the project (40 Characters)
String Author
The project's author (40 Characters)
Date ProjectStart
The project's start date
Date ProjectFinish
The project's end date
Date CurrentDate
The project's report date
Charts Charts
The collection of charts in the project
Resources Resources
The collection of resources in the project
CostCentres CostCentres
The collection of cost centres in the project
Calendars Calendars
The collection of calendars in the project
CodeLibrary BarCode1Library
The collection of bar1 codes in the project
CodeLibrary BarCode2Library
The collection of bar2 codes in the project
CodeLibrary SegmentCode1Library
The collection of segment1 codes in the project
CodeLibrary SegmentCode2Library
The collection of segment2 codes in the project
Int BaseLineCount
The number of baselines attached to the project
Boolean BaseLine
Indicates whether the project is a baseline itself
Methods
Void SaveAs (filename)
Save the project to a file
Example
Save the project
Project.SaveAs("NEWPROJ.PDB")

Methods
String LinkCategoryName (index)
Returns a link category name from a given category number. Category numbers are in the range of 1 to 15 (20 Characters)
String BaseLineFileName (index)
Returns a baseline filename from a given baseline number. Baseline numbars are in the range of 1 to Project.BaseLineCount
Boolean Reschedule
Reschedules the whole project. Returns TRUE if the project reschedules or FALSE if a link-loop was found causing the rescedule to fail.

Charts Object
Description
A collection object giving access to a project's charts
Methods
Chart Item (index)
Provides array type access to the charts
Properties
Int Count
The number of charts in the project
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Charts"

Chart Object
Description
Represents a chart in a project
Properties
String Name
The name of the chart
PowerProject Application
The application object
Project Parent
The project object
Long Index
What number is this in the charts collection ?
Boolean UserControl
Does the user control the chart ?
String FullName
The full name of the chart as seen on a window title
String ClassName
The name of the object's class: "Chart"
Bars Bars
The collection of bars in the chart
Chart ParentChart
The chart which is the parent of this chart, returns the project object used on the root chart
Bar ParentBar
The bar which is the parent of this chart. Only valid if used on a subchart
LocalLinks Links
The collection of all local links in this chart
XChartLinks XChartLinks
The collection of cross-chart links in this chart
Long WorkDone
Progressed work
Long WorkTotal
Total work in the chart
Date ReportDate
The chart report date
Date ProgressDate
The chart progress date
String Author
The chart author (32 Characters)
String Manager
The chart manager (32 Characters)
String Comment
The chart comment (40 Characters)
String ProgrammeNumber
The chart programme number (10 Characters)
Date IssueDate
The chart issue date
String RevisionNumber
The chart revision number (3 Characters)
Date RevisionDate
The chart revision date
String RevisionComment
The chart revision comment (40 Characters)
Long IDNum
The uinque chart ID number
Methods
Boolean Reschedule
Reschedules this chart only. Returns TRUE if the chart reschedules or FALSE if a link-loop was found causing the rescedule to fail.
Boolean RescheduleBranch
Reschedules this chart and of it's all subcharts. Returns TRUE if the branch reschedules or FALSE if a link-loop was found causing the rescedule to fail.
Boolean PrintGraphics
Prints the chart using current settings.

Bars Object
Description
A collection object giving access to a chart's bars
Methods
Bar Item (index)
Provides array type access to the bars
Properties
Int Count
The number of bars in the chart
PowerProject Application
The application object
Chart Parent
The chart object
String ClassName
The name of the object's class: "Bars"

Bar Object
Description
Represents a bar in a chart
Properties
String Name
The name of the bar (60 Characters)
PowerProject Application
The application object
Chart Parent
The bar's chart
String ClassName
The name of the object's class: "Bar"
Long Index
What number is this in the bars collection ?
Segments Segments
The collection of segments in the bar
Boolean Expanded
Is this an expanded bar ?
Chart SubChart
The sub-chart. Only valid if this is an expanded bar
Boolean Critical
Is this bar critical ?
Boolean Selected
Is this bar selected ?
Boolean Summary
Is this a summary bar ?
Boolean Hidden
Is this bar hidden ?
Int IndentLevel
The bar indent level
Int IndentParentBarNum
If Indented gives immediate parent bar
Boolean Asap
Is this bar set ASAP ?
Int Progress
The calculated progress of the bar
Long IDNum
The unique bar ID number
Int CalendarNum
The calendar number assigned to this bar
Calendar Calendar
The calendar assigned to this bar
Int Code1Num
The bar code 1 number assigned to this bar
Code Code1
The bar code 1 object assigned to this bar
Int Code2Num
The bar code 2 number assigned to this bar
Code Code2
The bar code 2 object assigned to this bar
String WBNCode
The work breakdown number for this bar (15 Characters)
String UserText1
A user text field for this bar (40 Characters)
String UserText2
A user text field for this bar (20 Characters)
Double UserReal
A user real number field for this bar
Boolean LockedSegs
Are the segments locked together ?
Boolean GridLine
Is there a ruling line on this bar ?

Segments Object
Description
A collection object giving access to a bar's segments
Methods
Segment Item (index)
Provides array type access to the segments
Properties
Int Count
The number of segments in the bar
PowerProject Application
The application object
Bar Parent
The bar object
String ClassName
The name of the object's class: "Segments"
String Default
The default segment title (16 characters)

Segment Object
Description
Represents a segment in a bar
Properties
BSTR Name
The name of the segment (16 Characters)
PowerProject Application
The application object
Bar Parent
The segment's bar
Long Index
What number is this in the segments collection ?
BSTR FullName
The full name of the segment: bar title + segment title
BSTR ClassName
The name of the object's class: "Segment"
LinkRefs InLinks
The links to the segment's predecessors
LinkRefs OutLinks
The links to the segment's successors
Boolean Critical
Is the segment critical ?
Date StartDate
The segment start date
Date EndDate
The segment end date
Date LateStartDate
The latest end date of the segment, ie the end of the total float period. Only valid immediately after a reschedule
Date LateEarlyDate
This is effectively the start of the free float period for a bar with ALAP positioning, or the end of the free float period for a bar with ASAP positioning. Only valid immediately after a reschedule
Date StartFlagDate
The start flag date
Date EndFlagDate
The end flag date
Long Duration
The segment duration in half days
Boolean Complete
Is the segment complete ?
Boolean Selected
Is the segment selected ?
Boolean StartFlagSet
Does the segment have a start flag ?
Boolean EndFlagSet
Does the segment have an end flag ?
Boolean LeadLagSeg
Is the segment set as lead or lag ?
Boolean Split
Is the segment split ?
Boolean Hidden
Is the segment hidden ?
ResAllocs ResAllocs
The collection of resources allocated to this segment
CostAllocs CostAllocs
The collection of cost centres allocated to this segment
Double UserReal
A user real number field for this segment
Long UserLong1
A user long integer field for this segment
Long UserLong2
A user long integer field for this segment
BSTR UserText1
A user text field for this segment (12 Characters)
BSTR UserText2
A user text field for this segment (16 Characters)
Int Progress
The calculated progress of the associated logical segment
Long IDNum
The unique segment ID number
Int Code1Num
The segment code 1 number assigned to this segment
Code Code1
The segment code 1 object assigned to this segment
Int Code2Num
The segment code 2 number assigned to this segment
Code Code2
The segment code 2 object assigned to this segment
Boolean SetCritical
Is the segment forced critical ?
Boolean AdjustEndDate
Is the end date of the segment being adjusted ?

LocalLinks Object
Description
A collection object giving access to a chart's links
Properties
Int Count
The number of links in the chart
PowerProject Application
The application object
Chart Parent
The chart object
String ClassName
The name of the object's class: "LocalLinks"
Methods
Link Item (index)
Provides array type access to the links

XChartLinks Object
Description
A collection object giving access to a project's  cross chart links
Properties
Int Count
The number of links in the project
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "XChartLinks"
Methods
Link Item (index)
Provides array type access to the links

LinkRefs Object
Description
A collection object giving access to a segment's links
Methods
Segment Item (index)
Provides array type access to the links
Properties
Int Count
The number of links attached to the segment
PowerProject Application
The application object
Segment Parent
The segment object
String ClassName
The name of the object's class: "LinkRefs"

Link Object
Description
Represents a logic link between two segments
Properties
String Name
The name of the link
PowerProject Application
The application object
Project or Chart Parent
Project for cross chart, Chart for local link
String ClassName
The name of the object's class: "Link"
Long Index
What number is this in the links collection ?
Segment StartSegment
The segment from which this link starts. Note: The bar for the segment is just Segment::Parent and the chart is 
Date StartDate
The start date of the link
Segment EndSegment
The segment to which this link points. See comments on Link.Start
Date EndDate
The end date of the link
Long StartOffset
The link start offset from segment start date (half days). If the value is less than zero then the link starts or ends on the end of a task that has modelled resources on it. The value must then be calculated by the caller
Long EndOffset
The link end offset from segment start date (half days). If the value is less than zero then the link starts or ends on the end of a task that has modelled resources on it. The value must then be calculated by the caller
Boolean Critical
Is the link part of the critical path ?
Boolean Selected
Is the link selected ?
Boolean LinkLoop
Is the link part of a loop ?
Boolean Complete
Is the link complete ?
Boolean Local
Is this a local link ? (TRUE = Local, FALSE = XChart)

Calendars Object
Description
A collection object giving access to a projects calendars
Methods
Calendar Item (index)
Provides array type access to the calendars
Properties
Int Count
The number of calendars in the project
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Calendars"
Long Default
The index of the default calendar

Calendar Object
Description
Represents a calendar in a project
Properties
String Name
The name of the calendar (16 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Calendar"
Long Index
What number is this in the calendars collection
String Holiday1Name
The title for holiday type 1 (12 Characters)
String Holiday2Name
The title for holiday type 2 (12 Characters)
String OvertimeName
The title for overtime (12 Characters)
String WeekendName
The title for weekends (12 Characters)
Int WorkPeriodsPerWeek
The number of working half days in a week.
Long Holiday1Count
The number of holiday type 1 blocks in this calendar
Long Holiday2Count
The number of holiday type 2 blocks in this calendar
Long OverttimeCount
The number of overtime blocks in this calendar
Methods
Boolean WorkPeriod (index)
Given a work period number in the range of 1 to 14 (1 being sunday am, 2 sunday pm, 3 monday am ... 14 saturday pm) returns a boolean avlue of TRUE if working or FALSE if weekend.
Int WorkPeriodType (date)
Takes a VB Date containing both a date and time and returns an integer value indicating what calendar feature is set for that half of the day, see table 2 for a description of the returned value. This function will fail if the given date is not withing the project boundary.
Date Holiday1Start (index)
Returns the start date of holiday type 1 block number 'index'
Date Holiday1End   (index)
Returns the end date of holiday type 1 block number 'index'
Date Holiday2Start (index)
Returns the start date of holiday type 2 block number 'index'
Date Holiday2End   (index)
Returns the end date of holiday type 2 block number 'index'
Date OvertimeStart (index)
Returns the start date of the overtime block number 'index'
Date OvertimeEnd   (index)
Returns the end date of the overtime block number 'index'

CodeLibrary Object
Description
A collection object giving access to a projects code library
Methods
Code Item (index)
Provides array type access to the codes
Properties
Int Count
The number of codes in this library
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class
String Name
The code library name (16 Characters)
Long Default
The index of the default code

Code Object
Description
Represents a code in a code library
Properties
String Name
The name of the code (16 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class
Long Index
What number is this in the code library collection
Int ForegroundColour
The code foreground colour. See table 6 for the returned colour value
Int BackgroundColour
The code background colour. See table 6 for the returned colour value
Int FillPattern
The code fill pattern. See table 7 for the returned pattern value

Resources Object
Description
A collection object giving access to a projects resources and resource groups
Methods
Resource Item (index)
Provides array type access to the resources
Properties
Int Count
The number of resources in the project
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Resources"

Resource (Permanent) Object
Description
Represents a permanent resource
Properties
String Name
The name of the resource (32 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Resource"
Long Index
What number is this in the resources collection
Calendar Calendar
The calendar assigned to this resource
Int CalendarNum
The calendar number assigned to this resource
Boolean Group
Is this resource a group ?
CostCentre CostCentre
The cost centre assigned to this resource
Int CostCentreNum
The cost centre number assigned to this resource
Boolean Permanent
Is this a permanent resource ? (TRUE if Permanent, FALSE if Consumable)
String SingleShortName
The single short name (16 Characters)
String PluralShortName
The plural short name (16 Characters)
Long DefaultAllocation
The default allocation (stored x 100)
Long DefaultUnitWorkRate
The default unit work rate (stored x 100)
Int DefaultUnitWorkRateTimeUnit
The default unit work rate time unit. See table 1 for returned value
Boolean WorkUsesTimeRate
Does work use time rate ? (TRUE if uses Time Rate, FALSE if used Work Rate)
Double DefaultTimeWorkRate
The default time work rate
Int DefaultTimeWorkRateTimeUnit
The default time work rate time unit. See table 1 for returned value
String SingleWorkUnitName
The single work unit name (16 Characters)
String PluralWorkUnitName
The plural work unit name (16 Characters)
Long InitialCost
The initial cost (stored x 100)
Long NormalRate
The normal rate (stored x 100)
Int NormalRateTimeUnit
The normal rate time unit. See table 1 for returned value
Long OvertimeRate
The overtime rate
Int OvertimeRateTimeUnit
The overtime rate time unit. See table 1 for returned value
String Description
The resource's description (16 Characters)
Int HoursPerDay
The number of hours per day (stored x 100)
Int Deferal
The deferal
Int AccrualTimeUnit
The accrual time unit. See table 1 for returned value
Int DeferalTimeUnit
The deferal time unit. See table 1 for returned value
Boolean AccrualInAdvance
Is the accrual in advance? (TRUE if in Advance, FALSE if in Arrears)
Boolean Defered
Is the resource defered ?
Int AccrualType
The accrual type. See table 4 for returned value
Long Availability
The availability (stored x 100). Not valid if the resource is profiled
Int ProfileCount
The number of profile nodes
Boolean Profiled
Is this resource profiled ?
Methods
Long GetProfileQuantity (index)
Given a node number in the range of 1 to ProfileCount, the profile node quantity is returned (stored x 100)
Long GetProfileTime (index)
Given a node number in the range of 1 to ProfileCount, the profile node duration is returned (half days)

Resource (Consumable) Object
Description
Represents a consumable resource
Properties
String Name
The name of the resource (32 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Resource"
Long Index
What number is this in the resources collection
Calendar Calendar
The calendar assigned to this resource
Int CalendarNum
The calendar number assigned to this resource
Boolean Group
Is this resource a group ?
CostCentre CostCentre
The cost centre assigned to this resource
Int CostCentreNum
The cost centre number assigned to this resource
Boolean Permanent
Is this a permanent resource ? (TRUE if Permanent, FALSE if Consumable)
String SingleShortName
The single short name (16 Characters)
String PluralShortName
The slural short name (16 Characters)
Long DefaultAllocation
The default allocation (stored x 100)
Long InitialCost
The initial cost (stored x 100)
Long NormalRate
The normal rate (stored x 100)
BSTR Description
The resource's description (16 Characters)
Int HoursPerDay
The number of hours per day (stored x 100)
Int Deferal
The deferal
Int AccrualTimeUnit
The accrual time unit. See table 1 for returned value
Int DeferalTimeUnit
The deferal time unit. See table 1 for returned value
Boolean AccrualInAdvance
Is the accrual in advance? (TRUE if in Advance, FALSE if in Arrears)
Boolean Defered
Is the resource defered ?
Int AccrualType
The accrual type. See table 4 for returned value
Long Availability
The Availability (stored x 100), Not valid if the resource is profiled
Int ProfileCount
The number of profile nodes
Boolean Profiled
Is this resource profiled ?
Methods
Long GetProfileQuantity (index)
Given a node number in the range of 1 to ProfileCount, the profile node quantity is returned (stored x 100)
Long GetProfileTime (index)
Given a node number in the range of 1 to ProfileCount, the profile node duration is returned (half days)

Resource (Permanent Group) Object
Description
Represents a permanent resource group
Properties
String Name
The name of the resource (32 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Resource"
Long Index
What number is this in the resources collection
Calendar Calendar
The calendar assigned to this resource
Int CalendarNum
The calendar number assigned to this resource
Boolean Group
Is this resource a group ?
CostCentre CostCentre
The cost centre assigned to this resource
Int CostCentreNum
The cost centre number assigned to this resource
Boolean Permanent
Is this a permanent resource ? (TRUE if Permanent, FALSE if Consumable)
Long DefaultAllocation
The default allocation (stored x 100)
Long DefaultUnitWorkRate
The default unit work rate (stored x 100)
Int DefaultUnitWorkRateTimeUnit
The default unit work rate time unit. See table 1 for returned value
Boolean WorkUsesTimeRate
Does work use time rate? (TRUE if uses Time Rate, FALSE if used Work Rate)
Double DefaultTimeWorkRate
The default time work rate
Int DefaultTimeWorkRateTimeUnit
The default time work rate time unit. See table 1 for returned value
BSTR SingleWorkUnitName
The single work unit name (16 Characters)
BSTR PluralWorkUnitName
The plural work unit name (16 Characters)
BSTR Description
The resource's description (16 Characters)
Int GroupCount
The number of resources in this group
Int GroupLeadResourceNum
The group lead resource number
Resource GroupLeadResource
The group lead resource
Methods
Int GetGroupResourceNum (index)
The group member resource number
Resource GroupResource (index)
The group resource member
Long GetGroupResourceQuantity (index)
The group resource member quantity (stored x 100)

Resource (Consumable Group) Object
Description
Represents a consumable resource group
Properties
String Name
The name of the resource (32 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "Resource"
Long Index
What number is this in the resources collection
Calendar Calendar
The calendar assigned to this resource
Int CalendarNum
The calendar number assigned to this resource
Boolean Group
Is this resource a group ?
CostCentre CostCentre
The cost centre assigned to this resource
Int CostCentreNum
The cost centre number assigned to this resource
Boolean Permanent
Is this a permanent resource ? (TRUE if Permanent, FALSE if Consumable)
Long DefaultAllocation
The default allocation (stored x 100)
BSTR Description
The resource's description (16 Characters)
Int GroupCount
The number of resources in this group
Int GroupLeadResourceNum
The group lead resource number
Resource GroupLeadResource
The group lead resource
Methods
Int GetGroupResourceNum (index)
The group member resource number
Resource GroupResource (index)
The group resource member
Long GetGroupResourceQuantity (index)
The group resource member quantity (stored x 100)

ResAllocs Object
Description
A collection object giving access to a segments resource allocations
Methods
ResAlloc Item (index)
Provides array type access to the resource and resource group allocations
Properties
Int Count
The number of resources allocated to the segment
PowerProject Application
The application object
Segment Parent
The segment object
String ClassName
The name of the object's class: "ResAllocs"

ResAlloc (Permanent) Object
Description
Represents a permanent resource or resource groupallocation on a segment
Properties
BSTR Name
The name of the allocated resource
PowerProject Application
The application object
Segment Parent
The segment object
BSTR ClassName
The name of the object's class: "ResAlloc"
Long Index
What number is this in the resource allocations collection
Int ResourceNum
The resource number allocated to this segment
Resource Resource
The resource allocated to this segment
CostCentre CostCentre
The cost centre assigned to this resource allocation
Int CostCentreNum
The cost centre number assigned to this resource allocation
Long WorkedDuration
The worked duration (half days)
Boolean EffortBasedAllocation
Is this an effort based allocation ? (TRUE if effort based, FALSE if work based)
Int ModellingType
The modelling type. See table 3 for returned value
Int DurationTimeUnit
The duration time unit. See table 1 for returned value
Int WorkUnitRateTimeUnit
The work unit rate time unit. See table 1 for returned value
Int EffortTimeUnit
The effort time unit. See table 1 for returned value
Long Effort
The effort (stored x 100 in half days)
Long Work
The work (stored x 100)
Long WorkUnitRate
The work unit rate (stored x 100)
Boolean WorkUsesTimeRate
Does work use time rate ?
Double WorkTimeRate
The work time rate
Int WorkTimeTimeUnit
The work time time unit. See table 1 for returned value
Int CalculatedParameter
The calculated parameter. See table 5 for returned value
Int BalancingParameter
The balancing parameter. See table 5 for returned value
Long Duration
The duration (stored x 100 in half days)
String AllocationText
The allocation text (20 Characters)
Long Allocation
The allocation (stored x 100). Invalid if the resource is profiled
Int ProfileCount
The number of profile nodes
Boolean Profiled
Is the resource allocation profiled ?
Methods
Long GetProfileQuantity (index)
Given a node number in the range of 1 to ProfileCount, the profile node quantity is returned (stored x 100)
Long GetProfileTime (index)
Given a node number in the range of 1 to ProfileCount, the profile node duration is returned (half days)

ResAlloc (Consumable) Object
Description
Represents a consumable resource or resource group allocation on a segment
Properties
BSTR Name
The name of the allocated resource
PowerProject Application
The application object
Segment Parent
The segment object
BSTR ClassName
The name of the object's class: "ResAlloc"
Long Index
What number is this in the resource allocations collection
Int ResourceNum
The resource number allocated to this segment
Resource Resource
The resource allocated to this segment
CostCentre CostCentre
The cost centre assigned to this resource allocation
Int CostCentreNum
The cost centre number assigned to this resource allocation
Boolean AllocationSupplies
Does the allocation supply? (TRUE if supplies, FALSE if consumes)
Int RateTimeUnit
The rate time unit. See table 1 for returned value
Long Rate
The consumption rate (stored x 100). Invalid if the resource is profiled.
Long WorkedDuration
The worked duration (half days)
Int ModellingType
The modelling type. See table 3 for returned value
Int DurationTimeUnit
The duration time unit. See table 1 for returned value
Int CalculatedParameter
The calculated parameter. See table 5 for returned value
Int BalancingParameter
The balancing parameter. See table 5 for returned value
Long Duration
The duration (stored x 100 in half days)
String AllocationText
The allocation text (20 Characters)
Long Allocation
The allocation (stored x 100)
Int ProfileCount
The number of profile nodes
Boolean Profiled
Is the resource allocation profiled ?
Methods
Long ProfileQuantity (index)
Given a node number in the range of 1 to ProfileCount, the profile node quantity is returned (stored x 100)
Long ProfileTime (index)
Given a node number in the range of 1 to ProfileCount, the profile node duration is returned (half days) CostCentres ----------------------------------------

CostCentres Object
Description
A collection object giving access to a projects cost centres
Methods
CostCentre Item (index)
Provides array type access to the cost centres
Properties
Int Count
The number of cost centres in the project
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "CostCentres"

CostCentre Object
Description
Represents a cost centre
Properties
String Name
The name of the cost centre (32 Characters)
PowerProject Application
The application object
Project Parent
The project object
String ClassName
The name of the object's class: "CostCentre"
long Index
What number is this in the parent's cost centres collection
BSTR ShortName
The short name (16 Characters)
long DefaultAllocation
The default allocation (stored x 100)
int IncomeDeferal
The income deferal
int ExpenditureDeferal
The expenditure deferal
int IncomeAccrualTimeUnit
The income accrual time unit. See table 1 for returned value
int ExpenditureAccrualTimeUnit
The expenditure accrual time unit. See table 1 for returned value
int IncomeDeferalTimeUnit
The income deferal time unit. See table 1 for returned value
int ExpenditureDeferalTimeUnit
The expenditure deferal time unit. See table 1 for returned value
boolean IncomeInAdvance
The income in advance ? (TRUE if in advance, FALSE if in arrears)
boolean IncomeDefered
The income defered ?
int IncomeAccrualType
The income accrual type. See table 4 for returned value
boolean ExpenditureInAdvance
The expenditure in advance ? (TRUE if in advance, FALSE if in arrears)
boolean ExpenditureDefered
The expenditure defered ?
int ExpenditureAccrualType
The expenditure accrual type. See table 4 for returned value
long InitialAvailability
The initial availability (stored x 100)

CostAllocs Object
Description
A collection object giving access to a segments cost centre allocations
Methods
CostAlloc Item (index)
Provides array type access to the cost centre allocations
Properties
Int Count
The number of cost centres allocated to the segment
PowerProject Application
The application object
segment Parent
The segment object
String ClassName
The name of the object's class: "CostAllocs"

CostAlloc Object
Description
Represents a cost centre allocation on a segment
Properties
String Name
The name of the cost centre allocated
PowerProject Application
The application object
Segment Parent
The segment object
String ClassName
The name of the object's class: "CostAlloc"
Long Index
What number is this cost centre allocations collection
Int CostCentreNum
The cost centre number allocated to this segment
CostCentre CostCentre
The cost centre allocated to this segment
Boolean Income
Is the allocation income ? (TRUE if income, FALSE if expenditure)
Long Allocation
The allocation (stored x 100)

Asta Development Corporation Limited

OLE2 Automation Implementation Notes

OLE2 Automation Interface Tables

The Following tables are for use with the object reference section. Please note that the Time Unit table is not numbered sequentially as the numbering system used is to allow for future expansion.

Table 1 - Time Units 					Table 2 - Work Period Types		

Table 3 - Modelling Types 				Table 4 - Accrual Types

Table 5 - Calc & Balancing Parameters		Table 10 - Blip Sizes 

Table 6 - PowerProject Colours

Table 7 - PowerProject Patterns

Table 8 - PowerProject Line Styles

Table 9 - PowerProject Blip Styles

Resource and ResAlloc Objects

The Resource and ResAlloc objects have multiple object definitions:

Resource object		ResAlloc object
 	Permanent			  	Permanent (includes groups) 		
	  			Consumable	 		Consumable (includes groups)
	  			Permanent Group
	  			Consumable Group

The reason for the differing object definitions is that different property sets are required by different resource types. i.e. a permanent resource does not use the GroupCount property so it would be misleading to have just one object definition with all of the available properties in. In effect these definitions are just subsets of the Resource and ResAlloc objects. If an attempt is made for example to access the GroupCount property in a resource object that is not a group entry, an error will occur. To determine the resource type use the Group and Permanent boolean properties.

Modifying Values

Most properties in the PowerProject v4 automation interface have been read only up till recently, however support for full read/write access will be provided after the initial mainly read-only release. So far the following properties have been write enabled:

Bar object		Segment object		Application object
				Name			 Name				  		Visible
 	 		Progress		 Progress			 
				Duration
				StartDate
				EndDate