D
David Schenkler
I am getting an Argument Not Optional error for the following code, and I do not know why. (If you do not recognize something it is because the code comes from a different reference.)
Private Function isHeader(reqIdAsString As String) As Boolean
Dim reqId As Long
reqId = CLng(reqIdAsString)
Dim objRequirement As Requirement
Set objRequirement = objSession.getRequirement(reqId)
Dim objChildren As IStCollection
Set objChildren = objRequirement.ChildRequirements
If objChildren.count > 0 Then
Dim objUDA As UDABooleanValue
Set objUDA = objSession.Attribute
Dim objInterfaceType As IStCollection
Set objInterfaceType = objUDA.AttributeType
If objInterfaceType = "Interface Type" Then
Dim interfaceType As String
If interfaceType = "Header" Then
isHeader = True
ElseIf interfaceType = "Body" Then
isHeader = True
ElseIf interfaceType = "Trailer" Then
isHeader = True
Else
isHeader = False
End If
End If
End If
End Function
Private Function isHeader(reqIdAsString As String) As Boolean
Dim reqId As Long
reqId = CLng(reqIdAsString)
Dim objRequirement As Requirement
Set objRequirement = objSession.getRequirement(reqId)
Dim objChildren As IStCollection
Set objChildren = objRequirement.ChildRequirements
If objChildren.count > 0 Then
Dim objUDA As UDABooleanValue
Set objUDA = objSession.Attribute
Dim objInterfaceType As IStCollection
Set objInterfaceType = objUDA.AttributeType
If objInterfaceType = "Interface Type" Then
Dim interfaceType As String
If interfaceType = "Header" Then
isHeader = True
ElseIf interfaceType = "Body" Then
isHeader = True
ElseIf interfaceType = "Trailer" Then
isHeader = True
Else
isHeader = False
End If
End If
End If
End Function