Have problem with automatically place dimensions on Drawings of Bending Parts

To explain in details,it all happens when we found the autodimension function didn't work well, miss the bending range (so that the manufactor can check whether their work is qualified or not),and miss the maximum shape dimension and bring marks which is not needed.

Since we can't simply change how Solidworks'autodimension working,we decided to develop our autodimension system(in VBA).We've now already solve the problem of how to select edge \\bendlines\\outlines,but still don't know how to tell computer to figure out which line is vertical or which line is horizontal, to make it possible to put dimensions only between a pair of vertical bending lines or horizontal pair.

If anyone here can be helpful or just want to add in the discuss, we'll all be very appreciated.

A Chinese Internship engineer