AnsweredAssumed Answered

resources for teaching myself API/VBA functionality

Question asked by Chris Pratt on Feb 21, 2018
Latest reply on Feb 22, 2018 by Chris Pratt

I am teaching myself to write macros for SolidWorks and many times I have the problem that I don't know what functionality is pre-included in Solidwork's API/VBA stuffs, and have no known resource/documentation for discovering this. I am looking for a teach-myself resource (or even just what keywords to google) to help with this. There's the SolidWork's online documentation found here but I either don't understand how to search through it or it rarely contains specific information I need


For example, I'm writing a macro that sets the read only property of all open files. Through accidentally running into code people have posted online I know that a "SldWorks.DocumentSpecification" has a set-able property ".ReadOnly" and that using "Application.SldWorks.GetDocuments" I can get a list of all the open documents. How do I discover these things without having to run into them in other people's code? I'm very curious what all the other built in functions of "Application.SldWorks" are but don't know how to discover them. Or, how do I teach myself how to go from a "Application.SldWorks.GetDocuments" to a "SldWorks.DocumentSpecification" so I can set its ".ReadOnly" property?


Something similar to what you can find for python modules (such as found here would help with this immensely.