Attributs acess of an imported Mesh through a python script

Following .unv mesh direct importation and groups creation into Smesh, i try to list edges groups with a simple python script through the console. But I always have and attribute error said that or SALOMEGUI_Swig doesn’t have attribute getGroupsOfEdges either GetGroup. Is there any another parent of the getGroupOfEdges attribute? Or do i made a execution context mistake with my script?

please share you study case and script such that we can see if we reproduce the issue and escalate it to our developers team.

Thanks for your return Nabil.
It’s about something from python beginner level.
After imported and grouping my mesh and BC edges.
I would like to access to my mesh attributs (list of edges groups, etc…) from a python script from the consol.
I have found ListOfEdges and ListOfGroups etc… using Dir() function into SMESH.
But i can’t find way to return a printable version of attributs from my mesh. Something that look like :

import salome
import SMESH

mygpList = mesh.ListOfGroups.

<class ‘SMESH.ListOfGroups’>

maybe i am missing something but


where Mesh_1 is your mesh? you have also Mesh_1.GetGroups()

Thanks for your return Franco.ota.
Effectively It’s something obvious.
But when i type in the console something like Compound_Mesh.GetGroupNames() OR Compound_Mesh.GetGroups() (following my study above), the error returned is Compound_Mesh not defined.
In fact i just need to know how to call for the first time my imported Mesh.
The problem would be different if i was compute my mesh after create a geometry, but my Compound_Mesh come from another soft through .unv file format. There is no historical in Salome.
After i know how to explore python library with Dir() command.
Perhaps a problem of execution context, i use version 2023 from Simulease under windows.