What I would do is ,
1. import that ‘dotted line’ image into after efects as a new layer…
2. Create a mask and animate the mask.
this mite be a mad idea…
A better idea is:
1. import the ‘Dotted line’ image as a layer in a new composition.
2. go to effets / Generate / write-on…
Thats all you can animate the dot-line within your desired time…