A set of building elements, comprising: a first building element (101;701;901..907) with a housing which is selected from a group of straight, bend, L-shaped, and T-shaped bodies with one or more end-portions; wherein the first building element is configured with at least one first connector configured as a plug integrated with or installed in at least some of the end-portions; wherein the first connector comprises: an abutment face with a centre portion; a diagonally magnetized magnet (501,502) rotatably arranged behind the abutment face or a first pair of magnets (501,502;401,402) sitting behind the abutment face with their polarity arranged opposite to one another; and a pair of a female engagement members extending radially from the centre portion and a male engagement member extending from the centre portion; wherein a depth of the female engagement member and a height of the corresponding male engagement member is greater than a width (Wm) of the male engagement member or greater than a width (Wf) of the female engagement member; wherein the female engagement member is configured as a recess and the male engagement member is configured as a protrusion with respective side walls extending in a radial direction from the centre portion; and wherein a sidewall of the recess abuts a sidewall of the protrusion such that a plane sidewall is formed from a bottom portion of the recess to a top portion of the protrusion; wherein at least a first building element among the building elements (101;701) comprises at least a first one of the connectors; wherein the at least first one of the connectors is rotatable mounted in a bearing fixed to the first building element; a drive unit coupled to turn the first one of connectors in response to a control signal; and an energy storage unit coupled to supply operating power the drive unit. a first building element (101;701;901..907) with a housing which is selected from a group of straight, bend, L-shaped, and T-shaped bodies with one or more end-portions; wherein the first building element is configured with at least one first connector configured as a plug integrated with or installed in at least some of the end-portions; wherein the first connector comprises: an abutment face with a centre portion; a diagonally magnetized magnet (501,502) rotatably arranged behind the abutment face or a first pair of magnets (501,502;401,402) sitting behind the abutment face with their polarity arranged opposite to one another; and a pair of a female engagement members extending radially from the centre portion and a male engagement member extending from the centre portion; wherein a depth of the female engagement member and a height of the corresponding male engagement member is greater than a width (Wm) of the male engagement member or greater than a width (Wf) of the female engagement member; an abutment face with a centre portion; a diagonally magnetized magnet (501,502) rotatably arranged behind the abutment face or a first pair of magnets (501,502;401,402) sitting behind the abutment face with their polarity arranged opposite to one another; and a pair of a female engagement members extending radially from the centre portion and a male engagement member extending from the centre portion; wherein a depth of the female engagement member and a height of the corresponding male engagement member is greater than a width (Wm) of the male engagement member or greater than a width (Wf) of the female engagement member; wherein the female engagement member is configured as a recess and the male engagement member is configured as a protrusion with respective side walls extending in a radial direction from the centre portion; and wherein a sidewall of the recess abuts a sidewall of the protrusion such that a plane sidewall is formed from a bottom portion of the recess to a top portion of the protrusion; wherein at least a first building element among the building elements (101;701) comprises at least a first one of the connectors; wherein the at least first one of the connectors is rotatable mounted in a bearing fixed to the first building element; a drive unit coupled to turn the first one of connectors in response to a control signal; and an energy storage unit coupled to supply operating power the drive unit.