Extending the MDO Model and Using the Repository Add-in

One useful extension to the MDO for developers (and development managers) would be a target completion date, or due date, for Visual Basic projects that are under development. You could then create a Visual Basic add-in that prompts you for a due date each time you create a new project. To create such an add-in, you should follow these steps:

To extend the MDO Model by adding a property, DateDue, to the MdoProject class

  1. Register the Repository Add-in for Visual Basic as an add-in.

  2. Create your add-in as a Visual Basic project.

  3. Within the Visual Basic project that implements your add-in, add references to the Microsoft Repository type library and the Microsoft Development Objects type library.

  4. Register your add-in with Visual Basic.

After you have registered your add-in, it will prompt you for a due date each time you create a new Visual Basic project. (To learn how to extend an information model, see Information Model Creation.

To create a Visual Basic project that implements your add-in

  1. At design time, create an MdoProjectEvents event sink module.

  2. At run time, when your add-in is started, it must register your event sink object for project-related events via the RepVB.ConnectProjectEvents method of the Repository Add-in.

  3. When a new project is created, the ObjectAdded method of your event sink object will be invoked.

  4. Within that method, prompt the user for a due date and establish that user-supplied date as the value of the property DueDate in the repository’s representation of the new project.

For More Information   RepVB Object; MdoProjectEvents Object