Skip to Content
avatar image
Former Member

Logical Data Model Diagram - Views

Hi All,

I'm a relative newbie to PD.  Currently documenting a large LDM (250+ Entities).

After creating the master ERD to include all 250+ Entities I want to break the model down into subject areas (e.g. Customer, Account etc.)  I've found the option to Copy and paste selected entities and their associations into another diagram. However after doing this some changes (e.g. Colour) made to the original version of an entity do not get cascaded to the copied version.

Is there a  way to create a 'view' on the original where only entities relevant to subject area are visible in the view ( a filter) but any changes made to the original are automatically visible in the view.

I'm happy to be pointed to the correct part of the manual(s)

Thanks  Pete

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 31, 2016 at 03:46 PM

    Hello Pete, welcome to the PD world 😊

    When you copy and paste symbols in a PD diagram, it actually creates copies of the original objects, as I'm sure you found out. You can avoid this by using 'paste as shortcut' (or using Ctrl+K) which creates new symbols that link to the original objects. The style of the new symbols depends on the display preferences in the diagram you're pasting into. If you're creating a brand-new diagram that needs to contain certain symbols, here's the best way:

    • select the symbols you want your new diagram to contain
    • right-click one of the selected symbols, and choose 'Create Diagram from Selection'
    • a new diagram will be created, with the same display preferences as the original diagram, and copies of all the selected symbols

    PD doesn't enforce a style for all the symbols for an object - each symbol is treated separately, even if you have more than one symbol for an entity on a diagram (try selecting an entity and pressing Ctrl+M to see what I mean) - if you change the style of one symbol it doesn't apply the style to another symbol for the same object. You can do this manually, by:

    * right-click the symbol where you changed the style, and select 'Get Format'

    8 select all the symbols you want to apply the style to (on one diagram), right-click any one of them and select 'Apply Format'.

    If you want to the format of an entity symbol to depend on a property of the entity (e.g. the Subject Area that owns it), that can be done via a model extension (which would always apply the style) or a script (which you can run ad-hoc).

    Add comment
    10|10000 characters needed characters exceeded

    • On the Symbol menu, "Show / Hide Symbols" allows you to include any object 'available' to the current diagram, which will include any sub-packages. If you're running this dialogue for a package diagram and you want to include missing model-level entities etc, you need to click on the 'Add Objects' tool at the left-hand end of the toolbar.

      If what you want is to replicate the ER/Studio 'make sure everything is here' option, I think the closest you can get is to run a script via a menu, taking advantage of the 'AttachAllObjects' method available on the PackageDiagram object. Here's a sample script to run inside an extension (in this case, the diagram is the object):

      Sub %Method%(obj)

        ' Implement your method on <obj> here

        output Time() & " Running AddAllObjects"

        obj.AttachAllObjects()

        obj.CompleteLinks() ' add any missing links between symbols already on the diagram

      End Sub

      If you wanted this to run automatically you'd need a Boolean extended attribute on diagrams to say whether or not you want the diagram to include everything automatically, then have an event handler that runs the script when you open the diagram. That should work, though I haven't tried it.

      See the attached extension for adding everything - it adds a command ("Add all Objects") to the menu you get when you right-click a diagram. You'll have to remove the .txt suffix from the filename.