Hi,
I've been working on a report to change the connection lines (Color,Style,Width) based on several attributes....
So far, I was able to work with all the maintained attributes, but when I try to use the Connection Name I always retrieve (Untiitled);
Here is the piece of code:
for( var iSM = 0; iSM < oselectedModels.length; iSM++ ) { oModel = oselectedModels[iSM]; aAllCxns = oModel.CxnOccList(); for (var d=0; d<aAllCxns.length;d++){ var oCxnOcc = aAllCxns[d]; Dialogs.MsgBox("Name of Selected Attribute -> " + selectedAttribute + "\nTypeNum of Selected Attribute -> " + selectedAttributeTypeNum + "\ngetValue of " + selectedAttribute + " -> " + oCxnOcc.CxnDef().Attribute(selectedAttributeTypeNum,g_nloc).getValue() + "\nName of Connection -> "+ oCxnOcc.CxnDef().Name(g_nloc) ); if (oCxnOcc.CxnDef().Attribute(selectedAttributeTypeNum,g_nloc).getValue()!= "") { aCxnKriteria.push(oCxnOcc.CxnDef().Attribute(selectedAttributeTypeNum,g_nloc).getValue()); } } }
I already made several tests, and these are the values I got
I've no clue at all why this happens with the Connection Names....
Thanks in advance for any help,
José LOURO
Hi,
Connection name is not filled by default. For connection, only the attribute Type is filled by default at the connection creation. Are you sure there is a name on your connections?
Look at the attribute panel in Aris when you select a connection on the model. I think only type is filled. (Constants.AT_TYPE_6)
Best Regards.
Dear Romain,
Thanks for your reply.
Yes, the Name are filled as you can se on the below picture...
That's the reason why I'm so confused.
I can retrieve the values of "Description/Definition" attribute without any problem, but for the connection Name (Constants.AT_NAME) or using the attribute TypeNum=1 -->
oCxnOcc.CxnDef().Attribute(1, Language).getValue()
or even
oCxnOcc.CxnDef().Name(Language)
I always retrieve (untitled).
I have some suspicious that this is a "work as designed" feature....
Best Regards
José LOURO
OK,
The version I'm using is the 7.2.6
Using the alternative language as you suggested
Dialogs.MsgBox("Name of Selected Attribute -> " + selectedAttribute + "\nTypeNum of Selected Attribute -> " + selectedAttributeTypeNum + "\ngetValue of " + selectedAttribute + " -> " + oCxnOcc.CxnDef().Attribute(selectedAttributeTypeNum,g_nloc, true).getValue() + "\nName of Connection -> "+ oCxnOcc.CxnDef().Name(g_nloc, true) );
These are the values I got
That's it...
Best Regards
José LOURO