on 01-25-2017 8:53 AM
Hi all,
We are trying to use the Comparison Helper to compare two LDM models and extract the changes into an Excel file. This works fine, but now we would like to exclude an extended attribute (metaclass Entity Attribute) from the comparison. For this we use the method SetPropertyComparable, but we cannot find the correct syntax for this, hence, what to use as ClssName and PropName.
We have two models, mdl1 and mdl2 and would like the exclude the extended attribute "Catalogue" from the comparison. We tried many things, but it doesn't seem to work:
Set Cmpr = mdl1.CreateComparisonHelper(mdl2)
Cmpr.SetClassComparable "*", TRUE
Cmpr.SetPropertyComparable "EntityAttribute", "ExtendedAttributes.Catalogue", FALSE
For id = 0 To Cmpr.GetDifferencesCount()
Cmpr.GetDifferenceInformation id, DiffKind, OldObject, NewObject, MemberPublicName, OldValue, NewValue
If DiffKind = mrg_modified Then
output "Old:" OldObject + ", new:" + NewObject
End If
Next
Could someone please tell us what the correct syntax is to do this?
BR,
Rafal
Thanks for your answer. I don't understand exactly what you mean. The arguments SetPropertyComparable have to be public names. For entity attributes this is EntityAttribute. We have tried also using the class name, like cls_xxx but this doesn't seem to work.
We believe the first argument (describing the class name) should be ok, since it works if we write for instance SetPropertyComparable "EntityAttirbute", "DataType", False. We are, however, in doubt about the second argument, since this is not a standard property of the metaclass, but an extended attribute. We are not sure how to address this extended attribute in the extension. An entity attribute hast the property ClassPublicName, but this property is not available for extended attributes. It is also possible to have more than one extension with the same extended attribute, so perhaps we also need the extension name in the argument. However, you can get the extended attribute value directly from the attribute by using GetExtendedAttribute, so perhaps you don't need to "navigate" through the extension.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried qualifying "ExtendedAttributes.Catalogue" with the Library and Class Name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.