Skip to content

Commit 985805c

Browse files
committed
Add error when using existing Loadcase and not both ID and name match.
1 parent fe77b03 commit 985805c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lusas_Adapter/CRUD/Create/Loads/Loadcase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,18 @@ private IFLoadcase CreateLoadcase(Loadcase loadcase)
5151
if (d_LusasData.existsLoadset(loadcase.Name))
5252
{
5353
lusasLoadcase = (IFLoadcase)d_LusasData.getLoadset(loadcase.Name);
54+
if (lusasLoadcase.getID() != loadcase.Number)
55+
{
56+
Compute.RecordError($"A loadcase with the name {loadcase.Name} already exists but the number does not match with the loadcase being pushed./nMake sure you are using a unique name and number.");
57+
};
5458
}
5559
if (d_LusasData.existsLoadset(loadcase.Number))
5660
{
5761
lusasLoadcase = (IFLoadcase)d_LusasData.getLoadset(loadcase.Number);
62+
if (lusasLoadcase.getName() != loadcase.Name)
63+
{
64+
Compute.RecordError($"A loadcase with the number {loadcase.Number} already exists but the name does not match with the loadcase being pushed./nMake sure you are using a unique name and number.");
65+
};
5866
}
5967
else
6068
{

0 commit comments

Comments
 (0)