Author Topic: How to copy the referenced content together with the copy function  (Read 2544 times)

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
How to copy the reference relationship content of copied content from the current Enterprise Architect file to another Enterprise Architect file together

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #1 on: April 18, 2024, 03:57:42 pm »
What exactly do you mean? Can you explain in a bit more detail?

Geert

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #2 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #3 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

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #4 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #5 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

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #6 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #7 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

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #8 on: April 23, 2024, 05:34:55 pm »
Regarding the issue of copying references in Enterprise Architect, do you have any other solutions?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #9 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

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #10 on: April 23, 2024, 06:23:01 pm »
Are you referring to developing a program yourself to perform this operation?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #11 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

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #12 on: April 23, 2024, 07:39:36 pm »
Thank you very much.

Fantasy.Fan

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How to copy the referenced content together with the copy function
« Reply #13 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13224
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to copy the referenced content together with the copy function
« Reply #14 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
If you don't have scripting experience you might want to consider hiring expert help.

Geert