xarial / codestack

Library of SOLIDWORKS API, SOLIDWORKS PDM API, VBA and Desktop code examples, applications macros and tutorials.
https://www.codestack.net
MIT License
186 stars 70 forks source link

Solidworks layer problem #360

Open AxelBoirot opened 1 month ago

AxelBoirot commented 1 month ago

Hello and thank you for your site and all the macros! I have a question, I don't know how to code VBA so I'm writing to you. Could you create a macro to create a layer in relation to a solidworks part or assembly in the context of assembly and not drawing?

To clarify the subject, we make furniture. Everything is very simple, most of the time, it's like tables with legs, different coverings, equipment (tank, tap, socket etc.). Except that on a plan, there can be 200 table feet. In the drawing context, we cannot select all the feet at once to drag them into a layer. But in the assembly context, we can select all the feet at once but not create a layer from this environment. So I want to link the two: select all the feet (or other parts) and link them to a layer.

Do you think this is feasible? Thank you and have a nice day Sincerely Axel