Adding Section/LabelledSection/ResultPoints with API [SOLVED]

I was wondering if it was possible to add section result with API as seen in picture below:

I was also interested in adding labelledsection & resultpoints to model.
I have stored this info in a list as can be seen in picture below.

This should work the same as AddElements?
As AddLabelledSection method is set to public the following code should work?

model.AddLabelledSection(labelledsections);

Edit:

I have tried using:

var feaNodes = ReinforcementDesignFEM.GetFeaNodes();
var disp = ReinforcementDesignFEM.GetResults();

But for disp row I get the following error:

System.ApplicationException: ‘Could not identify all result types of the file C:\Users\kpn\VS local\FemDesign.KPN\RetainingWall\results\NodalDisplacementsLoadCombination.csv.’

When I look in path C:\Users\kpn\VS local\FemDesign.KPN\RetainingWall\results

It looks like NodalDisplacementsLoadCombination.csv is correct (Compared with manual created result with List tables)

If I try to change result too:

var disp = ReinforcementDesignFEM.GetResults<ShellDisplacement>();

No error accrues but I do not get the same number of displacements compared with NodalDisplacement and location for result gets restricted on node placement / mesh size. Therefore, I think it would be better to use results from ResultPoints if this is possible.

You can use the method as you described or you can use a more generic, which work for most of the FEM-Design element such as:

model.AddElement(labelledsections);
model.AddElement(resultPoints);

We do not have access to the “Sections” as per the user interface but you can use the labelled section which should be equivalent.

For the results, you should specify the type in the method.

var results = femDesign.GetResults<Results.NodalDisplacement>();

if not, can you provide an .str or .struxml file so that I can try to replica the error?

1 Like

Thank you Marco, just assining labelledsections/resultpoints with
<IStructureElement> and adding all elements with model.AddElement(); works perfekt!

Also found this for extracting info from my resultpoints:

var resultatPoints = ReinforcementDesignFEM.GetResultsOnPoints<Results.ShellDisplacement>(rp_result, unitResults);

What I find intressting is that GetResultsOnPoints requires <CmdResultPoint> but give info for both ‘’ and ‘’ resultpoints.

var disp = ReinforcementDesignFEM.GetResults<Results.NodalDisplacement>();

Still gives the same error but with resultpoints working is not mandatory for this project.
Uploaded .str / .struxml in case you were curious replicating the error.
model_Nodedisp_error.str (829.3 KB)
model_Nodedisp_error.struxml (101.7 KB)

Hi @KPN

This is how I add the elements to the model. AddElements() works pretty much with any type of objects!

var model = Model.DeserializeFromFilePath(filePath);

var element = model.Entities.Slabs[0];

var point = new FemDesign.Geometry.Point3d(2, 2, 0);
var resultPoints = new FemDesign.AuxiliaryResults.ResultPoint(point, element);
model.AddElements(resultPoints);


var labelSection = new LabelledSection("LS",
          new FemDesign.Geometry.Point3d(0.1, 0, 0),
          new FemDesign.Geometry.Point3d(0.1, 1, 0));

model.AddElements(labelSection);

You are right! The API seems broken for this type of result! We will fix ASAP!
I have just opened a ticket on GitHub

1 Like

ehi @KPN

Nodal displacement results can be parsed again :slight_smile:
Thanks for spotting the bug :bug:

1 Like