I tried searching this topic but it doesn't seem like I was able to easily find a good reference.
Magicdraw 2022x R1:
Following the Tutorial 27 - Generic Table Export.
I am unable to get the table created.
#import('generic', 'com.nomagic.reportwizard.tools.GenericTableTool')
#foreach(\\\$diagram in \\\$generic.filterDiagramTables(\\\$Diagram))
#set(\\\$table = \\\$generic.getTable(\\\$diagram.image)) ##Key note, this was originally \\\$diagram however it causes the library to fail and putting a property in helps prevent that.
\\\$diagram.name
#forcol(\\\$id in \\\$table.getVisibleColumnIds())\\\$table.getColumn(\\\$id)#endcol |
#forrow(\\\$diagramTableRow in \\\$generic.getRows(\\\$diagram)) #forcol(\\\$id in \\\$table.getVisibleColumnIds()) #set(\\\$level = \\\$diagramTableRow.getLevel()) #if(\\\$id == "QPROP:Element:name" && \\\$level > 0)#foreach(\\\$indent in [1..\\\$level]) #end #end \\\$table.getValueAsString(\\\$diagramTableRow.getElement(), \\\$id) #endcol #endrow |
#end
I provided a bare bones model just in case, but honestly isn't really relevant as any model should do with a working report wizard document.
I provided the example document that included the ability to test BDD images as I wanted to confirm output originally, then included the generic table images of what I wanted to output to verify those images would work, and lastly then tried to get the word document table to be created from the examples of either the first generic table or second it doesn't matter I was hoping that maybe a simpler one would work so I left both in just didn't comment out in this file.
Edit: Realized I should include the table just to make sure its communicated what I am expecting and currently it doesn't work.
Edit 2: The top row that has the name of the diagram doesn't need to be there. Since I created a VBA script to populate this when I was experimenting with worse case alternatives. Essentially it just needs to create it exactly as the images above look and then I would add under this the "Figure x Test Table Of Contents" for instance.
Edit 3: Also this is what I have referenced and again something just doesn't seem to be right. Not sure if its a parameter that needs to be appended or what.