Hello Anne,
I found how to generate my document.
I post How I have done It perhaps This will be helpful.
See below my template.
Best Regards
Arthur
<config>
<param key='workspace' value='C:\Donnees\Sources' />
<param key='project' value='${workspace}\4THE4' />
<param key='model' value='${project}\4THE4SysML.sysml'/>
<output path ='${project}\DocTest\381 xxxx Spécifications des Télécommandes 
4THE4.docx' />
</config>
<context model='C:\Donnees\Sources\4THE4\Models\4THE4SysML.sysml' 
element='4THE4SysML/4THE4Requirement' importedBundles= 'topcased' 
searchMetamotels='true'/>
<gendoc>
[if(not(self.ownedElement ->filter(sysml::Requirement)->isEmpty()))]
<table>

ID      Risk    Name    Text

[for(req:sysml::Requirement|self.ownedElement->filter(sysml::Requirement)->sortedBy(id))]
[if (req.name='Configuration')]
[for(req1:sysml::Requirement|req.ownedElement->filter(sysml::Requirement)->sortedBy(id))]
[let stereo : Stereotype = 
req.getAppliedStereotype('RequirementExtension::RqExt')]

[req1.id/]      [req1.getValue(stereo,'Risk')/] [req1.name/]

[/let]
[/for]
[/if]
[/for]
</table>
[/if]
</gendoc>


_____________________________________________
De :    Dimanche Arthur (DCH-CO/ESC)
Envoyé :        jeudi 9 septembre 2010 12:42
À :     [email protected]
Objet : PB to generate stereo type

Hello Anne,


I can't display the values of your stereotype properties in my documentation.
I have the following model.
 << Objet OLE: Picture (Device Independent Bitmap) >>
I would like to display rqExt of all requirement contented in "Configuration" 
(SaveConfiguration", "RestoreFactoryConfiguration" and "ImageConfiguration".

Please see below my template.
<config>
<param key='workspace' value='C:\Donnees\Sources' />
<param key='project' value='${workspace}\4THE4' />
<param key='model' value='${project}\4THE4SysML.sysml'/>
<output path ='${project}\DocTest\381 xxxx Spécifications des Télécommandes 
4THE4.docx' />
</config>


<context model='C:\Donnees\Sources\4THE4\Models\4THE4SysML.sysml' 
searchMetamotels='true' element='4THE4SysML/4THE4Requirement/Configuration' 
importedBundles= 'topcased' />
<gendoc>
    [if(not(self.ownedElement->filter(sysml::Requirement)->isEmpty()))]
       <table>
ID      Risk    Name    Text
[for(req:sysml::Requirement|self.ownedElement->filter(sysml::Requirement)->sortedBy(id))]
   [let stereo : Stereotype = 
req.getAppliedStereotype('RequirementExtension::RqExt')]
      [if (not(stereo.oclIsUndefined()))]
[req.id/]               [req.name/]
      [/if]
                  [/let]
[/for]
       </table>
    [/if]
</gendoc>

And when I generate the document I have the following error
"See details.
The execution of a script failed: Invalid Type :Stereotype.
This may be due to references to multiple metamodels in your model.
TIP: You could try to add the following attribute in <context> tag : 
searchMetamodels='true'."

I am not able to find to error

Could you please help me?

Best Regards

Arthur

_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

Reply via email to