I too did both at the same time. Some months after putting Gold Valves up front (stock springs), I sent my rear shock to RT for a new spring, rebuilding and a new preload hose.
Before starting work, I measured the front sag - this is what I did: With the bike on the center stand, and no weight on the front* measure from the top of the fork's dust cap to the bottom of the triple clamp. Record this number. Take the bike off the center stand, bounce the forks a couple of times, pull up on the handle bars and let the bike settle. Measure the new distance from the dust cap to t-clamp. Record this number. Note that it is a lot easier to have a helper holding the bike upright while you measure. Now, with full riding gear, climb aboard and pull up on the handle bars, let it settle as you put your feet on the pegs. Measure again and record the third number. It is probably best to have one person doing all the measuring - a helper - since it is difficult to sit on your bike and measure the sag. Note that I did three measurements at each step of the process - compress, release, measure, etc. x 3 and averaged the results. Then I did a second complete series, called Trial 2. Stiction accounts for the differences.
I posted a few questions and
@dwalby sent me a multiplier that was used to determine the preload. I will try to post my excel worksheet below - it shows every step I took and that magic multplier - 1.2 for stock springs is included. I don't know how you would set the length of the preload spacer without the information learned from what the bike was doing with the original suspension, nor do I know how to do it if you change the spring to one with a different strength. Theoretically, if you know the weight the bike puts on the front end, and the spring's characteristics - the weight to compress it 1 mm (kg/mm) - you could calculate what length the preload spacer should be. How we, without oodles** of experience setting up bike's suspensions do this correctly the first time is beyond me. I think you will have to take RT's advice and then test the sag per above. Then you can adjust it to get the proper sag.
Ideally you want the bike's total sag with rider and all tools/gear in top and side cases to be about 1/3 of the total length available (the first number you found for the unweighted fork).
i could not figure out how to attach an excel file, so here is a picture of the spreadsheet. I can em it to you if you want - PM me.
* Someone has to push down on the rear of the bike to lift the front off the ground
** Oodle - measure of experience - units are oodes, centioodes, millioodes, etc. Discussions are underway at institutions of higher learning (hard knocks, etc.) to arrive at a consensus of how many oodes are necessary to be called a guroode.