Can you cheat? Duplicate the shape layer, animate Trim Paths use a slightly thicker, non-dashed stroke, and use it as a track matte for the dashed layer underneath?
Otherwise, the best I can figure is approximate the length of the path and use that to drive the dash’s Offset value as the Trim Paths “Start” property is animated with an expression like this:
var approxPathLength = length(content("Path 1").path.pointOnPath(0, time), content("Path 1").path.pointOnPath(0.01, time)) * 100;
linear(content("Trim Paths 1").start, 0, 100, 0, approxPathLength)+value;
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]