Book a Demo

Author Topic: Run Repository.CustomCommand on a single element  (Read 3318 times)

Paul Krcma

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Run Repository.CustomCommand on a single element
« on: May 04, 2011, 06:03:42 am »
As I understand the Repository.CustomCommand, the synchronization occurs on the entire repository of elements that have the stereotype of the profile. Can this command be run on a single Package and/or Element? If so, what is the syntax/process.

Thanks,
Paul

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Run Repository.CustomCommand on a single eleme
« Reply #1 on: May 04, 2011, 12:32:10 pm »
The following methods have been added to the API in Enterprise Architect 9:

  Repository.SynchProfile(string Profile, string Stereotype)
  Element.SynchTaggedValues(string Profile, string Stereotype)
  Element.SynchConstraints(string Profile, string Stereotype)

The methods added to the EA.Element class should allow for synchronization of that element only.

HTH.

Paul Krcma

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Run Repository.CustomCommand on a single eleme
« Reply #2 on: July 28, 2011, 07:46:44 am »
Thanks for the reply. I've finally been able to upgrade to v9, and the Repository.SyncProfile(string,string) reveals a protected memory error.
I'm using the following syntax:
     eaRepo.SyncProfile("MyProfile","MyStereotype");

-Paul