Missing regular M2DOC services

I don’t know if this is related to the template version, or my M2DOC version or something.

A contact of mine is using one of my templates with M2DOC 3.2.0, when testing his generation it worked,

I made a fresh installation of Capella (same version 5.1), and installed M2D 3.2.0 (same one), and used the same template, I even had to check the checkbox in its config wondow that became inchecked when copied pasted:

I checked the NSuri, and I had the FULL list I believe.

Strangely enough, the new installation, same or similar model, same version of M2DOC and → I am getting errors related to missing services such as:

I am surprised, I thought I had learned everything about M2DOC (except functions), What Am I missing? What else should I check to resolve it?

And good day/or night

The DRepresentation.asImage() service needs a Sirius session and the Sirius nsURIs to be registered to work properly.

You can add the SiriusSession option in your .genconf file to reference a valid .aird file. And use the template properties wizard to add Sirius nsURIs.

Hello Yvan,
Thank you for your answer,
I tried to reproduce everything and went to check the sirius session variable as you have suggested and reminded me well (thanks), unfortunately it seems the problem is still there:

The list of nsURI is as follows:

I made sure the nsURI are there, I even added more capella/kitalpha/sirius ones than needed, it did not change the outcome.

Which is:
(same for asImage…)

As for the genconf configuration:

and I added the sirius you mentioned:

(I hide the name of the project in the screenshot).

version 3.2.0 for template and M2DOC extension.

What else is wrong?
Thanks so much!

If a relative URI is passed to the SiriusSession option it’s resolved from the URI of the .genconf file. Here I suppose your .genconf file is in the same folder as the .aird file.

Can you open the diagram from your Capella without any error ?

I see the interaction nsURI that contains the Scenario EClass in your template properties so it no the cause of your error.

Yes it is in the same level directly under the main project item, Ok now I understand why my genconfs would sometimes not work properly.

I believe some diagrams do not even exist yet (new project), but the scenario should not produce an error if it’s a “None”, at least in the M2DOC interpreter it did not produce an error (I think I tested it 2 days go or yesterday),

I will have to test that again

Do you think having different names for the top project file, and the aird, could ever cauze this errors?
I resolved it in a local version where I had same names, but my contact could not resolve it, althought he has different names for the top file and the aird.

Wonder if that’s it… cause everything else is the same.

Edit: I Can CONFIRM! That was it!
Even more curious, is the fact that it is not really the name of the folder containing the project, but more the name of the project file saved in the metada of the workspace the first time opening the project! wow

1 Like

I don’t know… this depend on Capella. I would say if Capella can open your model M2Doc should be able to open it as well with the right SiriusSession option. But by default Capella project are always created with the same name for the .capella and .aird files.

You can export a project as a zip file by selecting the project an right click on it to select the export menu. That might help sharing your projects. It can then be imported with the import menu, existing project archive file.

1 Like

Check my edit in the last post, that was it! I was very surprised.
Even more when I saw that the name of top project is not necessarily the name of the folder.
Edit: We tend to copy files with a copy paste, and many times the top project take the folder name and not the aird/.cap name in this case. As for the export feature, I never thought about it, thanks.