Help Controlling Adsr In Vsti Using Automation Device

how do you set up an ADSR in a VSTi so that it is exactly say, 1 or 2 or 4 renoise pattern lines long?
I want to use pattern commands and automation device to be able to tell a vsti to play shorter and longer envelopes but i want to set it up so that i can get exactly 1 line long or exactly 2 lines long etc. hope that made sense