Learn how to stay in touch with CodeStack latest updates about SOLIDWORKS API, C#, Visual Basic, DevOps and software development tutorials and tips & trick. Never miss the releases of new useful macros or applications to enhance your SOLIDWORKS experience.
All table types supported by SOLIDWORKS can be accessed via API. This includes but not limited to
- Bill Of Material
- Weldment Cut List
- Holes Table
All table inherit the ITableAnnotation SOLIDWORKS API interface. This interface provides the method to work with the table (i.e. change cells, change formatting, add/remove rows etc.).
There are specific table annotation for a generic table annotation. For example IBomTableAnnotation is a specific table annotation for Bill of Materials (BOM) table. Generic table annotation can be cast to specific by directly assigning the pointer.
Table is also present in the Feature Manager tree which means that it also provides methods exposed by the IFeature interface. Each specific table annotation provides the property to access the specific table feature. For example IBomTableAnnotation::BomFeature will return the specific BOM feature. To get the pointer to IFeature it is required to call the ::GetFeature method for all specific table features.