Palisade Knowledge Base

HomeMore on NetworksOverview@RISK with Project Files on a Server

1.1. @RISK with Project Files on a Server

Applies to:
@RISK 6.x/7.x
@RISK for Project 4.x

Can I run @RISK with an .MPP file that resides on a server?

Yes, if it's an actual .MPP file.

What about a project in Microsoft Project Server?

A problem does arise if your files are stored in Microsoft Project Server, because in this case there is no actual .MPP file for @RISK to work with. If you have files stored in Project Server, follow these steps to use @RISK with your project:

In @RISK 6.x/7.x:

  1. Get the project from Project Server, so that it is a regular MPP file. It could be on a server or on your local computer, but it will probably simulate faster if it's on your local computer.
  2. Start @RISK and load the Excel workbook associated with the project. @RISK will open the linked MPP file in Microsoft Project automatically. (If this is the first time you're working with this particular project in @RISK, open @RISK and click Project » Import MPP File.)
  3. When finished, close Excel. (@RISK will close Microsoft Project for you.) Return the project to Project Server. Store the Excel workbook for future use, to avoid re-importing the MPP file from scratch next time.

In @RISK for Project 4.x:

  1. Get the project from the server, so that it is a regular MPP file on your local computer.
  2. Run the project locally, then start @RISK.
  3. When finished, return the project to the server.

Can we automate the process of checking the MPP file out of Project Server and back in?

Yes, use the FileOpenEx method to get the file from Project Server, and the SaveForSharing method to save it as a local MPP file, and finally Names.Add to update the link from @RISK to the project file. Here's some sample code to place in a module in your Excel workbook:

Private Sub OpenProject()
On Error GoTo fail:
'Declare variables
Dim appProj As MSProject.Application
Dim aProg As MSProject.Project
Dim filePath As String

Set appProj = CreateObject("MSProject.Application")

'Open project from MS Project Server:
appProj.FileOpenEx Name:="<>\Example Drilling Project", ReadOnly:=False, _
    UserId:="", _
    DatabasePassword:="mypassword", FormatID:="MSProject.odbc"

'Set active project
Set aProg = appProj.ActiveProject

'Show MS Project window
appProj.Visible = True

'Save project as MPP temporarily. Make sure project is open as read/write.
filePath = ActiveWorkbook.Path & "\" & aProg.Name & ".mpp"
appProj.SaveForSharing Filename:=filePath

'Update RiskMPPPath
ActiveWorkbook.Names.Add Name:="RiskMPPPath", RefersTo:=filePath

If Err.Number <> 0 Then MsgBox Err.Description
End Sub

In your VBA module, you'll need to set a reference to the Microsoft Project nn.0 Object Library, where nn is 12 for Project 2007, 14 for Project 2010, 15 for Project 2013, or 16 for Project 2016.

What about enterprise custom fields?

@RISK cannot read enterprise custom fields, only local custom fields, even if the .mpp file is stored locally.

Additional keywords: Enterprise Project Management

Last edited: 2015-12-29

This page was: Helpful | Not Helpful