Hello, I know how to do this manually, I do it like you can see in the picture below: 

(open model (bpmn), click format and click layout)

 <- Write 300 in left margin

 

But I need to do this with a script, I tried: 

 

    var bpmn = Constants.MT_BPMN_COLLABORATION_DIAGRAM;
             ArisData.getModelOptions().getLayoutParameters(bpmn).setSpacingX(99)
             oModel.setAttrOccHandling(ArisData.getModelOptions().getTextAttributeHandling())
             var muda = oModel.doLayout();

SetSpacing is not working either and it's not possible to use a setMargin function.

Of couse if I change the layout options manually first, and run the "oModel.doLayout();" it will apply and work, but I need to settle those options (margin=300) in the script only.

Does Anyone know how to do this?

(Previously I tried to move all the objects in the model with the funcion setPosition, but it messes up the connections in the model : / and it doesn't work well in "fresh" generated bpmn with the default transformation "EPC2BPMN" )

 

 or register to reply.

Notify Moderator