@yakird6JKSJ wrote:
road path is change ' so in that case i need define ucs every time i want dimension
If I understand that correctly, I don't think you need to set a UCS. DIMALIGNED could do it without that. But as you say, the path changes, and the elements you want to dimension between are not always parallel, but vary in their distance from each other depending on where you dimension them, and even in what direction the dimensioning is aligned.
Is the idea that the User would be asked, for example, to draw a Line across a location, and the routine would dimension the series of its intersections with the road elements? That could have different results even in the same location, depending on the exact angle of the Line, and I'm not sure there can be a criterion for that. For example, here:

the red Line was drawn from the right, PERpendicular to the left pink edge, but the green Line from the left, PERpendicular to the right yellow edge. In that case the difference may not always be apparent if rounded to the nearest 1/10 of a meter, but I imagine there would be places where it would make a difference. Would it just be up to the User to draw the Line in a meaningful location and at a meaningful angle?
Or do you have in mind some other means of defining a location for dimensions? You mention a Polyline -- should it be in separate segments between each road element, so its direction can change with each?
You may want to FLATTEN the drawing. Viewed from the side:

those elevation difference could cause trouble with trying to dimension to intersections that don't intersect.
Kent Cooper, AIA