// add the class (BarStereo) to the dest // model instance *so that the profiles // are applicable* & set the name attribute // (self is a FooStereo occurrency in the src model) dst_mdl.packagedElement += result; result.name := "Bar_" + self.name; var zot_cls := object Class {name := "Zot_" + self.name;}; dst_mdl.packagedElement += zot_cls; // apply stereotypes: BarStereo, ZotStereo // (safelyApplyStereotype() is a custom helper // that applies a Stereotype to an Element) safelyApplyStereotype(result, bar_stp); safelyApplyStereotype(zot_cls, zot_stp); // set attributes result.visibility := VisibilityKind::public; result.setValue(bar_stp, "run", zot_cls); // <--- does not have any effect (!?)