SolidWorks API - Copy part name text
SolidWorks API - Copy part name text
(OP)
Hello,
I am fairly new to SolidWorks and even newer to scripting. Our design department recently came to me wondering if there was a way to create a macro that when they selected a part in the feature tree on the left hand side, and pushed the macro hotkey, if the name could be copied to the clipboard to be pasted in other programs. We have various documents that they need the name of, and right now they are right clicking on the part name and selecting properties, and getting to the name that way to copy it. It would be a lot easier for them if they could just do a quick key similar to ctrl+c to copy it. It would be even better if they could select multiple parts at a time, and have it copy each part name on a different line so when you pasted it, it would look similar to:
part1
part2
part3
If anyone has anyone could help me out it would be very much appreciated. Even if all you can give me is pointers or suggestions. Thanks very much!!
I am fairly new to SolidWorks and even newer to scripting. Our design department recently came to me wondering if there was a way to create a macro that when they selected a part in the feature tree on the left hand side, and pushed the macro hotkey, if the name could be copied to the clipboard to be pasted in other programs. We have various documents that they need the name of, and right now they are right clicking on the part name and selecting properties, and getting to the name that way to copy it. It would be a lot easier for them if they could just do a quick key similar to ctrl+c to copy it. It would be even better if they could select multiple parts at a time, and have it copy each part name on a different line so when you pasted it, it would look similar to:
part1
part2
part3
If anyone has anyone could help me out it would be very much appreciated. Even if all you can give me is pointers or suggestions. Thanks very much!!






RE: SolidWorks API - Copy part name text
Macro
Chris
SolidWorks 13
ctopher's home
SolidWorks Legion
RE: SolidWorks API - Copy part name text
Thanks again!
RE: SolidWorks API - Copy part name text
From the model, you can Insert, Tables, Bill Of Material...
Once configured how you want, RMB on the BOM, Save as, then select the Save as Type (Excel works great). Once in Excel, you can copy paste all the PN's as desired.
RE: SolidWorks API - Copy part name text