Image on Magic Header not working

Dear all,

I have the following magic header for a script:

The idea is that the so-called MQM can be launched from the SystemEngineering model element, which is indeed working:


However, the associated image seems to be a “default” one, and definetely not the one I have defined in the indicated file path (workspace://…) I provide in the magic header.

Is there anything wrong with the magic header format, the provided file path, or even the picture format (currently png) that may be causing the magic header not working properly?

Thanks in advance.

The red square means the icon was not found. To check if it’s the format, you can copy an icon from Eclipse and use it to test. I think PNG can be a valid format. An other thing is the case of the extension and maybe other part of the given path, I would double check that to.

Hi Yvan, thanks for the quick response.

I just tested what you proposed in 2 different ways, but still no image is displayed:

  1. Copy paste an eclipse image in the very same folder where I have my mqm_logo.PNG file and provide the new file path (e.g. workspace://Python4Capella/MQM_launcher/sample.gif).

  2. Copy paste the path file of an eclipse image (e.g. local path to Capella + configuration\org.eclipse.osgi\914\0.cp\icons\full\obj16\sample.gif)

Somehow, the file path is not being interpreted correctly.

PS: As per EASE/Scripts - Eclipsepedia , these should be valid path files, so I have no idea what may be missing / wrong.

OK… You can try to restart your Capella. Some times this is needed to refresh the script location and reload magic headers. An other thing that might work is reordering the image directive in the header. Unfortunately I don’t see anything wrong with your header.

And that was exactly the problem… I just put the image before the popup in the magic header and now I do get the image :slight_smile:

So problem solved with an easy solution indeed!

PS: Just to add something: moving image before popup caused the popup not to work correctly (i.e. enableFor was somehow ignored). I finally got it correctly with the following magic header order:
Name, Image, Popup, Script type and Description.

Thanks Yvan, as always.


1 Like

Hi all,

I take the opportunity to reopen the discussion on this topic regarding Magic Headers. I need to define a Magic Header that is enabled for more than one Capella Model element type, in particular for all of the 5 ARCADIA layers: Operational Analysis, System Analysis, Logical Architecture, Physical Architecture and EPBS Architecture.

My first thought was to do this, but concatenating like this the popups and enableFor is not working (it is only considering the last pop-up line definition). I have checked and it works for each one individually.

# name                 : Launch MBSE Quality Model
# image                : workspace://Python4Capella/MQM_launcher/mqm_logo.png
# popup                : enableFor(
# popup                : enableFor(
# popup                : enableFor(
# popup                : enableFor(
# popup                : enableFor(
# script-type          : Python
# description          : Executes MBSE Quality Model

Any idea on how to do this?

Thanks in advance :slight_smile:

You can use the super type of all architectures:

Dear Yvan,

Thanks for the quick answer. I was missing this data type. Indeed, it works fine :slight_smile:

Kind Regards,

1 Like