Hi,
Lesson 10 demonstrates how to extract documentation of Part Definitions and Usages. I wish to experiment extending that to other element types, for example, documentation of the package.
In the lesson 10 directory, adding a doc to the top level package:
// L10_AnnotatedWorkshop.sysml
package L10_AnnotatedWorkshop {
doc locale "en_US"
/* package documentation text */
// ...
then modifying the script to add `syside.Package` to the list of element types:
# L10_extract_documentation.py
# ...
# Iterate through all part definitions and part usages
for element in model.elements(syside.Type, include_subtypes=True):
if type(element) in [syside.PartDefinition, syside.PartUsage, syside.Package]: # <-- here
# ...
Does not result in the new documentation getting picked up:
# ...
Total documentation entries: 7 # as before...
Any idea what is missing?
Thanks
Sean