When connecting lines in Dymola, how could I avoid the zig-zag line, is there any option that allows me to smooth the connection?
Right-clicking on the connection, an selecting "Smooth" will give you a smoothed version (blue) of the original connection (grey). I've added the grey one manually to show the difference, it will not be shown in the model. But I'm not sure this is what you want...
Besides that, it makes most sense to me to align models to enable straight lines. This can be a bit of a pain depending on the placement of the connectors within the icon. The shortcut CTRL+Shift+Arrow-Key can help as it moves the model half of the usual grid.
Another possibility is to add some auxiliary points by clicking when drawing the connection and selecting the interface with Dymola creating the last right angle to the connection. This will make sub-grid connections look less ugly...