-1

I'm writing EA Addin and AFAIR I have to register COM, but that implicate I need dll. But I have normal app in WPF and I'd like to just separate starting Addin and exe. I want to EA use my dll to start my main app, but I don't know how to pass Repository object from dll to my app, have you got any suggestion? Or even my idea to separate dll and exe is wrong?

rechandler
  • 756
  • 8
  • 22
  • It is certainly possible to have an Add-In start an application which in turn connects to an EA repository, as detailed in my answer. It is unusual to do so, however, but without more information about your specific case it is impossible to tell whether it is appropriate or not. – Uffe Sep 19 '14 at 13:32

2 Answers2

1

The EA Add-In has to be a DLL.

If all you want the Add-In to do is start another application, that's simple enough: just make the appropriate system call. Instead of passing the repository to the application, pass Repository.ConnectionString and have the application open it using Repository.OpenFile().

Uffe
  • 10,396
  • 1
  • 33
  • 40
1

I resolve my problem other, very simple way. I've got two projects in my solution DLL and EXE. When I click on menuItem, DLL execute this:

var app = new App();
app.InitializeComponent();
app.Run();
Window1.Repository = _repository; //I know static field is bad, but this is only example

And it's work ;)

rechandler
  • 756
  • 8
  • 22