diagramobjects are actually representations of elements on diagrams. Diagrams themself are something "special". It's not a kernel part of the UML metamodel but something set aside. So you will usually not have an interchange of diagrams between UML models of different vendors. A bit shortsighted I think since SDs are just modelled as diagrams and not via an abstract model (unlike ADs which could stand without graphical representation). The UML guys meant diagrams just for humans but actually, the whole model is going to be read by humans. So diagrams are some central means of communication. On the other hand man, Probably people only think of diagrams as being UML without reflecting the model elements being the basis. Probably it's simply just complicated - or so...
q.
As qwerty says, Diagrams are (probably) third-class citizens of the modelling mechanism based on UML. As is often the case, we users take invented things in different directions than envisioned by the creators. UML is actually short for a
unified modelling language for modelling source code! When you understand that, you can see its limitations. As qwerty says, in that scheme, diagrams aren't relevant for the generation of source code. Instead, we humans have decided that we can use most of the UML concepts shapes, lines to model anything we need and to communicate better among ourselves without needing to generate anything. In this scheme, diagrams are
paramount as enabling different views for the same or different viewpoints of the same items in the model.
As described elsewhere, we have adopted the convention to use the diagram title block (the misnamed Diagram Element Note in Sparxian) to act as a proxy for the diagram. We can attach properties to that item (as custom (tags) or inherent properties) and interrogate that, where possible, with our automation. For your purposes (deciding how to lay out a diagram) this "hack" could be used to provide direction. If the layout is dependent upon the nature of the diagram, you could use the diagram type in the automation, if it is dependent upon a specific variant of the type, then you can, as qwerty suggested, use the diagram stereotype. But if it is independent of those two then they can't be used - this will do instead.
HTH,
Paolo