on 08-21-2015 1:56 AM
Hi,
It's about XEM
In the following example, the "TableData" is an entirely new type of object created by adding the ExtendedSubObject metaclass and defining a stereotype on it.
How set and get Extended SubObject from VB using Extended Composition ?
When we create "ExtensibleObject" with "Extended Attributes" we can set and get with the following commands :
tbl.setExtendedAttribute "FillDataTable.Attribut_1", "BLN"
output "Output" & tbl.GetExtendedAttribute ("FillDataTable.Attribut_1")
For each records under "Donnees" (see Extended Compositions) we have three columns (COL1, COL2, COL3) (see Extended Attributes under ExtendedSubObject)
Note : FillDataTable.Nom is the label corresponding to COL1, etc.
Hi Benoit,
on attached example, you can see all commands necessary to manipulate values of extended subobjects.
Here is the script I used:
For each t in activemodel.tables
output t.name
Set kolekce = t.GetCollectionByName("Donnees") ' initialization of ext.composition if it does not exist (=is empty)
For each extComp in t.ExtendedCompositions
If extComp.Name = "Donnees" then
output "extComp.name: " + extComp.name
Set newRecord = extComp.content.CreateNewAt(0, PdCommon.cls_ExtendedSubObject)
newRecord.Stereotype = "TableData"
For each ESO in extComp.Content
output ESO.name
output ESO.GetExtendedAttributeText("COL1")
ESO.SetExtendedAttributeText "COL2", "my value"
Next
Exit For
End if
Next
Next
HTH,
Ondrej Divis
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 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.