This documentation is archived and is not being maintained.

VCCodeMap Interface 

An object representing a map code element in the source code of a solution.

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("17730D4A-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeMap
/** @attribute GuidAttribute("17730D4A-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeMap
GuidAttribute("17730D4A-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeMap

The main purpose of the VCCodeMap object is to modify an existing map element. Modifications include adding and removing map entries and modifying the properties of existing map entries.

A map element is any code element beginning with a BEGIN_XXX_MAP macro and ending with a END_XXX_MAP macro. Some common examples are:

This example retrieves the first VCCodeMap object of the current solution and displays it in a message box. It assumes a default MFC project is open.

Sub GetFirstMap()
    Dim vcCM As VCCodeModel
    Dim vcMap As VCCodeMap
    vcCM = DTE.Solution.Item(1).CodeModel
    vcMap = vcCM.Maps.Item(1)
    MsgBox(vcMap.DisplayName)
End Sub
Show: