if you have the full version of Autocad 2002 and not the LT version, then it is possible.... BUT.... the caveat ~ not without some custom programming.
A program could be written which would prompt you for the start point and end point of each rail, it could then draw the rails automatically.
Once you were finished creating the rails, the program could count each indivdual length and give you a running total and a complete parts listing (even down to the number of fixings).
I did a similar program some time ago which then exported all the details to a spreadsheet for costing.
If you don't want to go down the custom programming route, I would suggest using a spreadsheet for your calculations