Hello
I have a positive results.What I have done is as below:
-Open assembly manually having only one part
- Use code to get current mdl, rename it with suffix as _1 , save mdl, close window and do erase not displayed.
- Use code to retrive new (first renamed) mdl, rename it with suffix as _2 , save mdl, close window and do erase not displayed.
Manually checked and able to open second renamed assembly.
********************************************************************************************
ProError status = PRO_TK_GENERAL_ERROR;
//get current mdl
ProMdl objMdl;
status = ProMdlCurrentGet(&objMdl);
//Get name
ProName objName;
status = ProMdlNameGet(objMdl,objName);
//prepare first new name
ProName objNameFirst;
ProWstringCopy(objName,objNameFirst,PRO_VALUE_UNUSED);
ProWstringConcatenate(L"_1",objNameFirst,PRO_VALUE_UNUSED);
//first new name set
status = ProMdlnameRename(objMdl,objNameFirst);
//save model
status = ProMdlSave(objMdl);
//close current window
status = ProWindowCurrentClose();
//erase after first rename
status = ProMdlEraseAll(objMdl);
//Load first renamed model
ProMdl objMdlAfterFirst;
status = ProMdlnameRetrieve(objNameFirst,PRO_MDLFILE_ASSEMBLY,&objMdlAfterFirst);
//prepare second new name
ProName objNameSecond;
ProWstringCopy(objNameFirst,objNameSecond,PRO_VALUE_UNUSED);
ProWstringConcatenate(L"_2",objNameSecond,PRO_VALUE_UNUSED);
//second new name set
status = ProMdlnameRename(objMdlAfterFirst,objNameSecond);
//save model second rename
status = ProMdlSave(objMdlAfterFirst);
//close current window
status = ProWindowCurrentClose();
//erase after second rename
status = ProMdlEraseAll(objMdlAfterFirst);
return status;
********************************************************************************************
Thanks and Regards
Ketan