SolidWorks VBA
When managing large assemblies in SolidWorks, it can be difficult to manage the appearance of each and every part, as SolidWorks UI forces you to adjust the appearance of each part individually. In an assembly with hundreds of tiny screws and other bits, this task becomes tedious. The engineers at Scaled Power asked me to come up with a way to mass-assign appearance properties to large assemblies using a pre-existing bill of materials (BOM) where engineers can simply type or copy/paste the properties they want for each part.
I developed a set of two SolidWorks macros, written using Mircosoft Visual Basic for Applications (VBA). One macro creates a BOM in Excel, which the user can then populate with material property values and any other information they might find helpful. The material property values in SolidWorks are the following: color (R, G, and B values), reflectivity (ambient, diffuse, specular, shininess), transparency, and emission. Below is a sample BOM that engineers at Scaled Power might use.
The second macro reads the selected BOM from Excel and applies the chosen appearance values to the assembly parts. Ultimately, with just a few clicks, the user can change the color and appearance of every single part in an assembly (as shown above).