Book a Demo

Author Topic: RTF Template filters not working when run from a script  (Read 267 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1413
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
RTF Template filters not working when run from a script
« on: August 28, 2026, 12:23:48 am »
I have a script in EA that generates documents using the DocumentGenerator class.
It generates content from a list of packages using the method DocumentPackage(pkg.PackageID, 0, "TemplateName") on each EA.Package.

In the applicable RTF template, I generate for each diagram in the package the list of elements names in a table. In the template documents options > element filters, I set a filter on the elements matching a criteria e.g. ObjectType = Class.
When I run the script, the table is empty.
If I generate the document directly from the EA template, it works i.e. the elements tables are populated according to the filter set.

If I remove the filter, the table is populated with all diagram elements via the script.
I tried several filters: Element ObjectType Contains  / OneOf / Class.

It looks like a bug. As a workaround I create a fragment with a custom SQL query.

« Last Edit: August 28, 2026, 12:47:25 am by Guillaume »
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com