Rename From Feature Manager

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
senuba
Posts: 16
Joined: Thu Oct 26, 2023 1:37 am
Answers: 0
x 16
x 5

Rename From Feature Manager

Unread post 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.)
Post Reply