basyx-python-sdk
basyx-python-sdk copied to clipboard
adapter.aasx: Thumbnail not integrated into AASXReader / AASXWrite
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_fileschecks Submodels for files, but not the AssetAdministrationShell.- Therefore, the thumbnail is not automatically discovered, or extracted.
write_all_aas_objectsdoes not store the thumbnail into the AASX package unless handled manually.
Suggestions
- Extend
_collect_supplementary_filesto checkAssetAdministrationShellobjects for associated thumbnail files. - Update
write_all_aas_objectsto automatically include thumbnail files when writing the AASX package.
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?