How precise do you need?
If I need to route a straight cut I cut 3/4" MDF to the length I need on the table saw. Straight edge* ready to use.
*Depending on how well your table saw is set up, you can use the cut edge as is. If it needs a little touch up. hit it with a hand plan.
Why MDF? Easy to mill, fairly inexpensive and very static (doesnt measurably shrink or expand). Cons - the dust is absolutely evil. Use a mask or dust collection when working with it. I make a majority of my templates and fixtures out of MDF.