Book a Demo

Author Topic: How to apply a stereotype to multiple elements at once?  (Read 8885 times)

netizensmith

  • EA User
  • **
  • Posts: 24
  • Karma: +1/-0
    • View Profile
How to apply a stereotype to multiple elements at once?
« on: January 24, 2019, 04:48:34 am »
Can this be done? Or do I have to manually paste the stereotype name 200 times into each of my requirements!?

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: How to apply a stereotype to multiple elements at once?
« Reply #1 on: January 24, 2019, 06:13:07 am »
Yes you can use script. Covered in previous post. Search for "Stereotype bulk change" and you should find this
https://www.sparxsystems.com/forums/smf/index.php/topic,39510.msg243782.html#msg243782
Which references the script here
https://sparxsystems.com/forums/smf/index.php/topic,30653.msg223132.html#msg223132
Just copy and paste script into Sparx. Modify the script to modify the stereotypes you want to apply.
« Last Edit: January 25, 2019, 07:29:27 am by Sunshine »
Happy to help
:)

netizensmith

  • EA User
  • **
  • Posts: 24
  • Karma: +1/-0
    • View Profile
Re: How to apply a stereotype to multiple elements at once?
« Reply #2 on: January 25, 2019, 12:03:46 am »
Nice one, that worked a treat (after adding some supporting code for the Enumerator() and other ancillary functions that I found in some EA example scripts).

many thanks.