1
Automation Interface, Add-Ins and Tools / Updating Method Notes Error
« 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
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