RGMRecipeGroup.AddVariable() does not accept a variable from a sub project.
RGMRecipeGroup.AddVariable() does not accept a variable from a sub project.
The object model was extended so RGMRecipeGroup.AddVariable() now takes the variable object which can also be part of another project.
Example (C#):
IRGMRecipeGroup myRGMGroup = this.ActiveDocument.Parent.Item("INTEGRATIONPROJECT").RGMGroups().Item("Group 1");
IVariable myVar = this.ActiveDocument.Parent.Item("SUBPROJECT").Variables().Item("Var1");
myRGMGroup.AddVariable(myVar);