Download Programmers Manual - RSAP
Transcript
Column 5: Vehicle type Print the run date, time, Excel version and RSAP version in the Feature Report Select shPOCscratch.Range(B11) the alternative column ‘Set up initial values Row=9 Totalcrash=0 Prvcrash=0 Redirectrollcrash=0 Vsl=shPrjInfo.Range(F18).value value of statistical life Clear shResults.Range(A9:I5000) Do Until alternative is blank ‘Read the row of data from shPOCscratch Alt=selection.offset(0,0) ‘the alternative number Seg=selection.offset(0,-1) ‘the segment number Haz=selection.offset(0,6) ‘the hazard number Hazname=selection.offset(0,5) ‘the hazard name Vehicle=selection.offset(0,3) ‘the vehicle type numEncr=selection.offset(0,4) ‘number of encroachments encrType=selection.offset(0,1) & selection.offset(0,2) ‘read the number of expected encroachments for each encr type Select Case encrType Case “PR” Encr=shRdSegs.cells(13+seg,”G”) Case “PL” Encr=shRdSegs.cells(13+seg,”H”) Case “OR” Encr=shRdSegs.cells(13+seg,”I”) Case “OR” Encr=shRdSegs.cells(13+seg,”J”) Case Else Error message End Select ‘Find the vehicle cost adjustment and traffic mix I=14 Do Until shTraffInfo.cells(I,4).value=”” If shTraffInfo(cells(I,4).value=vehicle then ‘look for a match vehicleMix=shTraffInfo.cells(I,3) Exit Do End If C-147