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
Amol Patil on
Hi Kaushik,
I guess in this situation, there is no need to create a script for generating matrix model. You already have the connections created in EPC. So you can simply create a new matrix model manually, do a search and copy all the roles and functions in the matrix, and turn on the visibility of the required connections. And you can edit the connection alias as well in matrix. I guess this will be much faster approach.
Regards,
Amol Patil