I developed an addin for Enterprise Architect using C#. I want to know how to update the direction of a propertyFlow. I tried this method and it is not working. I also tried with debug with attached process and I see the value tagValue.Value
is taking the value, but no update in DB after I call element.Update()
;
UpdateFlowPropertyProperties(element, new Dictionary<string, string> {{"direction","in"}}
public void UpdateFlowPropertyProperties(Element flowProperty, Dictionary<string, string> elementProprieties)
{
foreach (TaggedValue tagValue in flowProperty.TaggedValues)
{
if (elementProprieties.ContainsKey(tagValue.Name))
{
tagValue.Value = elementProprieties[tagValue.Name];
}
}
flowProperty.Update();
}
I also tried to run a query in the Enterprise Architect in section "SQL Scratch Pad" and it is still not working: UPDATE t_objectproperties SET t_objectproperties.Value = "in" where Object_ID = 23573 And Property ="direction"
. I'm thinking if it is not working to update in C# code via element.Update()
to use EARepos.Execute(...)
.