Tips ...
Reading and changing the configuration of VBXC from a macro
It is possible to set and retrieve configuration information from VBXC. The VS.NET extensibility model does not make things like this easy, therefore the approach is a bit unclean. The following sample macro displays a messagebox telling the user if VBXC is enabled or not.
Public Sub IsVBXCLoaded()
Dim oAddIn As EnvDTE.AddIn
Dim oConfig As Object
For Each oAddIn In DTE.AddIns
If oAddIn.ProgID = "VBXCAddin.Connect" Then
If oAddIn.Connected Then
oConfig = oAddIn.Object.GetConfigObject()
If oConfig.VBXCActive Then
MsgBox("VBXC is active")
Else
MsgBox("VBXC is not active")
End If
Else
MsgBox("VBXC is not loaded, please load the VBXC add-in and re-run this macro")
End If
End If
Next
End Sub
The oConfig object has other properties you can query and set the value of too. For a list of them look at the Tools | VBXC - VB.NET XML Commentor | General config ... window. The propertygrid displayed in that window works against the same object as oAddIn.Object.GetConfigObject() returns.
Moving settings between multiple computers
It might be troublesome to change the VBXC settings on each computer you use, to ease on this VBXC saves it's configuration in a XML file placed under your profile. The file can be found in the folder \Local Settings\Application Data\ and is named VBXCConfig.xml.
When copying this file to another check that the path to any custom templates are correct.
Tor-Erik Hagen © 2002-2003