Book a Demo

Author Topic: Dockable Window  (Read 5956 times)

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Dockable Window
« on: October 07, 2010, 11:45:19 pm »
hi,

I want to make my Plugin Window dockable to EA Main Window.
How does it works?

Best Regards,
Stefanw

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Dockable Window
« Reply #1 on: October 08, 2010, 12:14:18 am »
Stefan,

Look at Repository.AddWindow (string WindowName, string ControlID).
I haven't tried it myself, so I can't give you any examples.

Geert

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Dockable Window
« Reply #2 on: October 11, 2010, 09:37:28 pm »
Quote
Stefan,

Look at Repository.AddWindow (string WindowName, string ControlID).
I haven't tried it myself, so I can't give you any examples.

Geert

I haven't any ControlID for my Form. This is only possible if
I build an ActiveX COM-Class. I hate COM  :o

Is there any other possibility to dock a window?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Dockable Window
« Reply #3 on: October 11, 2010, 09:45:20 pm »
TFM says:
Quote
Adds an ActiveX custom control as a window to the Add-Ins docked window. Enterprise Architect creates a control and, if successful, returns its Unknown pointer, which can be used by the caller to manipulate the control.

The window can be shown by selecting it from the list in the Workspace Layouts toolbar - click on the third icon from the right and look at the end of the list.

Parameters:

WindowName: String - used as the window title.
ControlID: String - the ProgID of the control; for example, Project1,UserControl1.
So I guess that's the only way to dock a window.

Geert

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Dockable Window
« Reply #4 on: October 12, 2010, 12:48:53 am »
Quote
TFM says:
Quote
Adds an ActiveX custom control as a window to the Add-Ins docked window. Enterprise Architect creates a control and, if successful, returns its Unknown pointer, which can be used by the caller to manipulate the control.

The window can be shown by selecting it from the list in the Workspace Layouts toolbar - click on the third icon from the right and look at the end of the list.

Parameters:

WindowName: String - used as the window title.
ControlID: String - the ProgID of the control; for example, Project1,UserControl1.
So I guess that's the only way to dock a window.

Geert

ok.

how can I get the ProgID, please?
« Last Edit: October 12, 2010, 12:50:03 am by stefanw »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Dockable Window
« Reply #5 on: October 12, 2010, 04:01:38 am »
I'm not sure, but I'm guessing its going to be <your_project_name>.<your_control_name>

Geert

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Dockable Window
« Reply #6 on: October 12, 2010, 05:55:23 am »
The ProgID is a registry key under HKEY_CLASSES_ROOT with a subkey CLSID. When you build your AddIn and/or your control with something like Microsoft Visual Studio there will usually be some assistant to create a new project, and the ProgID will be like Geert says.

When your not sure, search the registry for the full path of your dll. You'll find it under "HKEY_CLASSES_ROOT/CLSID/{some guid}/InProcServer32". Then search for that guid, which you will find under HKEY_CLASSES_ROOT/your-prog-id/CLSID.

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Dockable Window
« Reply #7 on: October 19, 2010, 02:54:33 am »
I get an Email from Sparks Support with this link

http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/automation_and_scripts/repository3.html

Now, it works  ;)
thank you!

but I have a further problem. I think the method CloseAddins is used to close the addin. I get no compiler error, but it doesn't works  :(

any idea?

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Dockable Window
« Reply #8 on: October 27, 2010, 12:16:48 am »
in which EA built the function were implemented, please?

AddWindow (string WindowName, string ControlID)

Built 844 is EA 7.5 - not implemented
Built 863 is EA 8.0 - implemented

but I need the exactly Built

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Dockable Window
« Reply #9 on: October 27, 2010, 03:57:56 am »
look in the release notes.
There should be a line about the AddWindow.

Geert

stefanw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Dockable Window
« Reply #10 on: October 28, 2010, 08:59:55 pm »
Quote
look in the release notes.
There should be a line about the AddWindow.

Geert
I found the Release Note in the Readme.txt in EA Directory

AddWindow were Implemented in Built 855

Thank you for your help  ;)