Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Thomas Arnbjerg on July 07, 2023, 04:43:28 pm

Title: Is there a way to trigger the report builder from javascript (i.e. F8)
Post by: Thomas Arnbjerg on July 07, 2023, 04:43:28 pm
I've created a script, which sets the project constants based on tags on a report package. Is there a way to trigger document generation from javascript (display window 'Generate Documentation') and avoid having the user press F8?
Title: Re: Is there a way to trigger the report builder from javascript (i.e. F8)
Post by: Geert Bellekens on July 07, 2023, 04:54:43 pm
Yes, you can press F8 for him.

This is how I do it in VBScript:

Code: [Select]
dim ws
Set ws = CreateObject("wscript.shell")
ws.sendkeys "{F8}"

Not the most elegant solution, but it does the job

Geert