How to get all generators of a environment

Unofficial Content

To get the list of generators in an Environment you need to iterate trough the GxEnvironment Environments property:

GxModel gm = UIServices.KB.WorkingEnvironment.TargetModel.GetAs<GxModel>();
foreach (GxEnvironment gen in gm.Environments)
{
  int generator = gen.Generator;
  string type = gen.Type;
  ....
}