Project Class
Represents a project.
Inheritance Hierarchy
SystemObject
  Aspose.TasksProject

Namespace: Aspose.Tasks
Assembly: Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.4
Syntax
public class Project

The Project type exposes the following members.

Constructors
  NameDescription
Public methodProject
Initializes a new instance of the Project class.
Public methodProject(Stream)
Initializes a new instance of the Project class from a stream.
Public methodProject(StreamReader)
Initializes a new instance of the Project class from a StreamReader instance.
Public methodProject(String)
Initializes a new instance of the Project class from a template (existent mpp or mpt file).
Public methodProject(DbSettings)
Initializes a new instance of the Project class to read data from a database which is specified by the instance of the DbSettings class.
Public methodProject(Stream, LoadOptions)
Initializes a new instance of the Project class from the Stream with the specified instance of the LoadOptions class.
Public methodProject(Stream, ParseErrorCallback)
Initializes a new instance of the Project class from a template(existent mpp or mpt file).
Public methodProject(Stream, PrimaveraXmlReadingOptions)
Initializes a new instance of the Project class from the Stream with the specified instance of the PrimaveraXmlReadingOptions class.
Public methodProject(Stream, String)
Initializes a new instance of the Project class from a template(existent mpp or mpt file).
Public methodProject(String, LoadOptions)
Initializes a new instance of the Project class from a template (existent mpp or mpt file) with the specified instance of the LoadOptions class.
Public methodProject(String, ParseErrorCallback)
Initializes a new instance of the Project class from a template (existent mpp or mpt file).
Public methodProject(String, PrimaveraXmlReadingOptions)
Initializes a new instance of the Project class from a template (existent MPP or MPT file) with the specified instance of the PrimaveraXmlReadingOptions class.
Public methodProject(String, String)
Initializes a new instance of the Project class from a password protected template (existent mpp or mpt file).
Public methodProject(Stream, ParseErrorCallback, PrimaveraXmlReadingOptions)
Initializes a new instance of the Project class from the Stream with the specified instance of the PrimaveraXmlReadingOptions class.
Public methodProject(String, ParseErrorCallback, PrimaveraXmlReadingOptions)
Initializes a new instance of the Project class from a template (existent mpp or mpt file) with the specified instance of the PrimaveraXmlReadingOptions class.
Properties
  NameDescription
Public propertyBuiltInProps
Gets project's built-in properties collection. Read/write BuiltInProjectPropertyCollection.
Public propertyCalculationMode
Gets or sets calculation mode of a project. Can be one of the values of CalculationMode enumeration.
Public propertyCalendars
Gets CalendarCollection object of this Project instance.
Public propertyCriticalPath
Gets a collection which contains a list of Critical tasks which comprise Critical Path of this project.
Remarks
This is an O(n) operation, where n is the number of tasks in the project.
Public propertyCustomProperties Obsolete.
Gets or sets project's custom properties dictionary. Read/write IDictionary.
Public propertyCustomProps
Gets project's custom properties collection. Read/write CustomProjectPropertyCollection.
Public propertyDefaultView
Gets or sets default view of the project.
Public propertyDefaultWeekWorkingDays
Gets the instance of WeekDayCollection class which represents a collection of project default week working days and working times.
Public propertyDisplayOptions
Gets an instance of the ProjectDisplayOptions class.
Public propertyExtendedAttributes
Gets ExtendedAttributeDefinitionCollection object. The collection of extended attribute (custom fields) definitions associated with a project.
Public propertyOleObjects
Gets a collection containing the instances of the OleObject class which are linked or embedded to this project file.
Remarks
Available for mpp file format only.
Public propertyOutlineCodes
Gets OutlineCodeDefinitionCollection object. The collection of outline code definitions associated with a project.
Public propertyResourceAssignments
Gets ResourceAssignmentCollection object.
Public propertyResourceFilters
Gets all the resource-based filter definitions. ResourceFilters is a collection of Filter objects.
Public propertyResourceGroups
Gets all of the resource-based group definitions. ResourceGroups is a collection of Group objects.
Public propertyResources
Gets ResourceCollection object.
Public propertyRootTask
Gets the root of the tree of tasks.
Public propertyTables
Gets a list of Table objects.
Public propertyTaskFilters
Gets all the task-based filter definitions. TaskFilters is a collection of Filter objects.
Public propertyTaskGroups
Gets all the task-based group definitions. TaskGroups is a collection of Group objects.
Public propertyTaskLinks
Gets TaskLinkCollection object.
Public propertyVbaProject
Gets an instance of VbaProject class.
Public propertyViews
Gets a list of View objects.
Public propertyWBSCodeDefinition
Gets or sets WBS Code Definition for the project.
Methods
  NameDescription
Public methodCopyTo(Project)
Copies project's main data and properties to another project.
Public methodCopyTo(Project, CopyToOptions)
Copies project's main data and properties to another project.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetT
Returns the value to which the property is mapped in this container.
Public methodGetBaselineSaveTime
Returns the baseline save time.
Public methodGetDuration(Double)
Gets Duration object with the specified Double value and default duration format.
Public methodGetDuration(Double, TimeUnitType)
Gets Duration object with the specified TimeSpan value and specified TimeUnitType value.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetPageCount
Returns page count for the project to be rendered using default Timescale(Days).
Public methodGetPageCount(PresentationFormat)
Returns page count for the project to be rendered using default Timescale(Days) and given PresentationFormat
Public methodCode exampleGetPageCount(SaveOptions)
Returns page count for the project to be rendered using given SaveOptions.
Public methodGetPageCount(Timescale)
Returns page count for the project to be rendered using given Timescale.
Public methodGetPageCount(PageSize, Timescale)
Returns page count for the project to be rendered using given Timescale and PageSize.
Public methodGetPageCount(PresentationFormat, Timescale)
Returns page count for the project to be rendered using given Timescale and PresentationFormat.
Public methodGetPageCount(PageSize, Timescale, DateTime, DateTime)
Returns page count for the project to be rendered using given Timescale, PresentationFormat and date range.
Public methodGetPredecessors
Returns a collection of task links which are predecessors of the specified task.
Public methodStatic memberGetProjectFileInfo(Stream)
Gets project file info from the stream.
Public methodStatic memberGetProjectFileInfo(String)
Read project file info from the file.
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodGetWork
Gets Duration object with the specified Double value and default work format.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrint
Prints project to the default printer with default printer settings using the standard (no User Interface) print controller.
Public methodPrint(PrinterSettings)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.
Public methodPrint(String)
Prints project to the specified printer with default printer settings using the standard (no User Interface) print controller.
Public methodPrint(PrintOptions)
Prints project to the default printer with default printer settings and custom save options using the standard (no User Interface) print controller.
Public methodPrint(PrinterSettings, PrintOptions)
Prints project according to the specified printer settings and custom save options using the standard (no User Interface) print controller.
Public methodPrint(PrinterSettings, String)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.
Public methodRecalculate
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields.
Public methodRecalculate(Boolean)
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields with optional validation.
Public methodRecalculateResourceFields
Recalculates Id, Start and Finish of resources.
Public methodRecalculateResourceStartFinish
Recalculates Start and Finish of resources.
Public methodRemoveInvalidResourceAssignments
Eliminates invalid resource assignments from the project resource assignments list.
Public methodRenumberWBSCode
Renumber WBS code of all tasks.
Public methodRenumberWBSCode(ListInt32)
Renumber WBS code of passed tasks.
Public methodRescheduleUncompletedWorkToStartAfter(DateTime)
Reschedules uncompleted project work to start after a specified date.
Public methodRescheduleUncompletedWorkToStartAfter(DateTime, ListTask)
Reschedules uncompleted work for a specified list of tasks to start after a specified date.
Public methodSave(Stream, MPPSaveOptions)
Saves the project to a stream using the specified save options.
Public methodSave(Stream, SaveFileFormat)
Saves the project data to the stream.
Public methodSave(Stream, SaveOptions)
Saves the project to a stream using the specified save options.
Public methodSave(String, MPPSaveOptions)
Saves the document to mpp file format using the specified save options.
Public methodSave(String, SaveFileFormat)
Saves the project data to the file.
Public methodSave(String, SaveOptions)
Saves the document to a file using the specified save options.
Public methodSaveAsTemplate(Stream)
Saves the project as a template to a specified stream.
Public methodSaveAsTemplate(String)
Saves the project as a template to the specified file path.
Public methodSaveAsTemplate(Stream, SaveTemplateOptions)
Saves the project as a template to a specified stream.
Public methodSaveAsTemplate(String, SaveTemplateOptions)
Saves the project as a template.
Public methodSaveReport(Stream)
Saves the project overview report to the stream.
Public methodSaveReport(String)
Saves the project overview report to PDF file.
Public methodSaveReport(Stream, ReportType)
Saves the project report of the specified type to the specified stream.
Public methodSaveReport(String, ReportType)
Saves the project report of the specified type in PDF format to the specified file path.
Public methodSelectAllChildTasks
Recursively collects all child tasks of the root task.
Public methodSet(KeyDateTime, PrjKey, DateTime)
Maps the specified property to the specified value in this container.
Public methodSetT(KeyT, PrjKey, T)
Maps the specified property to the specified value in this container.
Public methodSetBaseline(BaselineType)
Saves baseline fields to the specified baseline for the entire project.
Public methodSetBaseline(BaselineType, IEnumerableTask)
Saves baseline fields to the specified baseline for the selected tasks.
Public methodSetBaselineSaveTime
Sets the baseline save time.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateProjectWorkAsComplete(DateTime, Boolean)
Updates all work as complete through a specified date for the entire project.
Public methodUpdateProjectWorkAsComplete(DateTime, Boolean, ListTask)
Updates all work as complete through a specified date for the specified list of tasks.
Remarks

The Project is a central class in the Aspose.Tasks library.

One can use Project to read one of supported project management formats: MPP, MPT, MPX, XML.

To load an existing document in any of the supported formats, pass a file name or a stream into one of the Project constructors. To create a blank project, call the parameterless constructor.

Use one of the Save method overloads to save the project in any of the SaveFileFormat formats: Primavera: P6 XML, PM XER; Microsoft Excel: XLSX, XML; Fixed Layout: PDF; Images: JPEG, PNG, BMP, TIFF, SVG; Text: TXT; Others: HTML.

To print the project, use one of the Print method overloads.

The Project stores project-wide information such as Views, BuiltInProps, CustomProps, and ExtendedAttributes. Most of these objects are accessible via the corresponding properties of the Project class.

The Project is a root entity that contains entry points to manipulate other project entities, such as Task, Resource, ResourceAssignment, ExtendedAttribute and Calendar.

The Project entities can be accessed via typed collections, for example Children, Resources, ResourceAssignments, etc.
See Also