as shown in the video, using API2.12.13 and RFEM6.12.0013, I create a member with a parametric cross-section FLAT 440/80/H, but the cross-sectional properties are missing and the cross-section is not valid.
IMessage message = new RFEMApi2.StructureCore.CrossSection()
{
No = cs.Number,
Name = cs.Name,
Material = cs.Number_material,
};
I then type in the same string for the name of the cross-section, and the GUI assigns the cross-sectional properties.
How can I trigger the assigning of the cross-sectional properties, when creating members using API2?
To trigger the cross-sectional properties correctly when creating the member, here's the right code snippet:
var objectsToCreate = new List<Google.Protobuf.IMessage>
{
new Rfem.StructureCore.Material
{
No = 1,
Name = "S355"
},
new Rfem.StructureCore.CrossSection
{
No = 1,
Material = 1,
Type = Rfem.StructureCore.CrossSection.Types.Type.ParametricBars,
Name = "FLAT 0.440/0.080/H"
}
};
await rfemApp.create_object_list(objectsToCreate);