The Paul Scherrer Institut is building an X-ray free electron laser (SwissFEL) providing a source of intense, ultra-short pulses of coherent radiation in the wavelength range of 0.1 nm to 0.7nm. For the hard X-ray beam line, the magnet section in GFA/ATK has the responsibility for the design, the procurement and the magnetic qualification of 267 electro-magnets of 22 different types. Several design studies were performed in an attempt to meet the required magnet specifications while optimizing construction and operation cost. Various types of dipole magnets (26 units in total) are used to bend the electron beam either horizontaly or vertically, whereas quadrupoles of 45 mm, 22 mm and 12 mm aperture (173 units), solenoids (10 units) and sextupoles (14 units) provide linear and non-linear focusing. Separate dipole correctors (44 units) complete the production. The majority of the magnets were manufactured in industry according to detailed magnet section specifications. A strict Quality Assurance strategy based on (1) the qualification of the manufacturing tools, (2) the monitoring of the critical steps in the assembly phase and (3) the application of the qualified procedures and full traceability was applied. A dedicated magnet measurement plan for the magnetic qualification, in house, of all the magnets at their operating conditions and within the required tolerances was implemented. It includes an accurate assessment of the field quality and the determination of the magnetic axis position. Dedicated measurements systems were used for this purpose: the field quality of the quadrupoles was measured with an accuracy of 0.1 % using two small aperture rotating coils, designed and produced by CERN following magnet section specifications, and a vibrating wire system was built in GFA/ATK to determine the magnetic axis position with an accuracy of 50 micro meters. Several developments on the magnet section Hall probes were also carried out for magnetic field mapping in small aperture magnets. All the magnets for the hard X-ray beam line were delivered on time and progressively installed. The developed equipment and the experience gained during the design, the fabrication and the series tests are a significant asset for the production of the magnetic elements for the Athos beam line and future PSI light sources.