Hey everybody,
thanks to anyone who tried to contribute to a solution fort he given problem. I am very glad that I could be helpen *very* fast! For all those who are interested: I used control + v to insert the tikz code into lyx, which overwrote newline-characters so that the code inserted was mutated. I learnt that it is better to use edit->paste->special->plain text. Thanks again! Robert