1
Automation Interface, Add-Ins and Tools / EA COM Interface
« on: November 01, 2006, 03:59:59 am »
We have developed an addin in EA using C# and it is working fine and all menu options are visible under “Add-Ins” in main menu of EA.
Now I have some problem with EA COM interface:
1.
When I open another EA repository file (.eap) through this addin then my addin disappears in new EA window. I am using following command to open new EA repository.
EA.RepositoryClass rc=new EA.RepositoryClass ();
rc.OpenFile(@"c:\Test.eap");
Above code opens new EA instance and Test.eap gets opened in this new instance of EA but my add in gets disappeared!!!!!!
2. EA COM interface provide following event:
public void EA_FileOpen (EA.Repository Rep)
{
openRep=Rep ;
}
Where openRep is declared as
public static EA.Repository openRep;
As we know “EA_FileOpen” allows the Add-In to respond to a File Open event. When EA opens a new Model file, this event is raised and passed to all Add-Ins implementing this method. In this method we have stored the open repository reference in static variable “openRep”. Now my question is that can I access “openRep” through another addin or COM interface. So that I may use same repository to open new EAP file.
3. Suppose EA is open and we want to open an EAP file through another EXE, COM or DLL in same open EA instance. Is it possible???
Regards
Rashid
Project Manager
India
Now I have some problem with EA COM interface:
1.
When I open another EA repository file (.eap) through this addin then my addin disappears in new EA window. I am using following command to open new EA repository.
EA.RepositoryClass rc=new EA.RepositoryClass ();
rc.OpenFile(@"c:\Test.eap");
Above code opens new EA instance and Test.eap gets opened in this new instance of EA but my add in gets disappeared!!!!!!
2. EA COM interface provide following event:
public void EA_FileOpen (EA.Repository Rep)
{
openRep=Rep ;
}
Where openRep is declared as
public static EA.Repository openRep;
As we know “EA_FileOpen” allows the Add-In to respond to a File Open event. When EA opens a new Model file, this event is raised and passed to all Add-Ins implementing this method. In this method we have stored the open repository reference in static variable “openRep”. Now my question is that can I access “openRep” through another addin or COM interface. So that I may use same repository to open new EAP file.
3. Suppose EA is open and we want to open an EAP file through another EXE, COM or DLL in same open EA instance. Is it possible???
Regards
Rashid
Project Manager
India