cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re-initialize shapes

njacob
Super Contributor

Hi,

 

We have a requirement to change the shapes of certain objects, including the font color. After using new shapes, we see that the shape is reflected in the diagrams, but not the font color. From mega support we came to know this is the behavior and we have to re-initialize shapes (Diagram --> Reinitialize shapes) after opening a diagram for the font to be applied. This means  we have to open each diagram and perform this action. Is there any way by which we can re-initialize shapes for all diagrams present in the system.

1 Reply

RGenin
Trusted Contributor

We had a similar problem and we used that kind of macro. Feel free to adapt it.

Cheers, 

Raph.

 

 

for each oDiagram in getCollection("Diagram")
  if oDiagram.getProp("nature") = "BPMNFLOWCHART" then
    'Modif Raph to retain Modification and Modifier values 1/2
    ModifDate = oDiagram.getProp("Modification Date")
    ModifierName = oDiagram.getProp("Modifier")
    'End modif Raph 1/2
    Set oDrawing = oDiagram.Drawing("RW")
    oDrawing.Resetshapes
    oDrawing.Flush
   'Modif Raph to retain Modification and Modifier values 2/2
   oDiagram.getProp("Modification Date") = ModifDate
   oDiagram.getProp("Modifier") = ModifierName
   'End modif Raph 2/2
 end if
next