Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
added error bubble for duplicate GlobalAssetIds
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink authored and martafullen committed Feb 7, 2024
1 parent db81ba3 commit 09c9eb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/AasxPackageLogic/DispEditHelperEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ public void DisplayOrEditAasEntityAssetInformation(
"found on its name plate. " +
"This attribute is required as soon as the AAS is exchanged via partners in " +
"the life cycle of the asset.",
severityLevel: HintCheck.Severity.High),
new HintCheck(
() =>
{
int count = 0;
foreach(var aas in env.AssetAdministrationShells)
{
if(aas.AssetInformation.GlobalAssetId == asset.GlobalAssetId)
count++;
}
return (count>=2?true:false);
},
"It is not allowed to have duplicate GlobalAssetIds in the same file. This will break functionality and we strongly encoure to make the Id unique!",
severityLevel: HintCheck.Severity.High)
});

Expand Down

0 comments on commit 09c9eb1

Please sign in to comment.