Changing a RGMRecipe Items value using VSTA

Changing a RGMRecipe Items value using VSTA

Hi,
The method set_DynamicProperties of the RGMRecipeValue object does not seem to alter the value.
I have written the following code;
C# Code:
public void Macro_editRecipeItem()
{
String newRecipeName;
newRecipeName = this.Variables().Item("rcpNewRecipeName").get_Value(0).ToString();
// MessageBox.Show(newRecipeName);


this.RGMGroups().Item("Amp Rose").RecipeItem(newRecipeName).ValueItem("rcpVar").set_DynProperties("Type", 2);

//This has no effect on the recipe items value
this.RGMGroups().Item("Amp Rose").RecipeItem(newRecipeName).ValueItem("rcpVar").set_DynProperties("Value", 10);

//This shows the recipe variables correct value, so it proves the names are all correct
MessageBox.Show(this.RGMGroups().Item("Amp Rose").RecipeItem(newRecipeName).ValueItem("rcpVar").get_DynProperties("Value").ToString());
}

Has anyone used this method successfully before?
BR
Chris

This is a migrated post! Originally posted on 31.08.2014 by user cdaly2001. Please be aware that information can be outdated.