DTE Interface
The top-level object in the Visual Studio automation object model. The documentation for the _DTE type is the most complete.
Assembly: EnvDTE (in EnvDTE.dll)
| Name | Description | |
|---|---|---|
![]() | ActiveDocument | Gets the active document.(Inherited from _DTE.) |
![]() | ActiveSolutionProjects | Gets an array of currently selected projects.(Inherited from _DTE.) |
![]() | ActiveWindow | Returns the currently active window, or the top-most window if no others are active. (Inherited from _DTE.) |
![]() | AddIns | |
![]() | Application | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _DTE.) |
![]() | CommandBars | Gets a reference to the development environment's command bars.(Inherited from _DTE.) |
![]() | CommandLineArguments | Gets a string representing the command line arguments.(Inherited from _DTE.) |
![]() | Commands | |
![]() | ContextAttributes | Gets a ContextAttributes collection which allows automation clients to add new attributes to the current selected items in the Dynamic Help window and provide contextual help for the additional attributes.(Inherited from _DTE.) |
![]() | Debugger | Gets the debugger objects.(Inherited from _DTE.) |
![]() | DisplayMode | Gets the display mode, either MDI or Tabbed Documents.(Inherited from _DTE.) |
![]() | Documents | Gets the collection of open documents in the development environment.(Inherited from _DTE.) |
![]() | DTE | Gets the top-level extensibility object.(Inherited from _DTE.) |
![]() | Edition | Gets a description of the edition of the environment.(Inherited from _DTE.) |
![]() | Events | |
![]() | FileName | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _DTE.) |
![]() | Find | |
![]() | FullName | Gets the full path and name of the object's file.(Inherited from _DTE.) |
![]() | Globals | |
![]() | IsOpenFile[String^, String^] | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _DTE.) |
![]() | ItemOperations | Gets the ItemOperations object.(Inherited from _DTE.) |
![]() | LocaleID | Gets the ID of the locale in which the development environment is running.(Inherited from _DTE.) |
![]() | Macros | |
![]() | MacrosIDE | Gets the root of the Macros IDE's automation model.(Inherited from _DTE.) |
![]() | MainWindow | |
![]() | Mode | Gets the mode of the development environment, either debug or design.(Inherited from _DTE.) |
![]() | Name | |
![]() | ObjectExtenders | Gets the ObjectExtenders object.(Inherited from _DTE.) |
![]() | Properties[String^, String^] | Returns a Properties collection representing all available categories and subcategories contained in the Options dialog box on the Tools menu.(Inherited from _DTE.) |
![]() | RegistryRoot | Gets a string with the path to the root of the Visual Studio registry settings.(Inherited from _DTE.) |
![]() | SelectedItems | Gets a collection containing the items currently selected in the environment.(Inherited from _DTE.) |
![]() | Solution | |
![]() | SourceControl | Gets a SourceControl object that allows you to manipulate the source code control state of the file behind the object.(Inherited from _DTE.) |
![]() | StatusBar | |
![]() | SuppressUI | Gets or sets whether UI should be displayed during the execution of automation code.(Inherited from _DTE.) |
![]() | UndoContext | Gets the global UndoContext object.(Inherited from _DTE.) |
![]() | UserControl | Sets or gets a value indicating whether the environment was launched by a user or by automation.(Inherited from _DTE.) |
![]() | Version | Gets the host application's version number.(Inherited from _DTE.) |
![]() | WindowConfigurations | Gets the WindowConfigurations collection, representing all available window configurations.(Inherited from _DTE.) |
![]() | Windows |
| Name | Description | |
|---|---|---|
![]() | ExecuteCommand(String^, String^) | Executes the specified command.(Inherited from _DTE.) |
![]() | GetObject(String^) | Gets an interface or object that is late-bound to the DTE object and can be accessed by name at run time.(Inherited from _DTE.) |
![]() | LaunchWizard(String^, array<Object^>^) | Runs a wizard with the supplied parameters.(Inherited from _DTE.) |
![]() | OpenFile(String^, String^) | This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _DTE.) |
![]() | Quit() | Closes the environment.(Inherited from _DTE.) |
![]() | SatelliteDllPath(String^, String^) | Returns the computed path to the satellite DLL when given the installation directory and the file name of the DLL containing localized resources.(Inherited from _DTE.) |
For details about referencing the EnvDTE namespace and the DTE object, see FAQ: Converting Add-ins to VSPackage Extensions.
Sub DTEExample() Dim objTextDoc As TextDocument Dim objEP As EditPoint ' Create a new text document. DTE.ItemOperations.NewFile("General\Text File") ' Get a handle to the new document. Set objTextDoc = DTE.ActiveDocument.Object("TextDocument") Set objEP = objTextDoc.StartPoint.CreateEditPoint ' Create an EditPoint and add some text. objEP.Insert "A test sentence." End Sub

