' 指定されたユーザーによって所有されているすべてのビューが、 ' 特定のプロジェクト VOB 内のすべてのプロジェクトで、そのユーザーによって ' 所有されているすべての開発ストリームに接続されているかどうかを判別します。 Dim CC As New ClearCase.Application ' "¥projects" というタグが付いたプロジェクト VOB を取得します。 Dim PVOB As CCProjectVOB On Error Resume Next Set PVOB = CC.ProjectVOB("¥projects") If Err.Number <> 0 Then MsgBox "Error getting project VOB: " & Err.Description Else ' プロジェクト VOB 内のプロジェクトを取得し、それぞれを反復して、 ' プロジェクトに開発ストリームが接続されているかどうかを判別します。 Dim Projects As CCProjects Dim Name As String Dim Str As String On Error Resume Next Str = "" Set Projects = PVOB.Projects If Err.Number <> 0 Then MsgBox "Error getting projects from project VOB: " & _ Err.Description Else MsgBox "Iterating over " & Projects.Count & " Project(s)" Name = "rational¥jed" Dim Project As CCProject For Each Project In Projects ' プロジェクトに "Name" によって所有される開発ストリームがある場合は、 ' それらのストリームに接続している、"Name" が所有するビューを取得します。 If Project.HasStreams Then Dim Streams As CCStreams Dim Stream As CCStream Set Streams = Project.DevelopmentStreams(Name) For Each Stream In Streams Dim Views As CCViews Set Views = Stream.Views(Name) Dim View As CCView For Each View In Views Str = Str & View.TagName & " in stream: " & _ Stream.Title & vbCrLf Next Next End If Next End If If Str = "" Then MsgBox "No views owned by " & Name Else MsgBox "Views owned by " & Name & " :" & vbCrLf & Str End If End If