Hi All,

I am creating a Matrix model (Function-Role) for several EPC's model. So my report reads the functions& roles from the EPC models & creates a Matrix model for the same.

I have been able to generate the model & the connections, but I need to setCxnAliases (Alias Name) for each connection type.

For e.g.: Constants.CT_DECID_ON (is responsible for) == R & so on

In my matrix model, I should display an "R" instead of a checked box. Below is my code.

/*Create & Assign Matrix Model*/
var oModel = oGroup[0].CreateModel(220,"Matrix Model",lg)
var matrix = oModel.getMatrixModel();
 
/*Sets the Header for the Row & Column*/
var Row_matrixHeader = matrix.getHeader(false)
var Column_matrixHeader = matrix.getHeader(true)
var Row_Header_Title = Row_matrixHeader.setTitle("Function",lg)
var Column_Header_Title = Column_matrixHeader.setTitle("Role",lg)
 
/*Identify the values from the EPC*/
var EpcModel = oGroup[0].ModelList(false,13)
for(var i=0; i<EpcModel.length;i++)
{
var ObjOccFunc = EpcModel[i].ObjOccListBySymbol(335)
for(i1=0;i1< ObjOccFunc.length;i1++)
{
var objFunc = ObjOccFunc[i1].ObjDef()    
var objRole = ObjOccFunc[i1].getConnectedObjOccs(Constants.ST_POS_TYPE)
var objRoleDef = objRole[0].ObjDef()
 
var rowcellHeader = matrix.createHeaderCell(null,objFunc,Constants.ST_FUNC,-1,true)
matrix.setVisibleObjectSymbolTypes([Constants.ST_FUNC],true);
 
var columncellHeader = matrix.createHeaderCell(null,objRoleDef,Constants.ST_POS_TYPE,-1,false)
matrix.setVisibleObjectSymbolTypes([Constants.ST_POS_TYPE],false);
var ObjCxn = matrix.createNewMatrixConnectionDataObject(Constants.ST_POS_TYPE,Constants.ST_FUNC,Constants.CT_DECID_ON,null,true,false)
matrix.setCxnData ([ObjCxn])
}                               
}

Need help. thanks in advance.

 

Regards,

kaushik Mishra

 

Tags: ARIS Architect ARIS script