Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: pH on February 22, 2011, 09:07:01 pm
-
Greetings!!
Is there any efficient way to debug C# code written for add-ins or customized model validation add-ins? I mean simple print statements can help to identify whats going on in the code. Is there any way to do that?
Thanks,
pH
-
Use repository.writeoutput
q.
-
I've written an article about that a few weeks ago:
Community site article:http://community.sparxsystems.com/resources/scripts/c-add-test-application
Blog post: http://geertbellekens.wordpress.com/2011/02/08/testing-and-debugging-your-enterprise-architect-csharp-add-in/
Source Code: http://geertbellekens.github.com/Enterprise-Architect-Add-in-Framework/
If you don't have a full Visual Studio, SharpDevelop (open source) could be of help.
Geert
-
What is the variable IsChecked in ...
public void EA_GetMenuState(EA.Repository Repository, string Location, string MenuName, string ItemName, ref bool IsEnabled, ref bool IsChecked) {}
-
Ah, that seems to be missing from my documentation.
According to the help file it indicates whether the option should be checked.
I haven't tried this yet, but I guess it will put a little "v" in front of the menu option.
I'll try it later and I'll post the results.
Geert
-
Thanks qwerty & Geert. It was indeed helpful
-pH