It is highly unlikely that the new rim will be exactly the same size as the old one, even though the rims' tyre sizes are the same.
For wheelbuilding purposes, rim sizing is the diameter between opposing spoke holes from a position inside the rim where the nipple will seat. This varies with rim profile. To use an extreme example, a deep section ZIPP rim will be visibly smaller than a Mavic Open PRO, even though the two use the same tyre.
Differences as small as 1mm could render the new rims useless since your current spokes will be either too long or too short.
If you buy the new rims and the size is wrong, you will have to buy new spokes as well. Then the job becomes a wheel build rather than just a rim transplant.