Author Topic: Synchronize profile API  (Read 539 times)

tzafrir

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
    • View Profile
Synchronize profile API
« on: March 26, 2017, 04:01:27 am »
Hi,

Is there a way to synchronize stereotypes from a profile.
In EA there is a command "Synchronize StereoType", I want to activate the same command using my addIn.

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 9029
  • Karma: +137/-126
  • I'm no guru at all
    • View Profile

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7815
  • Karma: +171/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Synchronize profile API
« Reply #2 on: March 26, 2017, 06:10:27 pm »
I think you have use Repository.CustomCommand like this:

Repository.CustomCommand "Repository", "SynchProfile", "Profile=" & profile & ";Stereotype=" & stereotype & ";"

See https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/UML%20Profile/Synchronize%20Steretoypes.vbs for a script that uses that.

Geert

tzafrir

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
    • View Profile
Re: Synchronize profile API
« Reply #3 on: March 27, 2017, 06:48:29 am »
1. How do you find all the project's stereotypes
2. Once you found them, how do you find the profile name of each stereotype.
I did not find a table which does that.
3. Repository.CustomCommand does not exist in C#, is this only a VB one?

qwerty

  • EA Guru
  • *****
  • Posts: 9029
  • Karma: +137/-126
  • I'm no guru at all
    • View Profile
Re: Synchronize profile API
« Reply #4 on: March 27, 2017, 08:24:16 am »
Repository.CustomCommand is one of the undocumented features. It's just not present in IntelliSense.

q.