Tips&Tricks

Helmut.Ortmann edited this page Sep 22, 2017 · 18 revisions

Tips & Tricks

Assortments of useful things for every day work with EA.

Thanks

There are lot more great references and people who share their knowledge. Thanks to all of them.

Tips

Basic

  • Review, use GUID to identify an EA item
  • Use Glossary

Advanced

  • LINQ to SQL, the powerful environment for your Add-In in C#, VB, F# ((Database independent)
  • LINQPad to interactive develop and test your EA query (Database independent)

Addins

Most EA developer fear it: EA can't find your precious Add-In and gives a meaningless error code. My ways are: Use a good example, run it, change it. For me a great help was:

Most errors are simple, and sometimes it looks as if they suddenly (hopefully) disappear.

  • Be careful with letter case
  • Be careful with changing the Assembly version of COM objects (every dll you register by EA)
    • Changing Assembly version means you have to update the registry information for the dll
    • Build, run Collect.bat, update file.wxs, Build, Deinstall, Install
  • Make Add-In identification explicit with (C#, for all COM DLLs):
    • [ComVisible(true)]
    • [ClassInterface(ClassInterfaceType.None)]
    • [Guid("58E7B70F-16C4-4538-A4E8-AF4EAC27519B")] // replace GUID with a new one
    • [ProgId("AddInSimple.AddInSimpleClass")]
  • In Visual Studio ensure that 'Register for COM interop' is checked
  • If you use WIX Installer ensure thar the File entry is updated (harvest it and update file entry)
  • Be careful in COM constructors (Exceptions don't show up, your dll isn't loaded and you have no clue why)

EA can't register the Add-In

Check installation witn EA Installation Inspector V2

This may also happen when you DEBUG and use your Add-In. You are sure you have done everything right:

  • Run Inspector V2, by Adrian
  • If your Add-In is red:
  • Take the GUID of the Add-In dll and delete all occurences in your registry
    • Run regedit
    • F3
    • Search for GUID from your Add-In shown in Inspector
    • Delete Key(s), all, or until Inspector V2 can't find your Add-In dll
  • Install your Add-In or start debugging by building your application and

COM Objects

The root dll of your Add-In and every window you want to register by EA/COM is a dll and have to be registered as COM object. Usually every dll is in a Project. If you change the Assembly version you have to update the register information.

Non COM objects are easy: Just include them and update the version as you like.

Debug

If you experience strange error messages during debugging (out of memory,..):

  • Select Enable native code debugging

If Visual Studion can't find your code:

References

Books

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.