Universal Mappings - Reporting and Macros

I need to add some universal mapping from a conceptual model to lower level models.  

  1. Are there an easy ways to produce a report of the universal mappings?
  2. Are there any macros demonstrating how to update / add  / navigate universal mappings (is this possible)?

A few issues I can see it that I wan't to add each mapping twice (from the parent to child and from child to parent) and that I want to be able to report out every thing that this object maps to, or set the color of the entity in a diagram if it maps to a specific object.

  • Hi,

    for 1) i don't know what kind of report you're looking for. I don't think we have any built in macros that will export this detail to excel. You can generate an HTML or RTF report and report on the "where used" and that should give you details on universal mappings.

    for 2, we don't have any macros that i know of but it is possible to do this through macros. Universal Mappings are exposed to macros so it's definitely possible to create a macro to update/add/navigate universal mappings.

    for your concern about adding each mapping, if you add it once, it should add it to the other model as well so you won't have to do it twice.

    Since Universal mappings are exposed to macros, you should be able to run a macro to check if an object has universal mappings and change the colour for that object.

  • In reply to Stanley Chan:

    Hi Stan,

    Thanks. I'll look into the macros. Is it possible to have a macro that references more than one model e.g. it traverses the entities an Model A and depending on the result updates model B?

    Regarding adding the mapping being added into both models; I don't think it is. If I add a mapping from A in model 1 to B in model 2, I can see it in Data Architect in model A, but not in Model B. And vice versa if I add mappings from model B to A.

    Regards, Andrew
  • In reply to Andrew Morris:


    it is possible to traverse entities in different models. You just need to make sure you know the filename of the model you want to look at. You can also access the repository as well to get the diagram, but again you'll need to know the filename. All the Repository methods are under the Diagram Object.
  • In reply to Andrew Morris:

    Hello Andrew
    Did you use an undocumented method to add the Universal Mappings? I can read Universal mappings easily enough by following:
    AttributeObj --> WhereUsedModelUsage --> WhereUsedDataObj (AttributeID etc)
    However, there is no method listed (in XE4) to add or remove items to or from the collection.

    We need to add User-defined mappings to replace missing or defective mappings between the LDM and PDM in the same file.

  • In reply to George McGeachie:

    Wouldn't you know it, I've just come across the 'Universal Mappings' collection and related object in the metadata help, though the collection does not have any methods listed. I've seen the user-defined links in the 'Where Used' collection - I wonder if the Universal Mappings are a subset of WhereUsed? I'll have to experiment - if I add a Universal Mapping, does it also show up in WhereUsed? I shouldn't need to investigate, the documentation should tell me :). Perhaps the documentation in later versions is more comprehensive.
  • In reply to George McGeachie:

    Hi George, UniversalMappings weren't added in XE4. Were you thinking of User-defined mappings?

    Both are available in 2016 as collections on the Entity and Attribute objects (I see them in the latest AIRef.chm). The mappings might also be listed in Where Used, I'm not 100% sure (my best recollection is that User-defined mappings are, but Universal Mappings are not). Both are read-only, though.
  • Hi George, I've not use Universal Mappings yet. I'n evaluating if they suit our use case or no. Andrew
  • In reply to Jason H:

    Universal Mappings are indeed available in XE4, we've created some. I'm very disappointed that we can't add, remove or revise user-defined or universal mappings with a macro. We have many of them to add, and a macro would be MUCH quicker, and a lot less error--prone.
  • In reply to Andrew Morris:

    Universal Mappings seem to work in much the same way as user-defined mappings - user-defined mappings appear within the standard 'where used' mappings, and universal mappings appear at the bottom of the 'where used' tab. Both only allow you to connect with objects of a similar type (e.g. entity to table, attribute to column), and universal mappings allow you to connect to Business Architect models as well as Data Architect models.
    There is a Universal Mappings editor, accessible by right-clicking an object in the browser or diagram, but it's greyed out in my model.
    I don't know why ER/Studio has two types of mappings for users to create manually - the dpcumentation doesn't explain why.
    Not being able to edit your own mappings in a macro is really poor.
  • In reply to George McGeachie:

    You're right George... XE4 seems like longer ago than it was.