NEW IN M2DOC

I’am new in M2doc, i would like to know how to define the parameter "self " like this:
Thank you in advance

Hello,
First of all, let me quickly explain the purpose of parameters:
Parameters are entry points into the model. You will explore the different model elements, their parameters and relations from those entry points.
Parameters are first declared in your word template, then mapped to a model element using the .genconf file.
Now let me summaries the different steps when using M2Doc:

  1. Template editing
    a. Edit your template in word writing aql expressions in fields
    (use “ctrl + F9” to create a new field and “shift + F9” to switch between display of fields value and fields expressions)
    b. Import your word template in your Capella project
    c. Declare the variable in your template using the M2Doc editor (this step is mandatory if you create the template from new word file, and necessary if you declare new variables in the AQL expressions)
    For this, right click on you word file in capella, Open with / Other… and choose the M2Doc Template Editor
    i. In the second block (package nsURI), do right click, add, type “*capella” in the filter, select all packages and select OK
    ii. In the first block (variables) you can do right click, add missing variables and it will automatically find variables from the word file. Then you need to define the type of variable by selecting a eClass from capella data model
    iii. In the third block (service class), do right click, select tokens, check default then press OK
    Your word file configuration should then look similar to this (depending on the number of variables and the kind of variables)
  2. Genconf editing
    a. Generate the .genconf file by right click on the word file, Initialize Documentation Configurations
    b. Edit the genconf gile
    i. Fill the destination URI field (name of the output file)
    ii. In the selection tab (at the bottom of the window), in resource set, do right click, load resource, then browse workspace and select the .melodymodeller file
    iii. Back in the overview tab, set the variable value: you have to select by hand the model element corresponding to your variable base on the type declared at step 1.c.ii (you will be offered the choice only between the model elements matching the type previously selected)
    iv. Convert your project in modeling project (right click on the project folder, configure, convert to modeling project). This is necessary for step vi
    v. Ensure that your aird file is open (you see the content in the capella project explorer)
    vi. In the option block of the genconf file, do right click initialize option. If you respected steps iv and v, the option should be filled in automatically
    Your genconf file should then look similar to this (depending on the number of variables and the variable values)
  3. Documentation generation
    a. Do right click on the genconf file, generate documentation
    Hope it will help you!

thanks a lot for your answer,
I am facing a new issue about a diagrame name:
{m:for im | self.containedSystemAnalysis.ownedSystem.asImageByRepresenta tionDescriptionName(‘System Architecture Blank’)}
–>put diagram name here
{m:im.fit(500,400)}
{m:endfor}
I cannot print the name of the system diagrams.
Thank you for your help!

Hello,
A new service is under definition to answer this need.
See my latest answer in this post:
https://forum.mbse-capella.org/t/499/

Hello,
If you try to use the sample template (“Template LA Complete”) with your model, the variable “self” is already defined in the word template.
Thus you can directly jump to step 2.
It is also normal to see new elements in your model after having created the genconf file and mapped it with the model.
The screenshot you sent regarding the genconf file seems right (at least I see no mistake).
Could you send us a view of the “Overview” tab also?
Finally, could you tell us which version of M2Doc you have installed?
(if possible send the link toward the M2Doc installation you used)

The example should work out of the box. If you right click on the genconf file and select “Generate documentation” Does it work ?
Also wizards are only available since M2Doc 2.0.0 are you using 2.0.0 or 2.0.1 ?

Thank you all for replies
Aurélien Pinsonneau :I don’t understand the last phrase of the first line (the variable “self” is already defined in the word template)
What I understood about the template “Template LA Complete” that it contains some queries independent from “In-Flight Entertainment System” or my model, so if I use it for my model it remains valid (perhaps this is my fault, if there is something to declare in this template to recognize my model , additional to queries which search in the skeleton of my model that contains the information: function , diagram…)
So I start from this understanding to follow your steps
So I start from 1.b , I consider that I have the template with queries (based on my understanding)
Step 1
step1 Result
Step 2
What I found not normal in my results are 1.C.ii and 2.b.iii
Thx
Youness

I use Capella 1.1.2
To install M2DOC i use instalation capella 1.1.X
THX
Youness

For 1.C.ii this menu is active only if some variables are used in the template but not declared in its custom properties (variable name to its type). So in your case all used variables are declared properly.
For 2.b.iii once the variable is declared you have to bind its value in the genconf. In order to to that you have to define the path to the Capella session (the .aird file) then your model is accessible to pick the value. In the Editor and the wizard the choice of values is restricted to the instance of the variable type ( in your case capellamodeller::SystemEngineering).
Hope I replied to you questions.
regards,
Yvan.

Thank you Yvan,
I follow lettelery what is declared in the website but unfortunatly with unsuccess
Even for convertion 2.b.iv some think created Inside my projetct witch i did’t find it in the exemple
as you mentionned inyour secend point, ““instance of the variable type ( in your case capellamodeller::SystemEngineering””): this is what i did
I did best to explain , perhaps i didn’t trasmit my problem clearly
Any case think you very much
Nice from you all

Hello,
Could you:
1/ Open the “Error Log” view.
To do so, use the menu Window / Show view / Other and search for Error Log.
In this view, you should see error messages corresponding to the generation error you get.
(if you see no error, try to launch the generation and an error should appear)
2/ Double click on the error message to get the details of the error
3/ Send us the details of the error message you have

Hi;
I use now capella 1.2.1, it’s fine for M2DOC
thx all
Youness

Hi,
A few days ago I installed M2Doc-Capella to generate documents.
I would like to generate only information from the physical part and not the others. So, the model proposed for the logical architecture part I cannot use it?

So, what I want to do is to start a new template and modify it directly to have my final template with the Capella diagrams. But when I try to change the new template and I
generates the genconf file, generates the final file, the modification are not considered.
If anyone can help me, thank you very much