Including a document into a project using code...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xavendano

    #1

    Including a document into a project using code...

    Hi,

    I have a tool made in vb.net that generate code.....class files o mod files.

    If this tool is an Add-in, how can I insert this new files into a current
    project using code...????

    Thanks......


  • Peter Macej

    #2
    Re: Including a document into a project using code...

    In add-in or macro, you can use
    DTE.ItemOperati ons.AddNewItem( "Local Project Items\Class", "Class1.vb" )
    to add new class or
    DTE.ItemOperati ons.AddExisting Item("C:\Class1 .vb")
    to add existing file.

    --
    Peter Macej
    Helixoft - http://www.vbdocman.com
    VBdocman - Automatic generator of technical documentation for VB, VB
    ..NET and ASP .NET code

    I have a tool made in vb.net that generate code.....class files o mod files.
    >
    If this tool is an Add-in, how can I insert this new files into a current
    project using code...????

    Comment

    • xavendano

      #3
      Re: Including a document into a project using code...

      Thanks Peter.....

      Excuse me, my english is so bad.....

      That DTE object is a EnvDTE referece I supposse.....bu t can you show me how
      to declare the object....
      Example:

      Dim x As New EnvDTE.Projects Events???

      That is correct? How can I find the correct objetc into a EnvDTE
      reference...

      Thanks....


      "Peter Macej" <peter@vbdocman .comwrote in message
      news:ei60gTZoGH A.2268@TK2MSFTN GP04.phx.gbl...
      In add-in or macro, you can use
      DTE.ItemOperati ons.AddNewItem( "Local Project Items\Class", "Class1.vb" )
      to add new class or
      DTE.ItemOperati ons.AddExisting Item("C:\Class1 .vb")
      to add existing file.
      >
      --
      Peter Macej
      Helixoft - http://www.vbdocman.com
      VBdocman - Automatic generator of technical documentation for VB, VB .NET
      and ASP .NET code
      >
      >
      >I have a tool made in vb.net that generate code.....class files o mod
      >files.
      >>
      >If this tool is an Add-in, how can I insert this new files into a current
      >project using code...????
      >
      >

      Comment

      Working...