1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| If ligneTrouvees.Length = 0 Then
'MsgBox("Il n'y a pas de valeurs pour le matériau choisi.")
Else
For Each ligne In ligneTrouvees
' Recherche des bornes inférieure et supérieure des températures
If TempCelsius < -30 And Not IsDBNull(ligne.Item(8)) Then
dStressAllowInf = 0
dStressAllowSup = ligne.Item(8)
dTemperatureInf = 0
dTemperatureSup = -30
ElseIf TempCelsius <= 40 Then
dTemperatureInf = -30
dTemperatureSup = 40
If Not IsDBNull(ligne.Item(8)) And Not IsDBNull(ligne.Item(9)) Then
dStressAllowInf = ligne.Item(8)
dStressAllowSup = ligne.Item(9)
Else
dStressAllowInf = 0
dStressAllowSup = 0
End If
ElseIf TempCelsius <= 65 Then
dTemperatureInf = 40
dTemperatureSup = 65
If Not IsDBNull(ligne.Item(9)) And Not IsDBNull(ligne.Item(10)) Then
dStressAllowInf = ligne.Item(9)
dStressAllowSup = ligne.Item(10)
Else
dStressAllowInf = 0
dStressAllowSup = 0
End If
ElseIf TempCelsius <= 100 Then
dTemperatureInf = 65
dTemperatureSup = 100
If Not IsDBNull(ligne.Item(10)) And Not IsDBNull(ligne.Item(11)) Then
dStressAllowInf = ligne.Item(10)
dStressAllowSup = ligne.Item(11)
Else
dStressAllowInf = 0
dStressAllowSup = 0
End If
ElseIf TempCelsius <= 900 Then
i = 0
While TempCelsius <= 900 - (i * 25)
dTemperatureInf = 900 - ((i + 1) * 25)
dTemperatureSup = 900 - (i * 25)
i += 1
End While
Try
If Not IsDBNull(ligne.Item(44 - i)) _
And Not IsDBNull(ligne.Item(44 - i + 1)) Then
dStressAllowInf = ligne.Item(44 - i)
dStressAllowSup = ligne.Item(44 - i + 1)
Else
If Not IsDBNull(ligne.Item(44 - i)) _
And Not IsDBNull(ligne.Item(44 - i + 2)) _
And TempCelsius <= 875 Then
dStressAllowInf = ligne.Item(44 - i)
dStressAllowSup = ligne.Item(44 - i + 2)
Else
If Not IsDBNull(ligne.Item(44 - i - 1)) _
And Not IsDBNull(ligne.Item(44 - i + 1)) _
And TempCelsius <= 875 Then
dStressAllowInf = ligne.Item(44 - i - 1)
dStressAllowSup = ligne.Item(44 - i + 1)
End If
End If
End If
Catch
TB_metSa.Text = "NA"
Exit Function
'MsgBox("Veuillez vérifier la saisie de votre température et de votre matériau car sa sontrainte admissible n'est pas interpolable")
End Try
End If
Next
End If |