This documentation is archived and is not being maintained.

VCFileCodeModel Object

Visual Studio .NET 2003

An object representing the code elements in a source file.

[Visual Basic .NET]
Public Interface VCFileCodeModel
   Inherits IDispatch
[Visual Basic 6]
Class VCFileCodeModel
interface VCFileCodeModel : IDispatch
public interface VCFileCodeModel : IDispatch
[JScript .NET]
public interface VCFileCodeModel extends IDispatch


The VCFileCodeModel object is used to modify an existing source file and the code elements contained within.

Note   A large part of the functionality of this object is provided by the Visual Studio FileCodeModel object. For more information, see FileCodeModel object.


Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll


This example retrieves the VCFileCodeModel for the first project item of the current solution. It assumes a default MFC project is open.

Sub GetSourceFile()
    Dim vcFile as VCFileCodeModel
    Dim project as Project
    project = DTE.Solution.Item(1)
    vcFile = project.ProjectItems.Item(1).FileCodeModel
End Sub

See Samples for Code Model Extensibility for information on how to compile and run this sample.

See Also

VCFileCodeModel Object Properties, Methods, and Events | Visual C++ Extensibility Object Model