Attributes in auto-generated documentation

There’s an existing thread on this but it started four years ago so I want to be sure this question gets visibility. I need to use a DiagramBaseInitiationBlock to output a diagram, then an InitiationBlock with modelType=“Class” (the help says “class”, which doesn’t work and caused me headaches) to get all the classes in the diagram. So far so good, I get the diagram image plus the list of class names and descriptions. Now I need to nest a construct that iterates on each class’s attributes, outputting each attribute’s name and description before moving on to the next class in the outer InitiationBlock. But my attempts to use ‘ForEach property=“Attributes”’ (and variants of capital, lowercase, singular and plural) and ‘InitiationBlock modelClass=“Attributes”’ (and variants; I don’t think this is right but I’m desperate) are failing. Any pointers would be appreciated. Thanks in advance!

Hi dennisk,

This is caused by while you looping on diagram the scope of work is on the diagram element. In order to obtain the class member you need to switch the scope to model element. The article below explains how it works.

Feel free to contact me for any questions and wish you have a good day!

Best regards,
Rain Wong