Sheet Metal parts BOM

Create BOM that contains only sheet Metal parts

As there are no direct method to do this we used a macro to create a configuration then select all other sheet metal parts and suppress them and call this configuration "Sheets Only"

the macro uses the advanced select method and the selection methods must be exported as .XML
macro text is as following:

' ******************************************************************************
'preconditions:
'1-an assembly must be opened.
'2-an advanced selection method must be created and exported to select only the other parts than sheet metal.



'post conditions:
'1-a configuration called "Only Sheets" will be created contains only sheet metal parts
' ******************************************************************************
Option Explicit

Dim swApp As SldWorks.SldWorks
Dim SwAssembly As SldWorks.AssemblyDoc
Dim SwModel As SldWorks.ModelDoc2
Dim SwModelExt As SldWorks.ModelDocExtension


Dim Part As SldWorks.PartDoc
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim IntValue As Integer

Sub main()

Set swApp = Application.SldWorks

Set SwAssembly = swApp.ActiveDoc
SwAssembly.AddConfiguration2 "Sheets Only", "", "", True, False, False, True, 256

Dim ASC As AdvancedSelectionCriteria
Set ASC = SwAssembly.GetAdvancedSelection

IntValue = ASC.GetItem(1, "File Type", 8192 , "SheetMetal Part", False)
ASC.Select

Set SwModel = SwAssembly.GetEditTarget
SwModel.EditSuppress2

SwModel.ShowConfiguration2 "Default"

End Sub
    • Related Articles

    • Desktop Metal Studio System

      High resolution printing. In-house & built to scale. Introducing the Studio System+. Bringing new capabilities to the world’s first office-friendly metal 3D printing solution. Safe for the office The Studio System eliminates lasers and loose powders ...
    • The unique features of the Studio System | Separable Supports

    • 3D printing services

      Plastic 3D printing services.  Metal 3D printing services .
    • DraftSight V1R5.0 includes new features for free, Enterprise and Professional versions

      Discover what’s new in the Enterprise Pack Offering for DraftSight. The new release of DraftSight, V1R5.0, includes new, user-driven features to help companies and educators reduce software compliance issues and deployment challenges, and enhance ...
    • Topology Study

      Use a Topology study to explore design iterations of a component that satisfy a given optimization goal and geometric constraints. Available in SOLIDWORKS Simulation Professional and SOLIDWORKS Simulation Premium. A Topology study performs ...