eclipse-aaspe / package-explorer

AASX Package Explorer
Other
55 stars 20 forks source link

A reference to a submodel which is located in the same AASX file is saved as external reference #165

Closed WelliSolutions closed 6 months ago

WelliSolutions commented 9 months ago

Describe the bug A reference to a submodel which is located in the same AASX file is saved as external reference.

To Reproduce Steps to reproduce the behavior:

  1. File/New
  2. Workspace/Edit
  3. Add an AAS
  4. In the AAS, select "create new submodel of kind instance"
  5. Add an idShort
  6. Select kind: Instance
  7. File/Save as
  8. Extract the AASX file (treat it as a ZIP file)
  9. Look at the contents of aasx\aasenv-with-no-id\aasenv-with-no-id.aas.xml
  10. Find <type>ExternalReference</type>

Expected behavior It should be saved as a model reference instead. The basyx-python-sdk expects a model reference.

Screenshots image

Desktop (please complete the following information):

Additional context Version v2023-11-17

From the specification (Part 1:Metamodel) chapter 5.3.7.15 Relationship Element Attributes, I conclude that model reference would be correct, so I file the issue here.

WelliSolutions commented 9 months ago

For people working with Package Explorer and products based on the Python Basyx library, we have released a tool that can convert from AASX files made with Package Explorer to a more Basyx compatible format. It works around this bug and bug admin-shell-io/temp-aasx-package-explorer#124.

Find it at https://github.com/LukasBenner/AASFix

juileetikekar commented 7 months ago

Hi @WelliSolutions,

Thank you for raising the issue !!

The issue has been reproduced. We will keep you informed with further updates.