Access some info to rename all imported bodies

To all,

If I import a parasolid file I get all the bodies with name
Body (1)
Body (2)
etc

If I hoover the mouse over a body I can see an info “box” such as
'Solid Body : AM123456 of Body (2)'
Where AM123456 is the name of the original CAD file or part

I’d like to write a piece of code that loop through all the bodies and rename them. So that (for example) Body (2) becomes AM123456

I cannot seem to find where SimCentre get/store this ‘AM123456’ description. There is nothing in the ‘Information’ or ‘Properties’

Does any know or can help with this?

Thanks
JXB

It sounds like the name has been applied to the body itself. The names "Body(1)", "Body(2)", etc are the names of the features. I posted some code on eng-tips a while back that will look for bodies that have been assigned a name and will rename the feature to match. See the thread below (specifically the post with the timestamp: 30 May 13 17:20

https://www.eng-tips.com/viewthread.cfm?qid=345441

Thanks @NXJournaling
This is exactly what I was looking for. Full mark as usual
It's been a long time since I did a bit of NX coding but 1st idea (for a "macro") for a long time and it was solved in no time. Thanks a lot
Regards
John

Thanks
Regards