Home All Groups Group Topic Archive Search About

Including a document into a project using code...

Author
6 Jul 2006 8:05 PM
xavendano
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......

Author
7 Jul 2006 7:13 AM
Peter Macej
In add-in or macro, you can use
DTE.ItemOperations.AddNewItem("Local Project Items\Class", "Class1.vb")
to add new class or
DTE.ItemOperations.AddExistingItem("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


Show quoteHide quote
> 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...????
Author
7 Jul 2006 3:35 PM
xavendano
Thanks Peter.....

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

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

Dim x As New EnvDTE.ProjectsEvents???

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

Thanks....


Show quoteHide quote
"Peter Macej" <pe***@vbdocman.com> wrote in message
news:ei60gTZoGHA.2268@TK2MSFTNGP04.phx.gbl...
> In add-in or macro, you can use
> DTE.ItemOperations.AddNewItem("Local Project Items\Class", "Class1.vb")
> to add new class or
> DTE.ItemOperations.AddExistingItem("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...????
>
>