Page 1 of 1

Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 4:29 am
by pitbullxp
Hi all.

I'm quite new to the whole macro making stuf and i want to learn. But i need some reading/watching/exercise material

Lets say i don't have any experience in coding. So ik will need to understand the basic. I used en implemented macro's, changed PDF to DXF, changed some custom properties. That's all.

I hope you can help me (and future macro makers) :D

Re: Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 7:22 am
by Jaylin Hochstetler
I am in the same shoes except I have a little bit of experience programming in Python so I know the basics.

A really good resource I refer to is https://www.codestack.net/ done by @artem Thanks @artem!
Here is the page about VBA coding https://www.codestack.net/visual-basic/.

Re: Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 9:24 am
by pitbullxp
So first i see that i posted this in the PDM sup and not the macro sup. Is it possible to relocate this post?

I was looking around here and i came across codestack. looks promising. I certainly will use that.

Re: Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 10:39 am
by jcapriotti
Channeling @matt for his powers of relocation.

Re: Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 10:52 am
by zwei
One thing that i used a lot when I first started is SOLIDWORKS API HELP

It is quite helpful if you know what function/code you need (which you normally identify using macro recorder
) as well as having some great example
http://help.solidworks.com/2019/english ... 0a8492#Pg0

As you mention you had close to none programming knowledge, you might wan to learn some basic of programming, for example, IF Else statement, loops.

Re: Resources to learn to understand the code in a macro

Posted: Wed May 12, 2021 11:47 am
by mattpeneguy
Zhen-Wei Tee wrote: Wed May 12, 2021 10:52 am One thing that i used a lot when I first started is SOLIDWORKS API HELP

It is quite helpful if you know what function/code you need (which you normally identify using macro recorder
) as well as having some great example
http://help.solidworks.com/2019/english ... 0a8492#Pg0

As you mention you had close to none programming knowledge, you might wan to learn some basic of programming, for example, IF Else statement, loops.
There's some great advice so far in this thread. I'll just add that there are a lot of great examples in the help. I'd start there by copying code from simple examples and build on that. Start small and then build up. If you were to start off taking one of @artem's advanced macros and try to analyze it, you may be overwhelmed.