Inspect Element returns Integer for some parameters

I’m working on Revit to Structural analysis workflow that involves sorting structural elements by Structural Role. The Inspect Element component returns Structural Role information, but does so in the form of an integer. I have figured out which integer corresponds to which structural role, but it required some trial and error. Hovering over the output shows that the component stores the structural role as a string but does not output it. How can I retrieve ‘Structural Role’ in string form? I want to know because there are other parameters that also output integers.
Thanks.

Hi Thomas, That is an Revit Enumeration for the
AnalyticalStructuralRole (only in 2023+). AnalyticalStructuralRole Enumeration

Try this python script to the Name associated with the Index

Thank you for the direction, Japhy.
I did not think to check the RevitAPI Documentation.
How can the preview show the string but the output shows the index? It is not a big problem since it appears to be easy to retrieve the string.