maybe the description of the issue was not clear.
When I paste an image in the Description of a Capella element, a png image is created in the images subfolder and an absolute pathname is associated to the URL of the image properties.
M2Doc, while generating the Word file, tries to associate such absolute pathname to Eclipse project reference, but adds the template folder, generating a wrong URL to the image file.
This looks like a bug since the URI is absolute it should not be modified by M2Doc.
You have two options here:
replace all URI to be relative and see if the image is still found by Capella then put your genconf file in the same folder that was used by Capella to resolve the URI. Note that Capella might not resolve URIs since they use absolute URIs…
Create a service that remplace the MImage URI so M2Doc is able to find the image.
I was able to get images in the generated document by implementing the following workarounds:
Replace absolute URI in Capella description with a relative URI. I think that this issue should be fixed in Capella, since when the project is shared within a team, no absolute pathnames should be used, because each member of the team will use different local configurations.
Move .genconf and .docx template in Capella project root to avoid relative paths.
I found an additional issue in the generated document. It seems that M2Doc does not apply scaling parameters defined within the image properties.
I come back to this issue I am experiencing in document generation with Capella 6.0 + M2doc 3.2.2 when images are added in the description.
Past version of Capella embedded images encoded within the model, while Capella 6.0 stores them externally in an image folder. This feature has some drawbacks. Using git each image needs to be added to version control. Moreover, since the image is referenced with absolute path in the description, the absolute path has to be removed from each image leaving relative path only.
I think that an issue has to be generated either on Capella 6.0 or M2Doc 3.2.2.