The following feature request was submitted:
====================================
Hi all,
There seems to be no way to access profile items from the automation interface, so I would like to request that the following features be added to the AI as methods of EA.Repository:
object NewObjectFromProfile(string profileName, string stereotypeName) – Creates and returns an instance of an object (Package, Element, etc.) based on «stereotypeName» defined in profile “profileName”. Object type can be determined by ObjectType and can be cast to the appropriate EA object. Error if profile or stereotype is not defined.
object NewLinkFromProfile(string profileName, string stereotypeName) – Creates and returns an instance of a link (connector) based on «stereotypeName» defined in profile “profileName”. Object type can be determined by ObjectType and can be cast to the appropriate EA object. Error if profile or stereotype is not defined.
int SyncStereotype(string profileName, string stereotypeName) – Synchronizes all associated model objects having stereotype «[profileName::]stereotypeName» with the features defined for that stereotype in profile “profileName”. Returns the count of objects updated. Identically named stereotypes from a different namespace (Profile) should not be affected. Error if profile or stereotype is not defined.
bool IsProfileLoaded(string profileName) – Checks whether the specified profile is loaded.
bool IsStereotypeDefined(string profileName, string stereotypeName) – Checks whether the specified stereotype is defined in the specified profile. False if not defined or profile not loaded.
bool LoadProfile(string filename), bool SaveProfile(string profileName, string FileName) – Load and save profile .xml files, respectively.
Cheers,
Fred Woolsey
============================================
The methods may require some tweaking (for example, what if the same stereotypeName applies to more than one MetaClass?)...