Export images in description


2ac9cd8491fccbd4f619e20c642ccefc
I failed to export diagrams in requirement text, what does the error message mean and how to solve it?

Maybe there is a problem with the URI encoding. You can try to remove the white space in “Service Library”. “Service Library” is a project in your workspace ? Maybe you can try with a relative path on your file system ?

Also “platform:/resource” URIs won’t work outside of Eclipse.

1 Like

@YvanLussaud
Thank you! I change the location of the template from the folder to directly under the project, and use replaceAll() function to replace the extra prefix of the URI so that the image can be located.

Another question. How to resize the picture. It’s too big now, and the fit() function won’t work.

1 Like

You will need to write a service to navigate MElement and resize MImage. The service replaceLink() navigates MElement if you need a starting point.

Thank you!


I’ve found another method to modify size.

Another question, could I define selection as a variable in the template, and each generation result depends on which element I select?

Your method is interesting, you should only set one of the two dimension if possible to keep aspect ratio.

Yes you can use a variable of your template to bind a different value in different .genconf files. After that you can use an if statement to check is a block of code should be generated or not. You can also define a template construct to create a function that will generate part of the document and can be called like a service. There are some examples in the unit tests.

1 Like