Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Geert Bellekens

Pages: 1 ... 3 4 [5] 6 7 ... 818
This is the script (VBScript) I use.
The connectionstring is copied from an encrypted EA shortcut file.
This fully automatically transfers our projects from SQL Server to .eap files.

Code: [Select]
const logPath =    "G:\Projects\80 Enterprise Architect\Output\Backups\LogFile\"
const backupPath = "G:\Projects\80 Enterprise Architect\Output\Backups\"

const EADEVconnectionString = "DBType=1;ConnectEx=6' lgOUNphsdL9V'v^;KJl*`XYta*2{S3%Qoj=E*7%u&LT# R7w(E9p%?Yajszqn#87d3Q$+NX3Gn<SdG!W|^)AJ[XQ!Z{mY""muLhLVnIW'Q6t,3Sq4'(fA6-GI|GK1DY8[iwAvtW2I3XZ:ydO`97W70[m2ieu=l@+*7{=HsGsqdw=^aFD)Wy-^3{;cfgVxov2az:7mC0T5^<IR""=:<<<!$Ke10\fzF^*:iJ-R,U?ct^i; V9_fpj5,maX64Xb\_]1TfQIX{n()$jv\2@`g'ndbnK8%FCWW)#vEEj`"

sub main
dim repository
set repository = CreateObject("EA.Repository")
'backup DEV
backupRepository repository, EADEVconnectionString, backupPath, logPath, "EA DEV"
'close EA
'tell user we have finished
msgbox "Finished backups"
end sub

function backupRepository (repository, sourceModel, backupPath, logPath, modelName)
Dim currentDate
currentdate = (Year(Date) & (Right(String(2,"0") & Month(Date), 2)) & (Right(String(2,"0") & Day(Date), 2)))  'yyyymmdd'

dim projectInterface
dim logFilePath
logFilePath = logPath & CurrentDate & " " & modelName & " (back-up).log"

'delete logfile if exists
deleteFile logFilePath

dim targetFilePath
targetFilePath = backupPath & CurrentDate & " " & modelName & " (back-up).eap"

'delete targetfile if exists
deleteFile targetFilePath

'get project interface
set projectInterface = repository.GetProjectInterface()
'execute project transfer
projectInterface.ProjectTransfer sourceModel, targetFilePath, logFilePath

end function

function deleteFile (filePath)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(filePath) then
fso.DeleteFile filePath
end if
end function


I'll try to adapt this to check if it also works to transfer from .eap to .qea


General Board / Re: What happened to announcing releases?
« on: January 19, 2023, 04:30:26 pm »

General Board / What happened to announcing releases?
« on: January 19, 2023, 02:01:15 am »
The last two releases (16.1.1622 and 16.1.1623) have not been announced on the Latest News board:,22.0.html

@Sparks, did you forget, or is there a new communication strategy for releases?


I'll have a look with the newest version, but I use this function on older versions since years.
It always worked perfectly fine without any dialogs showing.
In our code, we first delete the log file as well.

It might be a bug though.

Have you tried by passing literal strings to the function?


Yes, it's possible but the target file should not exist yet.

That's different from the GUI, where the target file should exist.


Try passing a type as second parameter to the AddNew operation. An empty string is not a valid type.


You can bet on that xD


P.S. When you issue a query the Weight actually is shown as a Real number. The example model has a few with weight 1.00 but most being 0.00
Ah, I can now think of a scenario where that might have gone wrong.

- Get the weight value as string "1.00"
- Try to store the same value as Real, messing up the decimal point/comma notation, and end up storing the value 100 instead.
- Get the weight value as string "100.00"
- Try to store the same value as Real, messing up the decimal point/comma notation, and end up storing the value 10000 instead.
- Rinse and repeat

And that indeed checks out with the actual values found. Most of them are round numbers like 5000000000 or 2000000


Did the addNew operation fail for some reason? (because you passed an empty string as the type)

It might have failed silently. IIRC there is a getlatestError thing somewhere in like Repository. It might help, but I'm not sure.


Bugs and Issues / Re: Mini diagram images in generated documents
« on: January 18, 2023, 09:40:45 pm »
I'm not seeing that. I have a bunch of other issues with document generation, but not that.


Well, at least one additional info. The current statement about weight in my Inside is "does not seem to be mapped in the GUI".

Yeah, you could change that into "is named wrong and should really be named pos to be consistent with t_attribute etc..."


General Board / Re: Automatically change 'Status' to "proposed' on change
« on: January 18, 2023, 08:37:04 pm »
That's correct there is no "out-of-the-box" solution.

To supplement what Geert as an alternative to an add-in which requires an installer you could have a look at Model Add-ins.

I have successfully used these to respond to EA_OnContextItemModified to monitor / update element properties.

Hi Phil,

Model-addins was actually my first suggestion :)


General Board / Re: Automatically change 'Status' to "proposed' on change
« on: January 18, 2023, 07:58:51 pm »
Yes, but you'll need to write some add-in that runs in the EA_OnContextItemModified

Options are:
- Use a Model Addin:
- Write an EA-Matic script:
- Write a full blown add-in

I would use an EA-Matic script (but I guess I'm a bit biased)


Hi Geert,
Might it have something to do with the difference between BPMN 1.x and BPMN 2.0?  I think BPMN 1 defines the Action and BPMN 2 defines a Call Activity, but I'm no expert.

Thanks Paolo,

No, in both cases it's BPMN 2.0


Will the consitency check repair them?

No, I run those regularly, and they haven't touched the weight values.


General Board / Re: Changing the Icon of an element in Project Browser
« on: January 18, 2023, 03:17:16 am »
If you set the icon on the stereotype, it will show in both the toolbox as the project browser.


Pages: 1 ... 3 4 [5] 6 7 ... 818