it' possible to renaming both part or assembly and its drawing at the same time ?
What you mean exactly 'at the same time'?
They're two different files so you have to rename one at time (OS requirement, not SW).
But you can keep the connection when renaming by right-click on file name and rename using solidworks tool for both files.
Hope it helps.
For just one part it is pretty easy to do a Pack and Go, Select/Replace, and then replace the Save to Name text with the new part number/drawing number you want to give it.
If you need to rename multiple files through code while maintaining references, the Document Manager is a great option. There is a decent starter toolkit available here...
SolidAPI: SOLIDWORKS Document Manager API Toolkit
Retrieving data ...