Hello one and all,
When generating documents, diagrams sometimes need to be split into multiple images, which makes it difficult to follow connectors which cross image boundaries. The shape script could be extended with some properties to help alleviate this problem.
Basically, I'm proposing a set of element and connector properties like so:
- Element: DiagramPageX
- Element: DiagramPageY
- Connector: Source.DiagramPageX
- Connector: Source.DiagramPageY
- Connector: Target.DiagramPageX
- Connector: Target.DiagramPageY
These would report what page of a diagram an element is located on.
You could then write a connector shape script which checks whether the source and target elements are on the same page and, if not, outputs a text like
(From #Source.Element.Name#) into the appropriate label.
This assumes that you can compare two property values in a shape script, as in
if (HasProperty("Source.DiagramPageX", "Target.DiagramPageX")) {... which I haven't actually checked.
Ideally, another property Diagram.DisplayContext or something should be added as well, which would return "GUI", "HTML" or "DOC" depending on the situation in which the diagram is being rendered. That way your connector shape script could kick in only when generating a document.
Alternatively, the DiagramPage properties could always return 1 when not generating a document, but that's not as good (more hidden behavior).
/Uffe