Galaxy object information
- Last UpdatedJul 23, 2024
- 1 minute read
IDE provides another useful functionality in the form of a light weight interface called "IGObjectInfo". For a given galaxy object this interface allows read-only access to its often used attributes like, its TagName, whether it is a template, whether it is checked out, toolset id of a template, whether instance is deployed, its category id, whether instance has any pending updates and so on.
In order to get to this interface, the extension should first query service pool for "IGalaxyConfiguration" service first. Then it should call "GetGObjectInfoFromID" method on the galaxy configuration interface. Following is an example of a typical "IGObjectInfo" interface usage.
private string GetTagNameForID(int id)
{
int goId = id;
string strTagName = "";
IGalaxyConfiguration gc =
m_site.Services[typeof(IGalaxyConfiguration)]as IGalaxyConfiguration;
if(gc != null)
{
// Get IGObjectInfo for the id.
IGObjectInfo goInfo = gc.GetGObjectInfoFromID(ref goId);
// Get the TagName for this object.
if(goInfo != null)
strTagName = goInfo.TagName;
}
return strTagName;
}