Objects

An object is a discrete identifiable thing. It can be something generic, such as a window or a toolbar; or it can be something specific to Microsoft Project, such as a project or a resource. Most objects have at least three common properties, such as the following:

Name This is the name of the object, such as "project" or "calendar." Application This is a way to access the object that represents the software itself. Parent This is a way to access the object that precedes the object in the object model.

Objects also usually have properties specific to their types. For example, a Task object has properties that return the start and finish dates. Because objects form the basis of how you interact with Microsoft Project, they also have methods and events.

A collection is a group of objects, almost always of the same type: A Tasks collection, not surprisingly, is made up of Task objects. Collections typically have the following features:

An Add method This is a way to add a new object to the collection. An Item property This is a way to access a particular object in the collection. A Count property This is the number of objects in the collection.

Perhaps confusingly, a collection is also an object, which means that a collection can have all the same features of an object, including properties (such as Name, Application, and Parent) and methods.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment