Generate all the PAB diagrams

Hi everyone, i have a problem with generating the PAB diagrams. I wanted to generate all the PAB diagrams. I wrote my code in order to generate all the PAB diagrams, but i have realized that some PAB diagrams are missing. Here is my code :


Thanks in adavance for helping.

Hello,
With ā€˜->closure(ā€¦)ā€™, you donā€™t reach all Physical Components.
For example, diagrams in ā€˜Logical Component Pkgā€™ are not reached.
You should try:

self.containedPhysicalArchitectures.eAllContents(
OrderedSet{pa::PhysicalComponentPkg, pa::PhysicalComponent})
.representationByDescription(...

You can easily test you query or parts of it with M2Doc interpreter view:

ā€˜eAllContentsā€™ may appear to be slow on large models.
You can then use a faster query combining ā€˜closureā€™, ā€˜oclIsKindOfā€™ and ā€˜ifā€¦thenā€¦elseā€™ but such query requires a ā€œlittleā€ bit of work .

1 Like

Thank you so much it works.