Share via


Visual Basic Concepts

The Data Environment Extensibility Object Model

Using the Data Environment Extensibility Object Model you can programmatically manipulate your DataEnvironment object at . Extensibility is the capacity to extend the function of the development environment, thereby adding something to it that didn't exist there before. The Data Environment has an easy-to-understand modular system for customizing its environment through a programming interface known as the Extensibility Object Model. Using this model you can create add-in extensions to the Visual Basic Integrated Development Environment (IDE).

All functionality that is available through the Data Environment designer's user interface is also available through its Extensibility Object Model.

To prevent the display of user interface when using the Extensibility Object Model to add and delete objects, you must set the option properties directly from the Data Environment. For example, to ensure that no deletion confirmation user interface appears, set the PromptDelete property of the DataEnvironment object to False.

Note   This example changes the confirmation setting for all DataEnvironment objects on your system and is not automatically reset. Therefore, you should return this to its default setting when complete.

Before you can use the Data Environment Extensibility Object Model, you must reference it in Visual Basic.

To reference the Data Environment Extensibility Object Model

  1. On the Project menu in Visual Basic, click References.

  2. From the References dialog box, select Microsoft Data Environment Extensibility Objects 1.0, and then click OK.

When using the Extensibility Object Model, the DesignerID of the Data Environment designer is DEDesigner.DataEnvironment, and the object reference is DEExtDesigner.

All Data Environment methods, objects, and properties available to you through the Extensibility Object Model are documented in the Visual Basic Language Reference. See the .

Using Your Data Environment in an Add-in

By using the Extensibility Object Model you can use your Data Environment in an add-in. The add-in can be:

  • A wizard to create a DataEnvironment object and automatically bind it to a form.

  • An alternative interface (other than the Data Environment) to create and modify DataEnvironment objects.

  • A means to programmatically obtain information about an existing DataEnvironment object.

  • A way to programmatically create a hierarchical set of Command objects using properties, and then obtain the ShapeText property to obtain the valid SHAPE Command generated by the DataEnvironment object.