Jump to content

Recommended Posts

Posted

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!!

Posted

Thanks for sharing that with me! It didn't exactly work for me, it isn't picking up that anything is selected in the feature tree. But it's a good start for me to go off of. I really appreciate it!

Posted

Are you in an assembly or part? There are two macros attached, one for part files and one for assemblies. They both work for me. Curious why it's not working for u.

Posted

I had tried both a part and assembly. But I also didn't realize you posted two! The copy feature names didn't work for me in either, but the copy assembly part names worked great! That's exactly what I was trying to do, thank you very much!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...