Hi,
To do this you need a context object, which is linked to a list of line objects. Every time you hit “Add line”, you create a new line object and link it to your context object. Then you can refresh your context object to show the line on your screen.
Hope this helps!