I'm looking to see if I can generate a metric to cover how complex (and driving towards a (un)readability metric) a ERD diagram is. I was thinking using the number of entities, number of relationships, ideally the size of the canvas to provide a view on the compactness of the model. So I think this is largely doable - but if someone already has done this I'll happily reuse it.
However to make this even better I think having a count of crossing relationship lines would provide an interesting weighting for readability.
So two questions:
1) has anyone done this before, and can share?
2) Is it possible to work out the number of relationship lines crosses?
Sounds interesting, Gareth.
You could use diagram.GetPagesCount() to get an indication of the size of a diagram, after setting diagram.PageFormat and PageOrientation to a common value.
I can't see an easy way of spotting lines that cross, you'd have to use the co-ordinates of each line segment, and use a vector graphics function to see if any of them cross over - I've a vague feeling I've seen somebody write about that somewhere.
You'd also want to look out for overlapping entity symbols (if notation = Barker, some of them are obviously meant to overlap).