Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Fantasy.Fan on April 18, 2024, 03:53:40 pm

Title: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 18, 2024, 03:53:40 pm
How to copy the reference relationship content of copied content from the current Enterprise Architect file to another Enterprise Architect file together
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 18, 2024, 03:57:42 pm
What exactly do you mean? Can you explain in a bit more detail?

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 11:46:47 am
When using the replication feature in Enterprise Architect to copy a folder that contains, for example, an architecture diagram and its referenced content, how can you ensure that the referenced content is also copied along with the diagram to another folder?
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 02:40:02 pm
You can't. If you copy a package, only the content of the package is copied, not the contents of other packages, regardless whether or not they are used on a diagram.

You can pretty easily duplicate everything that is on a diagram by Ctrl-A, Ctrl-C, Ctrl-Shift-V

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 03:55:51 pm
Thank you very much for your answer. I have another question to ask you. Why does the size of the merged file become larger than the original sizes of the two files after copying the contents of one Enterprise Architect to another one? Do you have any solutions for this?
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 05:00:01 pm
EA files are actually databases.
They generally grow to provide space in the tables to add new rows, but in most cases they don't really shrink if you delete rows.

I wouldn't worry about the file size at all.
If you are using .eap(x) there is a function to shrink the database. I'm not sure if .feap or .qea have something similar.

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 05:10:44 pm
Thank you. When using Lemon Tree to compare and merge files, if the file size exceeds about 1GB, the comparison will fail. Do you have a better solution for this?
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 05:12:11 pm
To get the smalles filesize possible you could create a new file, and then to a project transfer to it.

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 05:34:55 pm
Regarding the issue of copying references in Enterprise Architect, do you have any other solutions?
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 06:11:09 pm
Regarding the issue of copying references in Enterprise Architect, do you have any other solutions?
Depends on what you need exactly.
If you want to duplicate a package, plus every external element shown on one of the diagrams in that package. Then I guess you are better off writing a little script.

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 06:23:01 pm
Are you referring to developing a program yourself to perform this operation?
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 06:56:13 pm
Are you referring to developing a program yourself to perform this operation?

A "program" is maybe a bit much, but you can write your own scripts in EA; much like the way you can automate stuff in Excel using VBA.

You seem to have a very specific requirement that can't be done in a simple way using the standard features.
Shouldn't be too complicated to do it using a script though.

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 07:39:36 pm
Thank you very much.
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 23, 2024, 08:41:39 pm
Could you please help me provide a solution approach? I don't have any experience in this area.
Title: Re: How to copy the referenced content together with the copy function
Post by: Geert Bellekens on April 23, 2024, 09:48:32 pm
Could you please help me provide a solution approach? I don't have any experience in this area.

I can only point to my scripting library for inspiration: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library (https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library)
If you don't have scripting experience you might want to consider hiring expert help.

Geert
Title: Re: How to copy the referenced content together with the copy function
Post by: Fantasy.Fan on April 26, 2024, 12:59:11 pm
The Enterprise Architect Specialized Manage Add-ins plugin is reporting an error - Missing (0x800401f3). Do you know what might be causing this issue?