I have been using the API help documentation.
2014 SOLIDWORKS API Help - Welcome
I feel like I am missing something.
1. Is there a more complete set of documents? Very often I just can't seem to find the critical details of how to use a function.
2. VBA seems to be documented only a fraction of the time. Is SolidWorks discouraging the use of VBA?
Thanks in advance.
SolidworksApi macros
Alan,
If you are wanting instruction on just simple VB6 methodology you will probably have to order some books from Amazon or Google VB6 code examples online. Solidworks API help doesn't give step by step instruction on how to use basic VB6 code. Hope this helps.
What I am looking for is details on how to use specific functions associated with SolidWorks in VBA. I am often finding or being shown .net results and having to figure out by trial and error if the VBA version has an analogous function by changing the syntax and trying it out. I use VBA with Microsoft applications, mostly Excel, and it is rare that I can't find documentation on a problem.
For example, if you want to know how to use the SaveAs routine in Microsoft Excel,
Workbook.SaveAs Method (Excel)
Whereas in SolidWorks, if I am looking in the right spot,
2014 SOLIDWORKS API Help - SaveAs Method (IModelDocExtension)
The details for VBA are quite sparse. To be fair, the documentation has to provide details on VB.NET and C. This is why I am wondering if I am looking in the right place. I don't know how else it is possible to figure out the exact syntax of the VBA functions.
Hi Alan,
You're looking in the right place. We try to provide project-based examples in a variety of language formats. The link you shared includes a link to a VBA example of saving a PDF. Can I help with any specific questions?
Mike
Hi Alan,
I would suggest to start with the local help. Uncheck the 'Use SOLIDWORKS Web Help' option in the Help menu and run API Help menu command. Local help contains the same content as the web help but I found this to be a little bit easier to navigate (especially using the 'Index' and 'Search' tabs).
Please check this article for some tips: and this article SolidWorks API Video Tutorials » Tips for Finding and Organizing Code Snippets by
Thanks,
Artem
If you can get a copy of SolidWorks 2008 API help it will cover mostly VBA and VBA examples. Back then there was very little VB net and even less C#. SolidWorks has done a great job of keeping the older code working but and it helps from rewriting and fixing code but the newer code quite often has new features.
Dan Miel
SW 2014 SP03
EPDM 2016 SP02
VB net 2010.