These linear rail MGN12 and the block MGN12H objects with exact dimensions, are intended as help tools in prototyping and designing.
There are 2 types of rails, one without holes, that can be elongated/stretched to any desired length by changing the scale of the X axis, the other with the correct hole positioning and size is designed (as per official specifications) with the initial hole at 10 mm from the beginning of the rail and the other holes are kept at 25 mm from each others, the last hole is 15 mm apart from the end of the rail so that is sufficient to attach a new rail to get the next hole at 25mm.
For what concerns the MGN12H block, the dimensions should be correct based on official specifications even if the block looks aesthetically different from yours.
In the event that you want to 3D print them, keep in mind that you need a very high precision capable printer and smaller nozzle than 0.4, to be able to match the parts together, if instead you just need to have a mock-up for the general individual dimensions, then any printer should do.