Page 1 of 1

Rename From Feature Manager

Posted: Tue Jul 30, 2024 10:10 am
by senuba
Hello, I want to rename using a SolidWorks macro in the feature manager. I've enabled renaming in the settings section. I have a macro that gives me a random code. When I click on this macro while a part is open, I want it to rename the part and save it. Of course, when I say save, the part name in the folder will also change. Normally, I click on the part name in the feature manager, press F2, paste the code given by the macro, and save by pressing Ctrl+S. I only need the code part that will change the part name without pressing F2. I would be very grateful if you could provide a solution and share the code. (I tried the "swRootComp.GetChildren" code, but it only changes in the feature manager, not in the folder.)