Issuing TaggedValues in documentaion (#1512)
I started to develop an own template for a documentation project, I'm working on. Works so far, but I'm not able to issue the tagged values from elements or diagrams. I tried the following code, derived from general logic and what I found in the documentation. But nothing happens. Is there something wrong or is there a problem in the application?
ForEach:Diagram.Elements
If:Or(Equals(Element.ElementType, "package"), Equals(Element.ElementType, "part"))
AddNewParagraph
SetParagraphStyle("Heading 3")
SetParagraphNumbering("HeadingMultiLevel")
AddText(Element.Name)
SetParagraphHeading(3)
AddNewParagraph
SetParagraphStyle("Text")
AddText(Element.Documentation)
If:Element.HasTaggedValues
AddNewParagraph
AddText("Tagged Values")
AddTable(3,1,DocumentBodyWidth, Mm(5))
SetTableStyle("Black")
AddText("Name")
GoToNextTableCell
AddText("Type")
GoToNextTableCell
AddText("Value")
ForEach:Element.TaggedValues
AddNewTableRow
AddText(TaggedValue.Name)
GoToNextTableCell
AddText(TaggedValue.Type)
GoToNextTableCell
AddText(TaggedValue.Value)
EndFor
EndIf
EndIf
Thanks and regards
Stefan Menten
Stefan Menten 16 August 2017 10:46:49
I checked that and it is working, but not for all objects. So far I found that is not working for the part object from the packages diagram.
Dusan Rodina - softwareideas.net 8 August 2017 22:04:59
It is almost correct - the line:
If:Element.HasTaggedValues
must be changed to:
If:GreaterThan(Element.TaggedValues.Count,0)
Currently, the command .HasTaggedValues is not available. There is a command .HasTaggedValue(tagName).
Syntax checker for template language is planned to be included in one of next releases, which will make identifying similar errors easier.
In case of any other questions feel free to let me know.