As far as I know the old Sturmey Archer "Dynohub" hub dynamos were all the same size, but a variety of spoke holes were offered -- 28, 32, 36 to be sure, perhaps others as well.
Dynamo hubs from other manufacturers could well be different.
To calculate the spoke length, start at Sheldon Brown's
page on spoke calculation. Dan Halem's calculator (third link) has the SA dynohub dimension; so you just need to find your rim and you'll be off and running.