in

The ORM Foundation

Get the facts!

Updating an existing drawing with latest shapes and macros

Last post Tue, Jan 10 2012 3:50 by Andy Carver. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • Thu, Dec 8 2011 9:43

    • Roger Cass
    • Top 25 Contributor
      Male
    • Joined on Thu, Apr 23 2009
    • Dayton, OH, USA
    • Posts 30

    Updating an existing drawing with latest shapes and macros

    Since the Visio stencil has gone through numerous revision this year (all of which are fantastic improvements--kudos to Andy Carver), this leaves me with numerous diagrams that are based on previous versions of shapes and contained in files which do not have all the macros.

    Is it possible to "upgrade" an existing Visio file to use the latest shapes and macros?

    I understand that it is difficult to change the shapes on an existing diagram. I am sure the diagram I have been working on for a year now has at least 10 different versions of many of the shapes on the Document Stencil.

    It may be easier to add macros to an existing document, however.

    Any thoughts?

  • Thu, Dec 8 2011 21:58 In reply to

    Re: Updating an existing drawing with latest shapes and macros

    Roger,

    Yes, the same question had occurred to me, and I did include some thoughts about this in the v20 readme file. But let me summarize and somewhat amplify - and add a new thought, at the end:

        It's much easier, for most people anyway, to move your diagram to where the macros are, than move the macros to where your diagram is. That is to say, I recommend you open a new Visio document based on v20, and then copy and paste your diagram into that one - page by page.

        But, though that gives you the latest macros, it doesn't update your shapes automatically (which might be required even to take advantage of the macros). One piece of good news is that, for fact type shapes that are v17 or later, their context menus will include the "objectify" / "un-nest" commands; so all you need to do to upgrade these shapes (after pasting your diagram into a v20 document) is to objectify and then un-nest (for a fact type), or else un-nest and then objectify (for a nested entity type), the shape. In the latter case, though, you'll also have to replace manually the name-text of the nested entity type. (The connector-gluing to the shape will be preserved, of course.)

        For fact types / nested entity types that (are pre-v17 and therefore) don't have this command in the context menu, well, at the moment there are no quick and easy fixes. Nor are there for the regular object-type shapes. However,...

     ...while writing this, I realized I could add a macro that would simply update, to the current version (i.e. the version of the document you're in), all the fact type shapes in the document. So, after you've copied and pasted the diagram over to that new, latest-version document, you could just run this macro and your fact types would be updated. I could, in fact, do this for the regular (i.e. non-nested) object-type shapes, as well... at least, I think this would be fairly simple to do (but to add the object types as well would likely require some slight increase in the size of the document... I'll look into that....) What would you think of this?

    Regards,

    Andy

     

  • Fri, Dec 16 2011 7:48 In reply to

    Re: Updating an existing drawing with latest shapes and macros

    Hi Roger,

    You have brought to light a significant issue: In general, the macros that have been added to ORM2_Draw2 depend, for their functioning, on having the (macro's) current version of the object-type / fact-type shapes to work on.

         That being the issue, it really is useless to try to bring the new macros to the shapes. The shapes themselves must be updated, before the macros can do their stuff.

         What we need, then, is a template, and macro, that can update all the fact type and object type shapes that are copied into a document of that type. That would suffice to allow use of the latest macros, on earlier-version models.

        Attached you will find a first stab at the required solution. Here's how to do a test-drive:

     

    0. Copy this template-file into whatever folder you wish, that Visio knows is a place to find templates.

    1. Open a Visio document of that solution-type ("ORM2_Draw2v20 (US grid-units) - FTsAndOTs--AutoUpgrade - TestDrive").

    2, Copy-and-paste into this document, whatever ORM2_Draw2 (version whatever, or hodge-podge version) model you wish to upgrade; this can be single-page or multi-page.

    3. In this document, run the macro titled "UpdateObjAndFactTypeShapes".

        (In Visio 2010, just go to Alt + F8, and select this macro for running...

         in Visio 2007 or earlier, better to go to the menu: Tools --> Macro (or Macros) --> ThisDocument --> UpdateObjAndFactTypeShapes.)

    4. If the macro runs to completion, you'll get a popup message announcing this.

     

    You might notice, after it runs, connectors which appear to be disconnected from the object type to which they should be connected. This is probably a display issue easily fixable: just select all (Ctl + A) and hit any arrow key (left, right, up, or down) once. The connectors should then appear connected.

        Another glitch I've noticed in the resulting display, but have not been able to repeat, is nested entity types whose nested fact types don't appear. If you experience this, see if you can repeat it.

        Let me know how it works for you. Let me know of any problems. Thanks Roger, and

    Merry Christmas,

    Andy

  • Thu, Dec 22 2011 4:04 In reply to

    Re: Updating an existing drawing with latest shapes and macros

    Roger,

    Unlike the template I sent previously, the attached places the predicate text exactly where it was before the fact-type update. However, it does not try to shift the text to compensate for the re-location of an up-arrow to the right-end of the text (from the left-end, where it sits in pre-v8 fact-type shapes).

    Cheers,

    Andy

  • Tue, Jan 10 2012 3:50 In reply to

    Re: Updating an existing drawing with latest shapes and macros

    Dear all,

    Please note the inclusion of the recently posted macro -- which updates ORM2_Draw2 object-type and fact-type shapes -- in the latest version, 21, now up.

    Thanks,

    Andy

     

Page 1 of 1 (5 items)
© 2008-2024 ------- Terms of Service