Author Topic: Plugin to edit pictures  (Read 1410 times)

michielper

  • EA User
  • **
  • Posts: 149
  • Karma: +2/-1
    • View Profile
Plugin to edit pictures
« on: May 15, 2020, 07:10:24 pm »
I am looking for a way to let a user edit a picture (not a diagram!) in EA with an external editor. A sort of plug-in. Is this possible?

Thanks for any tips and tricks!

Michiel


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10418
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Plugin to edit pictures
« Reply #1 on: May 15, 2020, 08:07:37 pm »
I guess so, if your write an add-in that shows the image editor in the main view.

I'm pretty sure you should be able to find some kind of ready-made component you can use as image editor.

Geert

michielper

  • EA User
  • **
  • Posts: 149
  • Karma: +2/-1
    • View Profile
Re: Plugin to edit pictures
« Reply #2 on: May 15, 2020, 08:36:21 pm »
I guess so, if your write an add-in that shows the image editor in the main view.

I'm pretty sure you should be able to find some kind of ready-made component you can use as image editor.

Geert

Thanks! My problem is how to create an EA plugin that
1. takes the picture (or some identification of it) as an input argument,
2. then does its thing and
3. then writes a new version of the picture (on file)
4. such that it becomes visible in EA and in generated reports.

Is there a manual on how to create EA plugins?

Regards, Michiel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10418
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Plugin to edit pictures
« Reply #3 on: May 15, 2020, 08:44:02 pm »
Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins: https://bellekens.com/writing-ea-add-ins/

Geert

michielper

  • EA User
  • **
  • Posts: 149
  • Karma: +2/-1
    • View Profile
Re: Plugin to edit pictures
« Reply #4 on: May 15, 2020, 09:27:00 pm »
Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins: https://bellekens.com/writing-ea-add-ins/

Geert

Yes, I saw this and will exeriment. I have nothing against C# but isnt VBA the default scripting language in EA?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10418
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Plugin to edit pictures
« Reply #5 on: May 15, 2020, 09:36:15 pm »
Yes, I saw this and will exeriment. I have nothing against C# but isnt VBA the default scripting language in EA?

Not exactly. Vbscript (not VBA) is one of the options for scripting (the one I use extensively) but Sparx appears to be pushing more for JavaScript these days.
Some of the newer features such as Model Add-ins only support Javascript and no VBScript anymore.

But add-ins are completely different from scripts. An add-in is a compiled dll that is called by EA.
You can create that dll with any language that can compile into a COM compatible dll. C# is the most obvious choice, but I believe some others (Ian?) use VB.Net

If you are looking for open source examples I'm pretty sure most of those will be C# (I know because I wrote most of them ;D)

Geert

Geert

michielper

  • EA User
  • **
  • Posts: 149
  • Karma: +2/-1
    • View Profile
Re: Plugin to edit pictures
« Reply #6 on: May 16, 2020, 08:26:25 pm »
Is there a manual on how to create EA plugins?

I wrote a couple of articles about writing add-ins: https://bellekens.com/writing-ea-add-ins/

Geert

I am using "Microsoft Blend for Visual Studio" on Windows 10. Your instructions seem to use another version, e.g. there is no "System.Windows.Forms" in my configuration.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10418
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Plugin to edit pictures
« Reply #7 on: May 16, 2020, 09:27:54 pm »
You have to make an ActiveX control somehow, because that is what EA is expecting.
In a normal C# Visual Studio project that is a user control.

I'm not sure you can do that with Blend. You might to create your form with Blend, and then wrap it in a regular user control.

Geert

Sunshine

  • EA User
  • **
  • Posts: 952
  • Karma: +83/-7
  • Its the results that count
    • View Profile
Re: Plugin to edit pictures
« Reply #8 on: May 19, 2020, 06:32:51 am »
Don't think Visual Studio Blend is the right tool for the job.
If you can't afford visual studio then try visual studio code its free.

« Last Edit: May 19, 2020, 06:46:46 am by Sunshine »
Happy to help
:)