Book a Demo

Author Topic: Apply Model Patern - change names of packages  (Read 2584 times)

jami

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
  • ekhm
    • View Profile
Apply Model Patern - change names of packages
« on: September 02, 2020, 10:52:02 pm »
Hi,
I created the adding package structure with "Apply Model Patern" as below:
- Main package "Name1" - this name is taken from the "New package" creation window.
 - Package "Name 2"
   - Diagram "Name 3"
 - Package "Name 4"
   - Diagram "Name 5"
- Package Master Document.

What I can't do and I am asking for help is how to make the mechanism change the names of the indicated packages when importing the structure, as follows:

- Main package "Name 1"
 - Package "Name 2"
  - Diagram name from the Main package "Name 1"
 - Package "Name 4"
   - Diagram "Name 5"
- Package Master Document - name from the main package "Name 1".

Also, each imported package and diagram has me as the author. Can it be changed to set the importer as the author when importing?

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Apply Model Patern - change names of packages
« Reply #1 on: September 02, 2020, 11:32:56 pm »
Hello,


With model templates, you can only select which of the packages to create (with the checkbox "Customize Pattern on Import"). You can't make any other changes to the model being created, such as setting your own names.

You can do that if you are instantiating a model pattern, which creates not a package structure but a set of elements in a single diagram.

(The fact that Sparx refers to both of these as "patterns" in parts of the GUI and manual is unfortunate, but in other parts of the manual they are clearly separated and what you've described is definitely a model template.)

The Author property can be fixed. What you need to do is make sure that the Author is set to an empty string everywhere in the template XML file. If there's nothing there, EA will set Author from the current user, but if there is something in the template EA will use that -- a somewhat quaint interpretation of the concept of a template, I feel.

So open the XML file in a text editor, locate all <UML:TaggedValue tag="author" value="John Doe"/> and just replace John Doe with an empty string.

HTH,


/Uffe

My theories are always correct, just apply them to the right reality.

jami

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
  • ekhm
    • View Profile
Re: Apply Model Patern - change names of packages
« Reply #2 on: September 03, 2020, 04:55:54 pm »
Thank you, Uffe.
Changing the information in XML helped.