@Biju.Veedu
The below post are all duplicate post requesting the same thing.
https://forums.autodesk.com/t5/inventor-customization/ilogic-rename-solid-bodies-all-to-select/m-p/1...
https://forums.autodesk.com/t5/inventor-forum/adding-prefix-to-body-name/m-p/10424069
https://forums.autodesk.com/t5/inventor-customization/multi-bodies-auto-rename/m-p/10424080#M125900
Firstly please avoid creating duplicate posts this can be very frustrating for users and will dilute the effectiveness of individual post. Secondly it is better to create one post and link other post that explain your help request. Thirdly posting on solved posts is also not the best practice as user will assume they are solved and will pass over them.
For future post if they involve ilogic please post them here.
https://forums.autodesk.com/t5/inventor-customization/bd-p/120
If possible include the code you are working with/attempted and an explanation of the problem.
The below code is adapted from here on post 20 0f 32
withString = InputBox("Prompt", "Title", "Default Entry")
For Each solid In ThisDoc.Document.ComponentDefinition.SurfaceBodies
Name = solid.Name
myparams = Name.Split("-")
replaceString1 = myparams(0)
'replaceString2 = myparams(1)
Name = Name.Replace(replaceString1, withString)
solid.Name = Name
Next
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan