Get Side Sets names in python

Dear all,
I’m using the following code (parts are shown below) for group names and group ids when exporting the mesh:

names_ids = cubit.group_names_ids()
length_names_ids = len(names_ids)

for pair in names_ids:
i += 1
print(“Group Name:” + pair[0])
outfile.write("group " +str(pair[0] + " add hex in volume "))

volume_ids=cubit.get_group_volumes(pair[1])

In a similar way I also plan to export information about Side Sets.
Is there a possibility to have access to Side Set names and id, similar to groups as shown above?
I have checked the User Documentation but couldn’t find a solution.
Many thanks
BR Stefan

Hello @Stefan_R,
yes there is a way. You can use get_sideset_id_list() to get the sideset ids and get_exodus_entity_name() to query the names.

#!cubit
reset
create brick x 1
sideset 1 add surface 1
sideset 1 name "test_1"
sideset 2 add surface 2
sideset 2 name "test_2"

#!python
sideset_ids = cubit.get_sideset_id_list()
for id in sideset_ids:
 sideset_name = cubit.get_exodus_entity_name("sideset" , id)
 print(f"Sideset Name: {sideset_name}")
 print(f"Sideset ID: {id}")

Does this work for you?