Is it possible add timeitemlinks after I have drawn the timeitems?
The function AddLink(ti1, ti2) requires a reference to another timeitem, but I dont know how to fetch that one (something like getTimeItemFromID…)?
Depending on how you load the gantt you can do this different ways. But anyway you go you will need to find the two time items that should be linked. You can find time items by iterating the chart, or you can put a reference to all added time items in a Hash list sorted on some key you use. You can use the UserReference item to put a key.