-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
type:documentationWiki, help or in code attributesWiki, help or in code attributes
Description
Description:
- When pushing a load type that is not implemented an error message regarding Null property is presented to the user.
- It is (for the user) unclear why that error arises.
- It would simplify if an error stating that the load type is not implemented for pushing to Lusas.
How to fix:
- When the method determines the load type it could default to a message telling the user if it is not implemented.
Add this line in the end of the loadType case checks.
Engine.Base.Compute.RecordError("Load type is not supported in the Lusas_Toolkit.");
Question is if it should be worded as not supported or not implemented.
Lusas_Toolkit/Lusas_Adapter/CRUD/Create/Create.cs
Lines 112 to 140 in a680c5b
| switch (loadType) | |
| { | |
| case "BH.oM.Structure.Loads.PointLoad": | |
| success = CreateCollection(objects as IEnumerable<PointLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.GravityLoad": | |
| success = CreateCollection(objects as IEnumerable<GravityLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.BarUniformlyDistributedLoad": | |
| success = CreateCollection(objects as IEnumerable<BarUniformlyDistributedLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.AreaUniformlyDistributedLoad": | |
| success = CreateCollection(objects as IEnumerable<AreaUniformlyDistributedLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.BarUniformTemperatureLoad": | |
| success = CreateCollection(objects as IEnumerable<BarUniformTemperatureLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.AreaUniformTemperatureLoad": | |
| success = CreateCollection(objects as IEnumerable<AreaUniformTemperatureLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.PointDisplacement": | |
| success = CreateCollection(objects as IEnumerable<PointDisplacement>); | |
| break; | |
| case "BH.oM.Structure.Loads.BarPointLoad": | |
| success = CreateCollection(objects as IEnumerable<BarPointLoad>); | |
| break; | |
| case "BH.oM.Structure.Loads.BarVaryingDistributedLoad": | |
| success = CreateCollection(objects as IEnumerable<BarVaryingDistributedLoad>); | |
| break; |
Test script:
Additional info:
The load types (BHoM Type) not supported according to the wiki on Lusas_Toolkit: PointAcceleration, PointVelocity, BarPrestressLoad, ContourLoad and GeometricalLineLoad.
Metadata
Metadata
Assignees
Labels
type:documentationWiki, help or in code attributesWiki, help or in code attributes