Skip to content

Commit

Permalink
Save all Identifiables in AASX
Browse files Browse the repository at this point in the history
Currently the `write_aas()` of AASXWriter was used, which saves only AAS and related Submodels. We use now `write_all_aas_objects()` which saves all Identifiables from a given object store.

Closes #30
  • Loading branch information
zrgt committed May 16, 2024
1 parent 26dc2d4 commit daa0bc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions aas_editor/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,8 @@ def write(self, file: str = None):

elif fileType == ".aasx":
with AASXWriter(self.file.as_posix()) as writer:
aas_ids = []
for obj in self.objStore:
if isinstance(obj, AssetAdministrationShell):
aas_ids.append(obj.id)
writer.write_aas(aas_ids, self.objStore, self.fileStore, write_json=self.writeJsonInAasx)
# Create OPC/AASX core properties
cp = pyecma376_2.OPCCoreProperties()
cp.created = datetime.now()
from aas_editor.settings.app_settings import AAS_CREATOR
cp.creator = AAS_CREATOR
writer.write_core_properties(cp)
writer.write_all_aas_objects("/aasx/data.{}".format("json" if self.writeJsonInAasx else "xml"),
self.objStore, self.fileStore, self.writeJsonInAasx)
else:
raise TypeError("Wrong file type:", self.file.suffix)

Expand Down
2 changes: 1 addition & 1 deletion aas_editor/settings/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
REPORT_ERROR_LINK = "https://github.com/rwth-iat/aas_manager/issues"
APPLICATION_LINK = "https://github.com/rwth-iat/aas_manager"
IAT = "IAT"
VERSION = "0.3.9"
VERSION = "0.3.10"
AAS_METAMODEL_VERSION = "3.0"
LICENSE = "GNU General Public License v3.0"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "aas_editor"
version = "v0.3.9"
version = "v0.3.10"
dependencies = [
"PyQt6",
"qtawesome>=1.2.3",
Expand Down

0 comments on commit daa0bc4

Please sign in to comment.