Beginner's question about Project 2007 (10?)

B

BC

I am primarily a VB.Net programmer. I have a VB Winforms program that calls
up an instance of Project 2003 on a pc and then dynamically creates a
project. There have been some concerns expressed that we are working with
obsolete technology and should look into something more advanced. Also it
would be nice to have something more Dot Net compatible.

What would be the simplest way to upgrade? Is it even possible to do this in
Project 2007?

(Apparently not, according to what I've seen so far. No programming
interface at all in Project 2007, not even Dot Net?)
 
R

Rod Gill

Hi,

You can go three ways:
1) stand alone application using .net and using automation to control
Project and send data
2) Use a VBA macro in Project (called from an external program using
automation and the Macro method)
3) Write an add-in for Project 2003. You would need a separately compiled
add-in for 2007

If you have a lot of data to send to project, then the copying of data
between programs is slow. Once VBA has all the data it needs it is actually
very fast as it is all running in the Project process. Consider creating an
array full of data then copy the array as that has only one overhead, not
one per datum.

VB is easier and quicker to develop code in that C# as you can:
* Copy working VBA code to VB easily
* VB intellisnese is better
* VB allows optional parameters, which given the large number of parameters
in some methods makes code much simpler to read and maintain.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com




BC said:
I am primarily a VB.Net programmer. I have a VB Winforms program that
calls
up an instance of Project 2003 on a pc and then dynamically creates a
project. There have been some concerns expressed that we are working with
obsolete technology and should look into something more advanced. Also it
would be nice to have something more Dot Net compatible.

What would be the simplest way to upgrade? Is it even possible to do this
in
Project 2007?

(Apparently not, according to what I've seen so far. No programming
interface at all in Project 2007, not even Dot Net?)

__________ Information from ESET Smart Security, version of virus
signature database 4659 (20091203) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4659 (20091203) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
B

BC

With regard to:
1). I thought that 'automation' was no longer possible in Project 2007?
2) VBA macros are probably not up to our needs. There is an enormous amount
of VB code in the Winforms app, handling matters beyond the scope of Project.
3) Probably ditto, but I'll have to look into it. (Unless an 'addin' can
have VB forms.)

Thanks.
 
C

Curmudgeon

With regard to:
1).  I thought that 'automation' was no longer possible in Project 2007?
2) VBA macros are probably not up to our needs.  There is an enormous amount
of VB code in the Winforms app, handling matters beyond the scope of Project.
3) Probably ditto, but I'll have to look into it.  (Unless an 'addin' can
have VB forms.)

Thanks.

Proj07 works fine with automation. I use Proj07 with automation,
controlling Gantt production and data crunching from Access 07 through
VBA (data comes from Access, Oracle, SQL Server, or Primavera (Oracle
backend). I'm dealing with fairly large recordsets (3000 - 5000 tasks
exported to Project per session). The initial population to Project is
not blazingly fast, but once loaded, my processes fly along. I
generate hundreds of Gantt gifs that I imagemap and display on company
intranet web sites. Gantts and aspx pages to display them are
generated at a rate of 2 or 3 per second. My processes are set up to
run automatically as scheduled tasks after midnight every day, so the
web sites always display information current as of COB yesterday. I
use JavaScript (OverLib) to display various detail information when
hot spots in the Gantts are clicked. If you have questions let me know.
 
R

Rod Gill

1) Automation is definitely available (otherwise my book would have been a
real flop!)
2) Use VBA in Project only to handle the data flow to and from Project. Your
application calls the VBA macro only when everything is ready for it.
3) An add-in is managed code so anything VB.Net can do a Project add-in can
do including Windows Forms

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com




BC said:
With regard to:
1). I thought that 'automation' was no longer possible in Project 2007?
2) VBA macros are probably not up to our needs. There is an enormous
amount
of VB code in the Winforms app, handling matters beyond the scope of
Project.
3) Probably ditto, but I'll have to look into it. (Unless an 'addin' can
have VB forms.)

Thanks.



__________ Information from ESET Smart Security, version of virus
signature database 4663 (20091205) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4663 (20091205) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
B

BC

Just to make sure I understand you.

At the core of my project is a VB.Net class that manipulates my local
installation of MS Project 2003. (VBA is just not an option, given the
complexities of the project.) The basics are something like this:

Imports MSProject = Microsoft.Office.Interop.MSProject

public class ProjectInterface
Private aApp As MSProject.Application
public function Init()
aApp = New MSProject.Application
end Function

.... and so forth with functions to add and update tasklines, etc.

This is still possible in 2007? On a local machine?
(And even more important, are there better ways? More Dot Net friendly ways?)

Thanks.
 
R

Rod Gill

Absolutely, just update the reference from 2003 to Project 2007 and all will
work.

The only .net type thing you can do is convert the app to an add-in. However
if the bulk of the app has nothing to do with project then this isn't
suitable.

Again I recommend VBA in a template purely to import and format Project data
as this will likely run faster than working from an app in a different
process. It also allows for easier updates of formatting etc.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com




BC said:
Just to make sure I understand you.

At the core of my project is a VB.Net class that manipulates my local
installation of MS Project 2003. (VBA is just not an option, given the
complexities of the project.) The basics are something like this:

Imports MSProject = Microsoft.Office.Interop.MSProject

public class ProjectInterface
Private aApp As MSProject.Application
public function Init()
aApp = New MSProject.Application
end Function

... and so forth with functions to add and update tasklines, etc.

This is still possible in 2007? On a local machine?
(And even more important, are there better ways? More Dot Net friendly
ways?)

Thanks.




__________ Information from ESET Smart Security, version of virus
signature database 4665 (20091206) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4665 (20091206) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
B

BC

This may be a silly question but I have very little exposure to VBA. What
exactly do you mean by using VBA to 'import' data?
 
R

Rod Gill

VBA code can use OLEDB to read any data you want from any database or text
file or spreadsheet.

So, your app could do all the data manipulation and merging etc then save
the data in temporary tables for Tasks, Resources, Assignments etc then the
VBA code can read it in. This would run much, much faster than an external
application exporting data to project one piece of information at a time.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com




BC said:
This may be a silly question but I have very little exposure to VBA. What
exactly do you mean by using VBA to 'import' data?




__________ Information from ESET Smart Security, version of virus
signature database 4668 (20091207) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4668 (20091207) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top