One tab per Object type: How do I expand an object type to show related facts?

I use ORM to model early stages of development projects. I prefer to have one tab per object type where all relations (one level) are shown. I spend some time to arrange all object types and facts in the diagram to make it easy for other project members to read and to include them in printed reports.
When new facts have been added I would like to be able to expand them in such a worked out diagram.
In the Visio-version I could chose to expand an object's relations and new ones would be shown together with the old ones already in the diagram.
In NORMA it seems like I have to open the context view after selecting an object type, select everything in the view and copy and paste it to a fresh diagram. This is OK for a completely new diagram, but if I want to update an existing already properly designed diagram to include potential new facts -- how do I do?

Re: One tab per Object type: How do I expand an object type to show related facts?

You could try zooming out and dragging things from the context window into an empty area, then deleting all the shapes that were previously there. The down side is that you've now lost all your beautiful layout.

Sorry, not terribly helpful. To my knowledge there's no "get what's not on this page" filter.

Re: One tab per Object type: How do I expand an object type to show related facts?

Thanks for the answers. Unfortunately, keeping the layout intact is quite important (for me) since it's quite some effort to get things to look nice when there are more than a couple of objects. But at least I know that I can stop looking for this functionality. :)
I would like to put it on some wish list if it's OK? Maybe others are looking for this function as well.

Re: One tab per Object type: How do I expand an object type to show related facts?

I think I recall Matt showing me how to open a second window viewing the same model, which allowed you to select and drag elements from one diagram into another (or a new) diagram of the same model, preserving location. I want to do that also, so maybe if Matt can answer...?

Re: One tab per Object type: How do I expand an object type to show related facts?

Dragging from one diagram to another creates new shapes for the elements on the target diagram. The target diagram can be displayed in the 'Diagram Spy' tool window or in a normal document window, and the . In the recent builds (since the end of 2010) you can also drag elements across models, which also brings all required backing elements into the target model. The December 2010 release also enabled automatic activation of diagram tabs during drag, so you can hover over a diagram tab and drop on that diagram without creating a second window. If you want a new diagram, though, you still need to create it before the drag begins.

The details of window management (creating new windows, creating multiple tab groups, and some tool window management tips) are covered in the Window Management in Visual Studio section of the readme document.

Re: One tab per Object type: How do I expand an object type to show related facts?

This is an interesting idea. I have an extension (currently non-public, so please don't look) that automatically adds all ORM elements that do not have a corresponding shape to a designated group. The extension provides one model error if there are any current (shapeless) items in the group, and the items can be dragged directly out of the expanded group to create shapes on the diagram.

This request is similar but a little more complicated because it provides a more complicated context to determine when a shape is 'missing'. One way to interpret your question is 'given one or more diagrams and a list of object types, tell me when one of those object types or any fact type associated with them has no corresponding shape on the designated diagrams'. The proposed extension would allow you to associate one or more diagrams with a group, and then pick object types you want to track for that set of diagrams. If new fact types were added for any of those object types, then they would automatically appear in your group and you would get a model validation error. Double-clicking the error would automatically activate the (first) diagram if needed, then expand the group in the model browser, allowing you to place new fact type shapes directly where they are most aesthetically pleasing. You could also choose to explicitly exclude the shapeless item (you would still see it in the group, but it would no longer give you a validation error).

Obviously, this is a little more complicated than Visio's expand command, but it also gives you live tracking in the model, so you can formally record your intent to show all fact types for a given model on a diagram, and have the tool tell you when the intent is violated. It is also a refinement of the more general notion of the lack of a shape on any diagram, which I already have code for (an advantage, at least for me).

Please comment on design. I can't give you any schedule on this right now, but if I can get design feedback then it is there to refer back to.

Re: One tab per Object type: How do I expand an object type to show related facts?

Matt: Sounds like a good improvement of the Visio function. You would not need to actively check all your diagrams for model additions since last time you updated the drawings. Your step-by-step description sounds fine. However, on the connection between diagrams and a group of object types: I'm trying to think when it would be useful to have a group with a set of object types that is not the same set as in the diagram. I mean, if the sets would be the same, a default group could be automatically created and associated with the diagram and populated by default with the object types you've added to the diagram. It would be one group per diagram then. Am I missing something?

Re: One tab per Object type: How do I expand an object type to show related facts?

If the goal is to emphasize one or more object types on the diagram, then you need to externally record this set of object types, not just rely on those represented on the diagram. It can't be the set of all object types on the diagram as this recurses over fact types to include connected object types in the model. For most models, this means the entire model would need to be represented on one diagram to satisfy the filter. I could certainly limit the choice of object types to track to those already represented on the diagram, but I wouldn't want to automatically choose.

Of course, the system could also be used as a temporary check by deleting the group on completion. This would make it very similar to the Visio functionality. This is how I generally use my 'missing shape' group function, namely to do an occasional spot check after big edits to see if I've lost track of anything in the model.

After the initial model load, which does a full verification of the model, all of the NORMA verification rules are incremental, so the additional checks would be limited to shape addition/deletion on the diagram and ObjectTypePlaysRole add/delete/change actions in the model. It wouldn't be that expensive to keep the live verification in place, especially with the expected use (most cases will be one object type tracked on one diagram).