Book a Demo

Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
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
42
EA 17.1 Professional on Windows 11 on work computer; a few times a day the preferences for line color, not using element shadows etc. are reset to EA default (gray lines, shadows on etc.) so several times a day I need to spend 40 seconds on Preferences menu to manually set the preferences back to what I want.  Is there a way to speed up this process, such as a script?  Because it gets annoying after the 450th time.  p.s. Suggestion for future releases, DON'T store user preferences in the Windows registry please!!!
43
We are trying to import DDL into a SQL Server repository (running on Azure SQL on our own tenant).  We are getting an uncontrolled error with t_xref.  Sparx then creates the names of the first two tables in the .sql file, but no columns, and crashes out. 
We do not get this error when loading onto a local file-based repository.

Has anyone come across this?  Does anyone have any ideas?

------
Enterprise Architect (Build: 1721 - 64 bit)

Microsoft Cursor Engine [0x80040e21]

Field 'XrefID' - The value violated the data source schema constraint for the field.

Context:
select *
from t_xref
where Client in
    (
        select ea_guid
        from t_object
        where GenFile like 'C:\[Redacted]\Documents\Sparx Upload Test 30-07-26b\%'
    )
union
select *
from t_xref
where Client in
   (
    select ea_guid
    from t_connector
    where
        Start_Object_ID in
        (
            select Object_ID
            from t_object
            where GenFile like 'C:\[Redacted]\Documents\Sparx Upload Test 30-07-26b\%'
        )
    or
       End_Object_ID in
       (
            select Object_ID
            from t_object
            where GenFile like 'C:\[Redacted]\Documents\Sparx Upload Test 30-07-26b\%'
       )
    )
44
General Board / Re: How to switch user using v17.2.1721
« Last post by ppeeters on August 21, 2026, 05:02:08 pm »
You could also try running the following command from a command line or PowerShell:
Code: [Select]
runas /user:DOMAIN\UserName "C:\Path\App.exe"
Enterprise policies generally prohibit from having multiple accounts on the same corporate device. It just so happens that I have such an local admin account so I can test this.
It is indeed possible to be authenticated using that principal and then assigned the user to an Administrator group. By the way, the last action is only possible if you still can authenticate as an admin. I could do that using Sparx EA 17.0 which still allow to switch user.
The majority of our users do not have such a dual AD account hence cannot use that trick.

Another possibility is to disable Windows authentication for the repository while keeping OpenID. The OpenID authentication workflow still gives the opportunity to cancel it and to fall back using the user/pass authentication method.

Those workaround look like kludges. In the end, it boils down to the ability to support user roles at the repository level. Once authenticated, you should be able to select the role you want to use for a given work session.
45
General Board / Re: How to switch user using v17.2.1721
« Last post by Geert Bellekens on August 19, 2026, 11:56:18 pm »
However I do not understand why this feature is removed.

I'm guessing it's removed because of the big security vulnerabilities scare.
Apparently, after Sparx dismissed the direct reports, the vulnerabilities where publically published.
This apparently lead to a bit of a panic at Sparx to quickly fix all security related issues.
See also the disablement of Repository.Execute(), and the new restrictions on Repository.SQLQuery (none of which was announced in the release notes)

Geert
46
General Board / Re: How to switch user using v17.2.1721
« Last post by PeterHeintz on August 19, 2026, 05:31:38 pm »
Hi,
no I have not tried this but it will also not work for us currently.
We have for each for each user a local admin account with password (nor know by our ADS). Funnily in the user manual of V17.2 this still reommended to have but how to login is now unclear. I will try if a EA shortcut file can be used if I have time to.
However I do not understand why this feature is removed.
47
General Board / DataType in Code Generation Missing
« Last post by EAButNotForGames on August 19, 2026, 04:52:40 pm »
Question:
When generating Code from a Model, is there an option to also generate code for elements with the type: DataType?
Or even broader Question:
Can you generate Code from elements, who don't have the Metaclass Class, Interface and Enumeration?
48
General Board / Re: UC Scenarios flushed at import
« Last post by elr on August 18, 2026, 10:41:56 pm »
Hi Eve,

No, UC have been detailed in a local model under the same EA instance (because the target model is not always available...)

It seems the bug is coming from the size of "Basic Path"  field. Once renamed in french "Chemin de Base" it generates a "...has been truncated" warning that seems to break links to scenario steps content...

Should it be reported as a bug ?


Eric
49
General Board / Re: How to switch user using v17.2.1721
« Last post by Modesto Vega on August 18, 2026, 06:15:30 pm »
Hello,

Since the ability to switch user has been removed from 17.2.1721 ('Login as another user' ), how can I switch to an administrative user if the cloud repository is configured for Windows and OpenID authentication ?
On window, it automatically authenticates using the windows user and then I'm stuck.
Hello Peter, have you tried running Sparx EA as a different user. To run as different user shift and right click on the application. How to achieve this differs depending on the version of Windows you are running and the policies applied to your laptop.

You could also try running the following command from a command line or PowerShell:
Code: [Select]
runas /user:DOMAIN\UserName "C:\Path\App.exe"
50
General Board / Re: UC Scenarios flushed at import
« Last post by Eve on August 17, 2026, 03:44:20 pm »
Just to clarify, are you exporting the model with the detailed scenarios before doing the import?

The scenarios should be present in the native xml, xmi 1.1 or xmi 2.1 (the only formats that are expected to round trip everything) and if they aren't they would be removed when synchronizing with any element found in the imported file.
Pages: 1 ... 3 4 [5] 6 7 ... 10