Book a Demo

Author Topic: Need ideas for ordering items for an add-in  (Read 2875 times)

Colin E Richardson

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Need ideas for ordering items for an add-in
« on: February 10, 2011, 09:38:33 pm »
Hi,

We've built quite a nice report generator, but we'd like a user user to be able to pick diagrams, packages and elements to be included in the report easily and order them.

Best we've done so far is to create a diagram and then drag on items in a top down fashion and that works fine.  Easy for a user to do, but cumbersome.

Ideally I'd like to be able to create a custom package (on a diagram) and then be able to drag stuff (diags, elements, packages) onto it, and then it's orderable like the model document package does for packages.

Any ideas how to create one or any other ideas for achieving this?

~ Colin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Need ideas for ordering items for an add-in
« Reply #1 on: February 10, 2011, 11:17:33 pm »
Colin,

I've done something like that in the past, and I just added my own GUI to order the elements.
The order was finally not stored in the model, but in the document.
I think I used Word variables to store the link to the model elements. Each section was enclosed in a Word bookmark, and we used the order of the bookmarks in the document to store the actual ordering of sections.
This approach also allowed us to refresh only one section (bookmark) if we wanted to, and add text inbetween the sections that wouldn't get lost when refreshing the document.


Geert

Colin E Richardson

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Need ideas for ordering items for an add-in
« Reply #2 on: February 11, 2011, 05:51:32 pm »
Thanks Geert, excellent advice.

I think I'll give this a go + in addition I might store the selection information in a class element in case the document is ever lost.

Cheers