Book a Demo

Author Topic: How to get the EA main form object  (Read 2995 times)

lionwys

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
How to get the EA main form object
« on: October 19, 2006, 09:53:25 pm »
hi.
I am building a EA add-in and I build a dialog, but when I click some button in the dialog, I want to focus on the main form,

but I couldn't get the object of the main form, so how can I get that?


thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to get the EA main form object
« Reply #1 on: October 20, 2006, 04:46:19 am »
Assuming you have at least one diagram open in the main window, could you not use the Repository.ActivateDiagram function? You'll need the diagram ID but you should have captured that someplace. You can always get a reference to the current diagram with Repository.GetCurrentDiagram.

If you are referring to a tabbed window someplace there is a similar function - Repository.ActivateTab. You need to pass the name of the tab as a string. You should probably first verify that the tab is open with Repository.IsTabOpen, again passing the tab name.

HTH, David
No, you can't have it!