Hi,
I didn't test this, but give it a try...
Family fam = yourFamilySymbol.Family;
if(fam.CanHaveStructuralSection())
{
StructuralSection ss = yourFamilySymbol.GetStructuralSection();
if(ss!=null)
{
// the StructuralSectionAnalysisParams property is a container object
double area = ss.StructuralSectionAnalysisParams.SectionArea;
// and so on...
// depending of StructuralSectionShape, cast StructuralSection into a more specified object
switch(ss.StructuralSectionShape) // or fam.StructuralSectionShape
{
case StructuralSectionShape.RectangleHSS:
StructuralSectionRectangleHSS ssrhss = ss as StructuralSectionRectangleHSS;
double height = ssrhss.height;
// more properties to get...
break;
case StructuralSectionShape.PipeStandard:
StructuralSectionPipeStandard ssps = ss as StructuralSectionPipeStandard;
double diameter = ssps.Diameter;
break;
case StructuralSectionShape.NotDefined:
// you could analyze the geometry, as you wrote
break;
}
}
}
There are many, many classes derived from StructuralSection class, so feel free to explore them in detail and to add them to the switch/case block.
I think the resulting geometry, the curve loops of the sections, can be reproduced by combining the available properties of each derived class, i.e. corner radii, distances, thicknesses and so on.
There is also another approach using REX framework:
https://thebuildingcoder.typepad.com/blog/2015/03/framing-cross-section-analyser-and-rex-in-revit-20...
Revitalizer