cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitiate the font of all the shapes in the repository

Solved
Occasional Contributor

Reinitiate the font of all the shapes in the repository

Hello,

 

I migrated from MEGA 2009 to Hopex V1R3.

I updated the shape of the object "Operation" (activity)  from the new design (new color). The new font is reboto and white and it used to be black and arial. All my operations have been updated with the new shape but the font still arial and black. I need to use the function "Reinitiate shape" when i open each diagram. I would like to apply this function for all my organizationnal process diagrams. Is it possible ?

 

Thank you.

Alexandre

Alexandre
7 Replies
Contributor

Re: Reinitiate the font of all the shapes in the repository

Hi Alexandre,

 

Here is an example script, it will call "Reinitialize Shapes" on all diagrams returned by the query:

 

    q = "Select [Diagram] Where nature ""BPMNFLOWCHART"""
    Set cDiags = oroot.getselection(q, "Short name", -1)
    For each oDiag in cDiags
        set drawing = oDiag.drawing("rw")
        drawing.resetshapes
        drawing.flush
    Next

 

Gregory

Occasional Contributor

Re: Reinitiate the font of all the shapes in the repository

Thank you Gregory

Alexandre
Occasional Contributor

Re: Reinitiate the font of all the shapes in the repository

Hello Gregory,

 

I tried it but unfortunately I have an error. I enclosed a screenshot of the error if you can help me...

 

Thank you

Alexandre
Contributor

Re: Reinitiate the font of all the shapes in the repository

Hi Alexandre,

 

If you run the script in the script editor, you can remove " oroot."

 

Gregory

Occasional Contributor

Re: Reinitiate the font of all the shapes in the repository

Thank you again for your quick answer, I have now another error :

appel de procédure incorrect : drawing

 

If you have an answer for me, it would be perfect !

 

Thank you

Alexandre

Alexandre
Highlighted
Contributor

Re: Reinitiate the font of all the shapes in the repository

It looks like there is a conflict bacause of the "drawing" variable name.

Here is a new version

 

    q = "Select [Diagram] Where nature ""BPMNFLOWCHART"""
    Set cDiags = getselection(q, "Short name", -1)
    For each oDiag in cDiags
        set mydrawing = oDiag.drawing("RW")
        mydrawing.resetshapes
        mydrawing.flush
    Next

Occasional Contributor

Re: Reinitiate the font of all the shapes in the repository

Thank you so much

Alexandre