I've completed a macro up to the point where I would like it to be tested by people other than myself. This macro will extract weldment items from drawing views, parts, and assemblies consisting of any combination of sub-assemblies and/or parts. This marco will not extract weldments that are in suppressed parts/assemblies. Also, the macro works on parts/assemblies with more than one configuration. So in an assembly you can have a part with configurations Part-A1 and Part-A2 and the macro will extract the weldments from each configuration. The main motivation of creating this was to have a macro that would sum up every weldment item and display the results. In the process of debugging, I decided to include the weldment items in each part in the Excel sheet as well. I'm using classes to add items to my collections. The reason being, I want to be able to have flexibility in the future to extract other properties from weldments.
- The macro will only extract weldment items that have a length property.
- The parts must have a title property name in the configuration specific properties.
- The macro uses the DESCRIPTION property in each cutlist item property to collect the weldment items. If you have a DESCRIPTION set as TUBE, SQUARE 3.00x3.00x0.25 and another set as TS, 3.00x3.00x0.25, the macro will see these as different items.
- Sub-assemblies must be saved before running the macro. An error pointing to Set swPart = swChildComp.GetModelDoc2 triggers if you don't go into the sub-assemblies and save them before the macro is run. Not sure why this happens.
- Excel must not be opened.
If there is a feature that would be beneficial, feel free to comment.
Message was edited by: Harold Black Uploaded wrong zip file