on 11-10-2015 10:07 PM
Hi,
I'm working in LDM model where an attribute (Attribute1) has been used under multiple entities(Entity_A, Entity_B). There is no trace ability links between Entity_A.Attribute1 and Entity_B.Attribute1. So, when I run impact analysis on this attribute, it doesn't show me where else it has been used.
I'm trying to create a custom method to run from menu. This custom method (On EntityAttribute metaclass) will go through all EntityAttributes and list down all entities where this attribute has been used.
My question is : How do I get selected entity attribute from diagram into a variable which I can use to run a check against all entities in model.
Any help is greatly appreciated.
Thanks,
Arvind
Dim AttSel
AttSel= ActiveSelection.Item(0).Code
This is what I was looking for . AttSel will contain code of selected attribute. Same can be expended to entities if entities are being used on different subject area diagrams in a model.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can make a context-method for a right click on the collection of columns that is shown for the table in the columns tab.
The trick is to place the method and menu on the BaseColumn metaclass:
The reason for this is that the collection at the table level does not supply "Columns" but BaseColumns (as found in the metamodel objects help):
You can add the MetaClass to your extension by removing the filter on concrete classes when you add a metaclass to your extension:
Unfortunately you cannot retrieve a selection of objects from the list in this way. The activeselection appears to be empty when you get into the method.
Hello Arvind, welcome to SCN
If you want all attributes called "Name", "Description", "Status", "Attribute_1" etc to be the "same attribute", you could use a CDM instead of a LDM. In the CDM, every attribute has an underlying Data Item, and the model options allow you to enforce a standard that says that every attribute with the same name is the same Data Item. For that to work, you really need very specific Data Items and attributes, so my examples of "Name" and "Description" wouldn't be appropriate.
The chances are that converting your LDM to a CDM along these lines is more work than you want to undertake, so let me address the issue within the LDM.
In a Logical Data Model, the fact that attributes in multiple entities have the same name does not mean that they are the same attribute, it's just the result of the application of naming standards. They may be very similar attributes (such as the Name of something), but the attributes will all have different descriptions because they exist within different entities. (unless you use generic descriptions such as "The name of something", which are not very meaningful or useful). Every attribute can only be 'used' by one entity.
For the kind of traceability you're after, I suggest you use Domains, assuming that every instance of "Attribute_1" has the same data type and length, etc.. The quickest way to do this for a large model to use Excel:
If you model is a small one, you're probably better off doing this manually - once your domains exist, you can sort a list of entity attributes by the attribute name, and assign multiple attributes to a domain in one operation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.