cancel
Showing results for 
Search instead for 
Did you mean: 

Title Box in diagrams

Solved
New Contributor

Title Box in diagrams

I know I have seen it out there at some of the other MEGA Installations, but I am looking for a Title Box.

This title box will look similar to the Image provided, however use MEGA Tags to Auto popluate many of the feilds.

Also would like to know how to attach it to every diagram at creation. 

 

Note: I have seen it done before, but did not have a chance to dig into it at that time.

 

title-block.png

 

Thanks,

Don Bliven

USDA - Rural Development

donbliven@gmail.com

donald.bliven@usda.gov

3 Replies
MEGA

Re: Title Box in diagrams

Hello Don

 

MEGA/HOPEX does not propose a specific feature for this.

 

Alternative solutions:

  1. Use the standard shape cartridge.mgs provided in the folder \Mega_std (ex: \Mega_Std\pictures.5100\art)
  2. Build a specific shape (.mgs file) using basic drawing objects and shape editor.
  3. Insert a note object.

See http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqWlAAI

 

Jerome
Highlighted
MEGA

Re: Title Box in diagrams

Hello Don,

 

In the next release of HOPEX V1R3 in July we are adding new diagram fields that may support your needs better. One way that I do it is have a generic shape, with the diagram fields, static text, and layout. I then group it and just copy and paste from one diagram to another.

 

Kevin

MEGA

Re: Title Box in diagrams

Hello Don, 

 

If I had to do this, here is how I would do it :

 

First of all, all the fields you need must be accessible as diagram properties (you can eventually create calculated metaAttributes on the metaClass diagram to have the information you need accessible)

Then, and this is the complicated part, you will have to create a specific .mgs shape for diagram that will represent your title box, including all the metaAttributes you need.

Of course, you need to make sure that diagram metaclass can be inserted in the kind of diagrams you are interested by (according to the kind of diagram, you might need a metamodel extension)

 

And then, I would use a specific macro to add the diagram into itself to obtain the title box at the diagram creation.

 

It will either be :

 

- a macro with the DiagramPostCreationRun sub, macro linked to the correct DiagramTypeZoom via the "PostCreation Macro" Association (in this case this macro will be launched at diagram creation only if the "Diagram initialization" box is checked)

 

- a macro with the OnLoadDrawing Sub, that will be launched each time the diagram is opened (even if the "Diagram initialization" box is not checked) --> you'll then need to add a condition to insert your title box only at creation.

For example : 

      Set myDiag = oDrawing.Object
      If datediff("s",myDiag.getProp("date de creation"), now) < 10

          .........

      End If

 

Regards,

 

Lionel