So...
There had been some macro idea in my personal backlog for quite some times and I finally have some times to start working on them recently...
Before i start working on the macro from scratch, I thought i should ask around here first whether is there an existing macro that i can reuse...
1. Copy Surface macro
So.. i am kind of annoyed with the amount of mouse click i need to copy a surface (entering 0 as value, and then accept), I will be great if i can just copy all the selected surface with 1 click/key without going into the interface...
The macro should:
i. Offset all selected surface by 0 (User will select the surface before clicking the macro)
ii. (Optional) Apply a preset color to the copied surfaces
Copy Surface Macro
Copy Surface Macro
Hi @Zhen-Wei Tee
I just uploaded a VBA macro to Codestack that does what you asked:
https://github.com/EddyAlleman/codestac ... fset-equal
It could take some days before you can find it on the Codestack website. This way you can look into it already.
Happy coding!
Eddy
Go to full postI just uploaded a VBA macro to Codestack that does what you asked:
https://github.com/EddyAlleman/codestac ... fset-equal
It could take some days before you can find it on the Codestack website. This way you can look into it already.
Happy coding!
Eddy
Far too many items in the world are designed, constructed and foisted upon us with no understanding-or even care-for how we will use them.
- Eddy Alleman
- Posts: 50
- Joined: Thu Apr 01, 2021 10:32 am
- Location: Belgium
- x 80
- x 89
- Contact:
Re: Copy Surface Macro
Hi @Zhen-Wei Tee
you also could achieve this by using "knit surface"
there is an API example in the help files:
"Create Surface Knit Feature Example"
https://help.solidworks.com/2016/englis ... le_vb6.htm
An advantage here can be that you can merge the resulting surfaces
Eddy
you also could achieve this by using "knit surface"
there is an API example in the help files:
"Create Surface Knit Feature Example"
https://help.solidworks.com/2016/englis ... le_vb6.htm
An advantage here can be that you can merge the resulting surfaces
Eddy
Re: Copy Surface Macro
There are already 3 functions that copy surfaces:
1) move copy bodies - for solid/surface bodies
2) knit, as mentioned by @Eddy Alleman
3) offset (at 0 distance).
Move bodies only works if you don't have it set to using mates.
Knit won't work for a single face
If your macro gets around these and can be initiated with a hotkey, that would be cool.
1) move copy bodies - for solid/surface bodies
2) knit, as mentioned by @Eddy Alleman
3) offset (at 0 distance).
Move bodies only works if you don't have it set to using mates.
Knit won't work for a single face
If your macro gets around these and can be initiated with a hotkey, that would be cool.
Blog: http://dezignstuff.com
- Eddy Alleman
- Posts: 50
- Joined: Thu Apr 01, 2021 10:32 am
- Location: Belgium
- x 80
- x 89
- Contact:
Re: Copy Surface Macro
Hi @Zhen-Wei Tee
I just uploaded a VBA macro to Codestack that does what you asked:
https://github.com/EddyAlleman/codestac ... fset-equal
It could take some days before you can find it on the Codestack website. This way you can look into it already.
Happy coding!
Eddy
I just uploaded a VBA macro to Codestack that does what you asked:
https://github.com/EddyAlleman/codestac ... fset-equal
It could take some days before you can find it on the Codestack website. This way you can look into it already.
Happy coding!
Eddy
Re: Copy Surface Macro
Sorry for the late reply, the last few days was really busy for meEddy Alleman wrote: ↑Tue Aug 10, 2021 2:22 pm Hi @Zhen-Wei Tee
I just uploaded a VBA macro to Codestack that does what you asked:
https://github.com/EddyAlleman/codestac ... fset-equal
It could take some days before you can find it on the Codestack website. This way you can look into it already.
Happy coding!
Eddy
I had tested out the marco and it was really FANTASTIC
It even include the number of faces being copied in the feature which is really nice
Thanks alot!
Far too many items in the world are designed, constructed and foisted upon us with no understanding-or even care-for how we will use them.
- Eddy Alleman
- Posts: 50
- Joined: Thu Apr 01, 2021 10:32 am
- Location: Belgium
- x 80
- x 89
- Contact:
Re: Copy Surface Macro
You´re welcome.
Glad you like it !
The macro has been published on Codestack today.
Go to Goodies > Geometry > copy surfaces direct link:
https://www.codestack.net/solidworks-ap ... set-equal/
Eddy
Glad you like it !
The macro has been published on Codestack today.
Go to Goodies > Geometry > copy surfaces direct link:
https://www.codestack.net/solidworks-ap ... set-equal/
Eddy