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.