cancel
Showing results for 
Search instead for 
Did you mean: 

Logical Data Model Diagram - Views

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

GeorgeMcGeachie
Active Contributor
0 Kudos

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).

Former Member
0 Kudos

Hi George,

Thanks for the welcome, and thanks also for taking the time to help me out. Your advice has certainly helped me take a big step forward.  

Pete

GeorgeMcGeachie
Active Contributor
0 Kudos

No problem, Pete.

I'm putting together a 1-day training course on the Fundamental PD techniques for data modellers, and this is one of the topics .

Keep the questions coming - don't forget to search the community (search box on top right corner) before asking - make sure you include the word 'PowerDesigner' in your search.

GeorgeMcGeachie
Active Contributor
0 Kudos

Longer, more comprehensive training courses are also available

GeorgeMcGeachie
Active Contributor
0 Kudos

On the Symbols menu, select "Show / Hide Symbols" - this allows you to temporarily hide symbols you don't want to see, then 'unhide' (make them visible) later on. If you don't mind writing a script, you can automate this for entities that do or don't meet certain criteria - you need to find the relevant symbol in the entity.Symbols collection, and set the Hidden property to True or False.

Former Member
0 Kudos

Hi George,

Thanks for your previous answers/suggestions - btw I bought a digital copy of your PD book.

I've got a bit further into PD but I am still struggling to find the functionality I'd like to have. Essentially I'd like the functionality available in ERStudio via the Submodel concept, where any changes to Submodels are reflected in the main model. In effect the submodel is a view over the main model.

I have tried creating other diagrams and then using the copy and paste shortcut and that works for changes to the objects actually copied. However if I add any new entities in the diagram containing the short cuts these are only visible in the local diagram.

After delving into your book I have looked at packages and was hopeful I had finally found the tool I needed.  I can see they are useful to partition a model but unless I am missing something I can't see a way to get a consolidated ERD covering the sum of all the individual packages.

I should point out that I am using PD as a standalone installation with local files.

GeorgeMcGeachie
Active Contributor
0 Kudos

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.

Answers (0)