The steps are:
Start the rectangle tool (press the r key).
Orient it in the direction you want (use arrow keys to force the axis Right for red axis, Left for green direction, Up for blue direction, Down for parallel to edge or at right angles to edge).
[If you don’t use an arrow key, SU will draw in the plane it is most nearly ‘looking at’. So if you are mostly looking down from the top, and start over an empty background it will draw on the x-y (red-green) plane. If you are looking mainly from the front, it will draw in the x-z (red-blue) plane, and if from left or right, in the y-z (green-blue) plane]
Click on the start point, then move the mouse in the direction you want but don’t worry about how far
Type the width and thickness of the beam, separated by comma (US and most English speaking countries) or semicolon (most European countries or non-English versions of SU), then press Enter key. The dimensions may draw in the wrong order, in which case just type again swapping the first and second dimension. The dimensions will appear in the measurement box
Select the rectangular face you have just drawn if it isn’t already selected, then press the p key to start the PushPull tool, and click at the start of the length you want to draw. That doesn’t have to be on the rectangle, but can if you wish start on some other inference point from which you want to infer the length
Type the length (
30" for example or
2'6), and press Enter key to finish, or click on an inference point at the length you want, so it fits some other part you have already drawn. Don’t move the mouse before you press Enter - if you do, that may be why you are not getting the exact length or dimensions you typed
If you are mainly drawing rectangular beams or similar objects, try the free Wood Framing plugin from the SketchUcation Plugin Store. That will draw your piece as a named component in as little as three clicks once you have chosen its width and thickness.
Here’s a direct link to it.
If you haven’t previously registered you will need to create a (free) account first, before you can download the plugin and install it.