Creo secondary development now want to change the name of the assembly and all children in a, in the name of the assembly and his wife a suffix number
(for example, formerly known as: aig31 - m8 - l12. PRT. 1
Here is amended as: aig31 m8 - l12 _001 . PRT.
The suffix 001 here, depending on the model generation number change, so is a variable)
Use the ProMdlRename function, but found only modify a single element name (assembly can only modify the name of the assembly, and it had a name can't modify together)
And using the macro function method, but found that due to want to add a suffix is a variable, try to found under the macro variables in invalid
Want to help you a great god, and the what function can also change the name of the assembly and all child parts inside?
Whether can use the variable in the macro function, how to do, thank you very much!
Below is the macro function to try:
StrMacro="to Activate ` assyrename ` ` OpenBtn `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` assyrename ` ` GenNamesBtn `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Update ` assyrename ` ` Input_suffix ` ` _0 `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Input ` assyrename ` ` Input_suffix ` ` _0 `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` assyrename ` ` SelAllPush `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_saveas ` ` OK `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Update ` file_saveas ` ` Inputname ` ` AEG01-4460-1 _yhd `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_saveas ` ` ph_list. The Filelist ` 1 ` tuzhecaozhuo `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_saveas ` ` desktop_pb `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Command ` ProCmdModelSaveAs `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Close ` main_dlg_cur ` ` appl_casc `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_open ` ` Ph_list. The Filelist ` 1 ` aeg01-4460-1. The asm `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_open ` ` Ph_list. The Filelist ` 1 ` tuzhe `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="to Activate ` file_open ` ` desktop_pb `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
StrMacro="~ Command ` ProCmdModelOpen `;";
ProStringToWstring (w_macro, strMacro GetBuffer ());
ProMacroLoad (w_macro);
ProMacroExecute ();