Example: Displaying information about a baseline

' Display some information about a baseline
Dim CC As New ClearCase.Application

' Get the project VOB with tag "\projects"
Dim PVOB As CCProjectVOB
Set PVOB = CC.ProjectVOB("\projects")

' Get a particular baseline in the project VOB
Dim Baseline As CCBaseline
Set Baseline = PVOB.Baseline("V1.0.BL2.0005.test@\projects")

' Get the promotion level for this baseline
MsgBox "The promotion level of this baseline is " & Baseline.PromotionLevel

' Get the label status for this baseline
Dim Str As String
Select Case Baseline.LabelStatus
     Case ccLabelStatus_Unlabeled
          Str = "Unlabeled"
     Case ccLabelStatus_Incremental
          Str = "Incremental"
     Case ccLabelStatus_Full
          Str = "Fully labeled"
     Case Else
          Str = "Unknown label status"
End Select
MsgBox "The label status of this baseline is " & Str

' Get the stream in which this baseline was created
MsgBox Baseline.Stream & " is the stream in which this baseline was created"

' Get the component containing this baseline and
' the path to the component's root directory
Dim View As CCView
Set View = CC.View("jo_main")
MsgBox "This baseline's component is " & _
Baseline.Component.Name & " and " & vbCrLf & _
"the path to the root directory of this baseline's component is " & _
Baseline.Component.RootDirectoryElement.PathInView(View)

Feedback