Book a Demo

Recent Posts

Pages: 1 ... 8 9 [10]
91
General Board / Re: UC Scenarios flushed at import
« Last post by elr on August 28, 2026, 06:32:59 am »
Submitted as a bug... Wait and see...
92
Bugs and Issues / RTF Template filters not working when run from a script
« Last post by Guillaume 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.

93
Yes.  Same error.
94
I don't think so. I agree that would be a useful feature.

Geert
96
Automation Interface, Add-Ins and Tools / Generate reports from the Compare Utility?
« Last post by miksko on August 25, 2026, 06:19:24 pm »
Sparx' Compare Utility lets you track the changes between the current version and a baseline. (I imagine it's possible to also let it track the changes between the current version and the latest version checked in, in case you use Sparx' built-in version control, but I haven't been able to check that.) Is it possible to use the Report Builder to generate a document from the changes (also those made in diagrams)?

I'm asking since the Compare Utility is pretty tricky to use and we don't want to force every consumer to install the client. We also want the consumers to easily be able to review the incremental changes made between minor versions, in case they are behind.
97
Is this still the case, or does EA now support custom shortcuts and icons for addins?
Yes, no change yet.

Geert
98
I'm guessing there is erronous data already in the t_xref. Have you tried it on a clean emtpy sql server repository?

Geert
99
Is this still the case, or does EA now support custom shortcuts and icons for addins?
100
I use an EA-Matic script for some of the mandatory settings we want all users to have:

Code: [Select]
'[path=\Projects\EA-Matic Scripts]
'[group=EA-Matic]
option explicit

!INC Local Scripts.EAConstants-VBScript

'
' Script Name: Fix Mandatory User Settings
' Author: Geert Bellekens
' Purpose: Check the mandatory user settings in the registry and set them correctly if needed
' Date: 2021-05-28
'

'EA-Matic

const REG_SZ = "REG_SZ"
const REG_DWORD = "REG_DWORD"
const REG_BINARY = "REG_BINARY"

function fixSettings
dim regPath
Dim regkey
dim regValue
dim existingValue
'place in the registry that contains all of the user settings
regPath = "HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS\"
'get the EA version
'set the default diagram layout
Repository.Execute  "update s set s.[Value] = 'l=20;c=20;d=1;cr=1;la=2;i=1;it=4;a=0;' from usys_system s where s.[Property] = 'Diagram_Layout'"
'fix registry settings
dim settingsValid
settingsValid = true
settingsValid = settingsValid AND validateRegValue(regPath, "SORT_FEATURES","1", REG_DWORD) 'commented out because of conflicts with TMF model. Has to be uncommented for Baloise
settingsValid = settingsValid AND validateRegValue(regPath, "TREE_SORT","0", REG_DWORD)
settingsValid = settingsValid AND validateRegValue(regPath, "XMI_ReportXrefDeletion","0", REG_DWORD)
settingsValid = settingsValid AND validateRegValue(regPath, "JET4","1", REG_DWORD)
validateRegValue regPath, "XSDFileName","", REG_SZ

if not settingsValid then
msgbox "Mandatory user settings have been corrected." & vbNewLine & "Please restart EA",vbOKOnly+vbExclamation,"Corrected mandatory user settings!"
Repository.Exit
end if

end function

function validateRegValue(regPath, regKey, regValue, regType)
Dim shell
' Create the Shell object
Set shell = CreateObject("WScript.Shell")
dim existingValue
on error resume next
'read registry value
existingValue = shell.RegRead(regPath & regkey)
'if the key doesn't exist then RegRead throws an error
If Err.Number <> 0 Then
existingValue = ""
Err.Clear
end if
on error goto 0
'check the value in the registry with the desired value
if Cstr(existingValue) <> regValue then
'write the correct value to the registry
shell.RegWrite regPath & regkey, regValue, regType
'return false
validateRegValue = false
else
'value was already OK, return true
validateRegValue = true
end if
end function

function EA_FileOpen()
fixSettings
end function

Geert
Pages: 1 ... 8 9 [10]