SWDuplicate is a small add-in for SW. With this add-in its possible to insert copy of the part/component in the assembly session without ever leaving ASSEMBLY. http://www.programming.e-cnc.com Right Context Menu named (RCM): "E-CNC Create a non-derived duplicate part..." has been added to the RCM feature manager and in the RCM which is showing up on selecting FACE, CURVES or BODYFEATURE of the selected part/component. Everything was working fine except after I load/unload my dll more than twice I was getting SW crash on closing. So that bothered me for 2 days and finally I got it. For "C" programers I hope the next will be understandable.? add void addMenus(){ as usual: ============================== status = Frame->AddMenuPopupItem ( DocType, SelectType, Item, CallbackFcnAndModule, CustomNames, Unused, &retval ) } in the void removeMenus(){ function : ===================================== status = SldWorks->RemoveMenuPopupItem ( DocType, SelectType, Item, CallbackFcnAndModule, CustomNames, Unused, &retval ) UnLoadAddIn() } UnLoadAddIn(); ============== void UnLoadAddIn() { HRESULT status; long retval; BSTR filename = SysAllocString(OLESTR("userdll.dll")); status = m_pSldWorks->UnloadAddIn (filename, &retval); return; } and at the end, in the DllMain function: ======================================== BOOL WINAPI DllMain (HANDLE hModule,DWORD fdwreason, LPVOID lpReserved) { switch (fdwreason){ case DLL_PROCESS_ATTACH: break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: if (!lpReserved) removeMenus(); <----- two days lost \\ OK OK if you already knew this, I am sorry. \\ if you don't, this may save you two days I've lost :) \\ I found the next tiny text in the win32sdk.hlp \\ If fdwReason is DLL_PROCESS_DETACH, lpvReserved is NULL if \\ DllEntryPoint has been called by using FreeLibrary and \\ non-NULL if DllEntryPoint has been called during process \\ termination. break; } return 1; //TRUE } Why all the above: If we do not use this SW crash at closing. Why? DLL_PROCESS_DETACH: has been send to the DLL every time we unload our DLL but as well as when we close SW,this time not by ADDIN manager but by the sldworks.exe FreeLibrary so we need to unload dll after we remove popupitem -that means we do not need dll any more so we don't want SW to attempt again to release dll so we release dll right after removemenu action coz coz coz it is causing crashhhhh jeheha = solved, well at least on my and customer system Mike