Skip to content

RA Facility

Marcio SampaioMember for 20 years 11 months
Created
12
1
0
Dear PP members;

Do you have any experience using RA facility in P3?

Kind Regards;

Marcio Eduardo
Rio de Janeiro - Brazil

12 replies

Oldest first
  1. 0
    Marcio Sampaio ·
    And could u please explain advantages and usage of RA?
  2. 0
    Hannes de Bruyne ·
    Yes, I have quit a lot of exprience with RA - RA is like Visual Basic for Applications in Excel or Access. Therefore it has the same advantages. In fact you can combine VBA with RA, so that P3 can comunicate with Office-applications (including MS-Project). Quit useful. I can help you with a simple example.

    Regards Hannes
  3. 0
    Marcio Sampaio ·
    Thanks a lot Hannes de Bruyne;

    Could u please show us the example u have??

    I would appreciate a lot.

    Kind regards,

    Marcio Eduardo.
  4. 0
    Hannes de Bruyne ·
    Hi

    just open an Excel-sheet,
    than Extras ->Macros ->VisualBasicEditor

    Copy following Text into the Edito sheet. It is a short macro, much shorter than the example of Primavera, therefore it can be understood very easy. You Excel-File must have two sheets named:P3-Resources and Success

    Dim session As Object
    Dim proj As Object
    Dim act As Object
    Dim res_id As Object
    Dim succes As Object
    Dim bret As Boolean
    Dim username, password, projectname As String
    Dim xRow, ActNos As Integer
    Dim sheet As Workbooks

    Sub Primavera()
    Set session = CreateObject("P3Session")
    username = Application.InputBox("Please enter Username:", "login", "debruyne")
    password = ""
    bret = session.Login(username, password, True)

    Worksheets("P3-Resources").Cells(1, 1).Value = "ActivityID"
    Worksheets("P3-Resources").Cells(1, 2).Value = "Description"
    Worksheets("P3-Resources").Cells(1, 3).Value = "Resource"
    Worksheets("P3-Resources").Cells(1, 4).Value = "BudgetedCost"
    Worksheets("P3-Resources").Cells(1, 5).Value = "BudgetedQuantity"
    projectname = Application.InputBox("Please enter ProjectName:", "project", "li01")
    Set proj = session.openproject(projectname, 0, 99)
    xRow = 2
    ActNos = 1
    For Each act In proj.activities
    Worksheets("P3-Resources").Cells(xRow, 1).Value = act.ActivityID
    Worksheets("P3-Resources").Cells(xRow, 2).Value = act.Description
    For Each res_id In act.ResourceAssignments
    Worksheets("P3-Resources").Cells(xRow, 3).Value = res_id.ResourceName
    Worksheets("P3-Resources").Cells(xRow, 4).Value = res_id.BudgetedCost
    Worksheets("P3-Resources").Cells(xRow, 5).Value = res_id.BudgetedQuantity
    xRow = xRow + 1
    Next
    ActNos = nos + 1
    Application.StatusBar = ("Activity: " & xRow)
    Next


    Worksheets("Success").Cells(1, 1).Value = "ActivityID"
    Worksheets("Success").Cells(1, 2).Value = "Description"
    Worksheets("Success").Cells(1, 3).Value = "Driving"
    Worksheets("Success").Cells(1, 4).Value = "Successor"
    Worksheets("Success").Cells(1, 5).Value = "Lag"
    Worksheets("Success").Cells(1, 6).Value = "Type"
    xRow = 2
    ActNos = 1
    For Each act In proj.activities
    Worksheets("Success").Cells(xRow, 1).Value = act.ActivityID
    Worksheets("Success").Cells(xRow, 2).Value = act.Description


    For Each succes In act.Successors
    Worksheets("Success").Cells(xRow, 3).Value = succes.IsDriving
               Worksheets("Success").Cells(xRow, 4).Value = succes.SuccessorActivityId
    Worksheets("Success").Cells(xRow, 5).Value = succes.RelationShipLag
    Worksheets("Success").Cells(xRow, 6).Value = succes.RelationShipType

    xRow = xRow + 1
    Next
    ActNos = nos + 1
    Application.StatusBar = ("Activity: " & xRow)
    Next

    session.closeproject proj
    End Sub
  5. 0
    Marcio Sampaio ·
    Hello Hannes de Bruyne;

    Great!!!

    Thanks a lot.

    Kind regards.

    Marcio Eduardo.
  6. 0
    Christian Adrian De Vera ·
    Hello Hannes,

    Agree with you that creating your own macro would be better than RA facility but I also think that RA is only a template and each user can customize it according to their specific data requirement...

    btw would there be any shorter version of your codes? ;-)
    as for me I’m not quite familiar with VBA scripts but what I do is just record the steps to create my macros... just adding my thoughts...

    Cheers!

    Christian
  7. 0
    Zhang Haixiang ·
    Excel can only record the operation in Excel,
    For RA, you must write you own code,
    the above code is quite simple, but useful.
    it demostrate how to login in P3 (RA) and open project file.
    It’s always require while using RA
  8. 0
    Marcio Sampaio ·
    Thanks IC;

    I’m going to see this files on CD and study more about RA.

    Regards.
  9. 0
    Milind Pandhare ·
    can any one tell me from where i wiill get the CD to study
  10. 0
    Marcio Sampaio ·
    Milind,

    I thought that I would find it on installation CDs. But i’m not finding.

    IC,

    Could u please tell us where are this files??

    Thanks and regards.

    Marcio Eduardo.

  11. 0
    Marcio Sampaio ·
    Thanks IC ... now i found it.

    Regards.
  12. 0
    Abdul Raheem Mohammed ·
    Hi ALL
    I had a thought of using Ra to export all data from my project to EXCEL in the same format as layout in P3 so that when a person at remote site location or site engineer look at this EXCEL sheet can easily understand the area of each activity and update(write in Excel sheet) actual dates.
    So that when i recieve this file at head office it can be just uploaded to get monthly update.

    So is there any code script you konw which should arrange activities in excel area wise as per "layout 01" in p3

    please advise

    thank you and regards

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?