Archi Forum

Archi => General Archi Discussion => Topic started by: ievgenii on July 01, 2023, 01:33:26 AM

Title: Archi file with images
Post by: ievgenii on July 01, 2023, 01:33:26 AM
Can someone remind me what impacts saved *.archimate file format to be zipped file (images folder + model.xml) or unzipped archimate file (could be directly open by text editor without unzipping)?

Obviously it depends on presence of custom images in the model.

Are there some settings or it depends on how image is used: custom / specialization?

Or in latest versions (after integration of specialization), the model with images is always saved as shingle archived file?
Title: Re: Archi file with images
Post by: Phil Beauvoir on July 01, 2023, 08:10:21 AM
Hi, if the model references any image file it is saved in zip format. So that could be Canvas with image or specialization, or custom.
Title: Re: Archi file with images
Post by: ievgenii on July 02, 2023, 19:32:27 PM
Thanks for the answer.
Title: Re: Archi file with images
Post by: jsimoncello on July 13, 2023, 13:07:27 PM
Hi, well I am not sure how I managed to do that but I have a model which references a image (specialization) and which is still non-zipped
Extract from my archimate file (I am using 5.0.2) :
  <profile name="hyperlink" id="id-1892c939c9a94c4b970fdc2dffedeb0d" imagePath="images/_AUxi0CFpEe68frLk3qI-jA.png" conceptType="Representation"/>
</archimate:model>
I have tried adding other images as specialization as images on canvas but they still go in the images folder and the model is still non-zipped.
I have attached a new sample model :
Title: Re: Archi file with images
Post by: Phil Beauvoir on July 13, 2023, 13:14:42 PM
The non-zip format is used if the .archimate file is in a git repository.  This was done to support coArchi 2 (WIP). This is undocumented and unsupported.
Title: Re: Archi file with images
Post by: jsimoncello on July 13, 2023, 13:26:15 PM
ok I see, actually there was an empty .git in this folder, don't know where it comes from.
Title: Re: Archi file with images
Post by: Phil Beauvoir on July 13, 2023, 13:29:24 PM
Quote from: jsimoncello on July 13, 2023, 13:26:15 PMok I see, actually there was an empty .git in this folder, don't know where it comes from.


If you delete the .git folder and resave the model it will be zipped.

See https://github.com/archimatetool/archi/blob/ad679a46454209b318e3d9479d0e37707ccb5fd7/com.archimatetool.editor/src/com/archimatetool/editor/model/impl/ArchiveManager.java#L77-L85
Title: Re: Archi file with images
Post by: jsimoncello on July 13, 2023, 13:33:07 PM
Thanks, that's good to know !
Title: Re: Archi file with images
Post by: ievgenii on February 21, 2024, 02:22:14 AM
Quote from: Phil Beauvoir on July 13, 2023, 13:14:42 PMThe non-zip format is used if the .archimate file is in a git repository. This was done to support coArchi 2 (WIP). This is undocumented and unsupported.
Actually, that is good "feature". In some cases having the images unzipped gives more flexibility. For example, similar viewing (or even editing!) the pages/images model tree directly at the GitHub, overview/update of images in local folders might be beneficial.