Method to assemble or disassemble a generator of a wind turbine, which comprises a rotor and a stator , - where the stator and the rotor are arranged in relation to each other to achieve a predetermined air-gap between the rotor and the stator , - where a distance-element is arranged in the air gap in a way that the rotor and the stator are contactless movable in relation to each other while the machine is assembled or disassembled. - where a number of segments are arranged to build up the stator-structure, where at least one segment is attached to or is removed from the stator by using the distance-element while the machine is assembled or disassembled, characterized in that - at least segments of the stator are attached to or are removed from the generator, whereby the segments are attached to the generator from the direction of the hub or are removed in the direction to the hub , - the opening is closed by a hatch, - the rotor is rotated so that the hatch is in front of the faulty stator segment , - the hatch is opened and the segment can be exchanged through the opening - a support structure is temporarily fixed to the hub to support the detached segment and - the segment is then moved out of the generator through the hatch onto the supporting structure - the segment is pulled out of the hatch and rests on the support structure at the hub, and - the hub is then rotated to bring the support structure with the segment in a predetermined position to reach the segment with an internal crane system or with a hoist arranged to lower the segment to the ground or to a vessel. - where the stator and the rotor are arranged in relation to each other to achieve a predetermined air-gap between the rotor and the stator , - where a distance-element is arranged in the air gap in a way that the rotor and the stator are contactless movable in relation to each other while the machine is assembled or disassembled. - where a number of segments are arranged to build up the stator-structure, where at least one segment is attached to or is removed from the stator by using the distance-element while the machine is assembled or disassembled, - at least segments of the stator are attached to or are removed from the generator, whereby the segments are attached to the generator from the direction of the hub or are removed in the direction to the hub , - the opening is closed by a hatch, - the rotor is rotated so that the hatch is in front of the faulty stator segment , - the hatch is opened and the segment can be exchanged through the opening - a support structure is temporarily fixed to the hub to support the detached segment and - the segment is then moved out of the generator through the hatch onto the supporting structure - the segment is pulled out of the hatch and rests on the support structure at the hub, and - the hub is then rotated to bring the support structure with the segment in a predetermined position to reach the segment with an internal crane system or with a hoist arranged to lower the segment to the ground or to a vessel. - a support structure is temporarily fixed to the hub to support the detached segment and - the segment is then moved out of the generator through the hatch onto the supporting structure - the segment is pulled out of the hatch and rests on the support structure at the hub, and - the hub is then rotated to bring the support structure with the segment in a predetermined position to reach the segment with an internal crane system or with a hoist arranged to lower the segment to the ground or to a vessel. <EOS>