Exporting OA diagram

Hello, i have tried to export the OAB diagram, i have used the M2DOC interpreter to get the right root and also the name. After this step i put the right information on my code and when i generate the document i haven’t found the diagram and there are no errors on the code :
{m:for im |self.containedOperationalAnalysis.containedOperationalActivityPkg. representationByDescriptionName(‘Operational Activities Blank’) }
{m:im.name}
{m:im.asImage().setWidth(400)}
{m:endfor}
The M2DOC interpreter :
the interpreter gives me the name of the diagram : Operational Actvities.

thanks for helping.

It’s possible that the generated image doesn’t fit on the page depending on its size and aspect ratio.
Can you try the fit() service instead of setWidth():

{m:im.asImage().fit(400, 400)}

Are you able to insert other diagrams in your generated document ?

I have tried to change the fucntion (fit) but it didn’t work. Yes i have exported other diagrams and it worked.

Can you check if the quote surrounding have not been replaced or spaces inserted ?

I checked the quote and nothing have been replaced or spaces inserted. Also i have the same problem with PAB diagram. For the others it works good

Can you call the availableRepresentations() service in your template and double check the type of element holding the diagrams and the name of the description ?


I have found this information when i called availableRepresentations(). My code is :
{m:for im | self.containedOperationalAnalysis.containedOperationalActivityPkg.representationByDescriptionName(‘Operational Activities Blank’)}
{m:im.name}
{m:im.asImage().fit(400, 400)}
{m:endfor}

i got this error when i had generated the genconf file :

I think you need to replace containedOperationalEntityPkg by containedOperationalActivityPkg. that’s what you had in your first example.

I have tried this and i didn’t get an error mesage but the diagram is not generated. In addition i have another problem with PCBD diagram, here is my code :
PCBD diagram

My code corresponds to the digram name and root, but i got this error message :

Thanks for helping.

The code you are showing as text and the code validated by M2Doc is not the same. In the code validated by M2Doc you have a missing closing parenthesis.

Did you try to list all representations and check if the type of element holding the representation and the name of the representation description match with what you are passing as argument of the representationByDescriptionName() service ?

For the PCBD diagram it works, but the OAB still nothing on the generated document.