Book a Demo

Author Topic: C# Sample for EA_OnMethodTagEdit?  (Read 5308 times)

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
C# Sample for EA_OnMethodTagEdit?
« on: May 29, 2012, 12:26:48 pm »
Looking to write a custom edit dialog for some tags.

Need the structured tag format sample - in particular the "youraddin" bit.

Also need the C# signature...

Thanks

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: C# Sample for EA_OnMethodTagEdit?
« Reply #1 on: May 29, 2012, 03:35:55 pm »
The pre-defined tagged value definition in EA needs to be in a format:

Type=AddinBroadcast;
Values=YourAddinName;

The "YourAddinName" part needs to be the name of your EA Add-In.  What name is your add-in referenced as in your Windows registry under [HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins]?

E.g. if using the C# Add-In Framework project available from our website, the correct definition would be:

Type=AddinBroadcast;
Values=CS_AddinFramework;

The C# method signature should be something like:

public void EA_OnMethodTagEdit(EA.Repository repository, long MethodID, string TagName, ref string TagValue, ref string TagNotes)

HTH.

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: C# Sample for EA_OnMethodTagEdit?
« Reply #2 on: May 30, 2012, 06:37:40 am »
Worked a treat - thanks

Also - on the white papers page, it looks like the SDK doco is out of date as it didn't have the tag edit broadcast methods...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# Sample for EA_OnMethodTagEdit?
« Reply #3 on: May 30, 2012, 05:25:13 pm »
I can find that operation both on in my local help file as in the online documentation: http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/ea_onoperationtagedit.html, so I don't see which documentation is out of date.

If you are looking for more info on creating C# add-ins you can find some here:
Tutorial: Create your first C# Enterprise Architect addin in 10 minutes
The complete Enterprise Architect C# add-in template
Testing and debugging your Enterprise Architect C# Add-In
Tutorial: Deploy your Enterprise Architect C# add-in with an MSI package

If you are looking for an example code see my open source add-in EA Navigator on github

Geert

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: C# Sample for EA_OnMethodTagEdit?
« Reply #4 on: May 31, 2012, 04:59:54 am »
Online's the keyword - don't you ever just like a bit of offline documentation :-)

http://www.sparxsystems.com/resources/booklets/