Initialization of a variable in M2DOC template

Hi every body,

In a capella M2Doc template, i want to initialize a variable with an object in the capella model with a specific UID
what is the line of code corresponding ?

thank you

To initialize a varaible, you can use let. To find the model element with an UID, you can use the search service. The line of code could be something like :

{ m:let anObject = self.eAllContents()->select(x | x.id.toString().equalsIgnoreCase(‘your_uid’)) }

Refer to Reference Documentation - M2Doc to know more about “let”