Filter requirements by type
Public Sub FilterReqsByType()
      
' Filter requirements by type

' Fetch all the requirements of a specific
' type (for example, Business).
 
Dim oReqFactory As IReqFactory2
Dim oList As IList
Dim aFilter As ITDFilter
Dim oReq As IReq
Dim RType As ReqType
 
    Set oReqFactory = tdc.ReqFactory
    Set aFilter = oReqFactory.Filter

    ' Value of predefined type is
    ' from TDAPI_PREDEFINED_REQ_TYPES.
    aFilter.Filter("RQ_TYPE_ID") = REQ_TYPE_BUSINESS 'REQ_TYPE_UNDEFINED

    ' Value of custom type is the type ID, for example:
    'aFilter.Filter("RQ_TYPE_ID") = 101

    Set oList = aFilter.NewList

    For Each oReq In oList
        Debug.Print oReq.Name & " : " & CStr(oReq.TypeId) & " : " & oReq.RequirementType.Name
    Next

End Sub