I get an eInvalidInput error when this code to insert a formula property executes.
var descDef = new PropertyDefinitionFormula();
descDef.SetToStandard(db);
descDef.SubSetDatabaseDefaults(db);
descDef.Name = "Description";
descDef.UseFormulaForDescription = true;
psd.Definitions.Add(descDef);
descDef.SetFormulaString("X"); <--- Right here I get an eInvalidInput error
the actual formula looks like this:
const string formula =
"If \"[ObjectType]\" = \"PIPE\" Then\r\n\tRESULT=\"[PartSizeName]\" & \" X \" & \"[CutLength]\"\r\nElse\r\n\tRESULT=\"[PartSizeName]\"\r\nEnd If";
It doesn't matter what type of string I use in the SetFormulaString method call I get an eInvalidInput. So I'm thinking there has got to be another property that needs to be set a certain way before I can set the formula. The sample in the MEP help files is written identical to my code posted above.