5 Replies Latest reply on Feb 22, 2018 1:25 PM by Chris Pratt

    resources for teaching myself API/VBA functionality

    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 http://help.solidworks.com/2018/english/api/SWHelp_List.html?id=8aa1f4a40e9e4cc5a17bf29c63057754#Pg0&ProductType=&ProductName=


      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 http://scikit-image.org/docs/dev/api/skimage.filters.html) would help with this immensely.