How can I adress a specific Model Element or Diagram as Query-Parameter (Fill-In Doc)

generate-document

#1

Hi there,

when creating a Fill-In Doc I want to adress a specific DIAGRAM or ELEMENT of my model without having to select it later on in VP DocComposer.

Eg. I would like to place a statement like perhaps
${DIAGRAM, “Use Case Diagrams (Admin)”, “UseCaseDiagram”, Any=“MySpecificDiagramName”, PROPERTY=name}
into my Doc Base. As a result after importing my Doc Base into Doc. Composer I would not have to pick the specific diagram; instead Doc. Composer would find and select it automatically for me (without further interaction from me). Same idea applies to ELEMENTs…

Background is: If I need to change my Doc Base Word-Document I always have to re-pick my DIAGRAMs and ELEMENTs queried with “One” or “Any” by hand when I want to re-generate my project documentation.

How can I achieve this in VP?

Thanks for any input
Volker


#2

in ${DIAGRAM, ...Any or One, ...}. you can specify:
PreferredDiagram.Name={diagram.name}
e.g.
${DIAGRAM, ..., Any, ..., PreferredDiagram.Name="My Diagram Name", ...}

in ${ELEMENT, ...Any or One or LoopInElement, ...}, you can specify:
PreferredElement.Name={element.name}
PreferredElement.UserId={element.userId}

in ${ELEMENT, ...LoopInDiagram, ...}, you can specify:
PreferredDiagram.Name=diagram.name with LoopInDiagram


#3

Thanks a lot for the hint, looks pretty much like what I’m looking for. Is there a documentation available for additional parameters like those PreferredElement and maybe more? I was not able to find them in the Doc. Composer user guide.


#4

Sorry, the document is not yet ready.

Let me try to show you here

${DIAGRAM, ...}
* format: ${DIAGRAM, name, "DiagramType(0..N)", NUMBER_OF_DIAGRAMS[One, Any, LoopInProject, LoopInElement], TEMPLATE[template_name, PROPERTY=property_name, ICON, IMAGE]}
*
* --- additional arguments ---
* SortBy=property_name(1..N)
* or
* SortBy=NoSort
*
* PreferredDiagram=Address of DiagramWithData(0..1)
* PreferredDiagram.Name=Name of DiagramUIModel(0..1)
* // the preferred diagram selected in this doc fields. If this doc field has no diagram selected, will find out this preferred-diagram, and assign into this doc field.


${ELEMENT, ...}
* format: ${ELEMENT, name, "ModelType(0..N)", NUMBER_OF_ELEMENTS[One, Any, LoopInProject, LoopInElement, LoopInDiagram], TEMPLATE[template_name, PROPERTY=property_name, ICON]}
*
* --- additional arguments ---
* SortBy=property_name(1..N)
* or
* SortBy=NoSort
*
* PreferredDiagram=Address of DiagramWithData(0..1)
* PreferredDiagram.Name=Name of DiagramUIModel(0..1)
* // the preferred diagram selected in this doc fields. If this doc field has no diagram selected, will find out this preferred-diagram, and assign into this doc field.
* // used when NUMBER_OF_ELEMENTS = [LoopInDiagram]
*
* PreferredElement=element.address(0..1)
* PreferredElement.Name=element.name(0..1)
* PreferredElement.UserId=element.name(0..1)
* // the preferred element selected in this doc fields. If this doc field has no element selected, will find out this preferred-element, and assign into this doc field.
* // used when NUMBER_OF_ELEMENTS = [One | Any | LoopInElement]
*
* PreferredExcludedModelTypes=modelType(0..N)
* PreferredExcludedInstances=element.address(0..N)


${PROJECT, ...}
* format: ${PROJECT, TEMPLATE[template_name, PROPERTY=property_name]}


${TEXT}
* format: ${TEXT, NAME}


${PROPERTY, ...}
* format: ${PROPERTY, xxx}


${IMAGE}
* format: ${IMAGE}


${ICON}
* format: ${ICON}


${TEMPLATE}
* format: ${TEMPLATE, template-name}

PS: ${PROPERTY}, ${TEMPLATE}, ${IMAGE}, ${ICON} are used in a table,
which for-each a set of elements/diagrams and generate them into rows,
using the ${PROPERTY, …}, etc… to generate the current element/diagram’s property, template, icon, image.