Hi,
I've written a script which creates horizontal Lanes in models (Aris v9.7).
I wish those lanes' names to be displayed on the left side of the lane, in vertical.
In the representation template, I've kept the ARIS default attribute placement (name in the center), except that I've changed the font of the name.
I apply the representation template in the script
model.setTemplate(MY_TEMPLATE);
model.ApplyTemplate();
Then when opening the models created, the lanes' names are put horizontally in the center of the lanes.
Whereas when I re-apply the same representation template in the designer, then the names are moved correctly on the left side and displayed vertically.
(see example in attachment)
Any idea why the application of template works when the model is opened manually in designer, but not while executed through a script ?
Thanks and Regards,
Fabienne ROSEC Author on
SAG support has provided an answer to this issue :
"The reason of that behaviour is that on the model side is executed a "correction code" for BPMN model types by ARIS Designer component.
In your report you can fix the lane header visualization by the following code (executed on pool/lane occs)
updateAttrPlacementsRotated(oModel.ObjOccListBySymbol([Constants.ST_BPMN_PARTICIPANT,Constants.ST_BPMN_POOL_1, Constants.ST_BPMN_LANE, Constants.ST_BPMN_LANE_1])); function updateAttrPlacementsRotated(oOccList) { for (var i in oOccList) { var oOcc = oOccList[i]; var oAttrOcc = oOcc.AttrOcc(Constants.AT_NAME); if (!oAttrOcc.Exist()) oAttrOcc.Create(Constants.ATTROCC_PORT_FREE, font); oAttrOcc.SetPortOptions(Constants.ATTROCC_PORT_FREE, Constants.ATTROCC_TEXT); var objectBounds = new java.awt.Rectangle( oOcc.X(), oOcc.Y(), oOcc.Width(), oOcc.Height() ) var attributeBox = new java.awt.Rectangle(objectBounds.x+1,objectBounds.y+1, 150-(2*1),objectBounds.height-(2*1)); oAttrOcc.setTextBoxSize(objectBounds.height, 150) oAttrOcc.SetOffset(attributeBox.getCenterX()-objectBounds.getCenterX(), 0) oAttrOcc.setAlignment(Constants.ATTROCC_ALIGN_CENTER) oAttrOcc.setRotation(270) } }Indeed, it solves my problem.
Maybe someone else would have the use of it !