basyx-python-sdk icon indicating copy to clipboard operation
basyx-python-sdk copied to clipboard

adapter.aasx: Thumbnail not integrated into AASXReader / AASXWrite

Open thammel opened this issue 1 year ago • 1 comments

Expected behavior

The thumbnail stored in an AASX package should be automatically detected, loaded, and stored by the AASXReader and AASXWrite classes. The thumbnail reference in the AssetAdministrationShell (e.g., in assetInformation.defaultThumbnail) should be handled like any other supplementary file so that no manual processing is required.

Actual behavior

  • The thumbnail can currently only be loaded separately.
  • _collect_supplementary_files checks Submodels for files, but not the AssetAdministrationShell.
  • Therefore, the thumbnail is not automatically discovered, or extracted.
  • write_all_aas_objects does not store the thumbnail into the AASX package unless handled manually.

Suggestions

  • Extend _collect_supplementary_files to check AssetAdministrationShell objects for associated thumbnail files.
  • Update write_all_aas_objects to automatically include thumbnail files when writing the AASX package.

thammel avatar Nov 19 '25 13:11 thammel

As discussed in our Dev-Meeting we should do the following:

  • When reading: If an AASX has a thumbnail, it should be written to the FileStore by default.
  • When writing: If a thumbnail is referenced by an AAS and the corresponding thumbnail is in the FileStore, it should be written to the AASX.

@thammel could you please implement the fix and make a PR?

zrgt avatar Nov 19 '25 14:11 zrgt