Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: michael_stephenson on January 10, 2006, 02:45:16 am
-
Hi
I am writing a tool in C# which will update the notes property of some of the objects in EA through the automation interface.
I am able to successfully update the notes for a package and element, however if i try to update the notes for a method within an element when i call the update method i get the following error
Invalid OLEVERB
I was wondering if anyone has come across this before if if i am doing this in the wrong way.
I am using the following code to test this:
for(short methodIndex = 0; methodIndex < element.Methods.Count; methodIndex++ )
{
EA.Method method = element.Methods.GetAt(methodIndex) as EA.Method;
System.Diagnostics.Debug.WriteLine("Updating Method: " + method.Name);
method.Notes = "Test Note";
method.Update(); //Error occurs here
}
Any help appreciates
Michael Stephenson
-
Hello Michael,
Though I am not familiar with your exact error message, there was a known issue with EA.Method.Update(). In our testing, upon running Update() the method data was being saved despite the error message. You should hopefully find this issue fixed in EA 6.1 (build 785) which should be out sometime within the next week or two.