Attribute VB_Name = "ConfigSpecificMain"
'********************************************************************'
'
' This macro will capture a list of configuration specific features
' and dimensions.
'
'********************************************************************'
'  This Macro shows how to create a simple PropertyManagerPage for
'  SolidWorks.  It includes an example of every control that can
'  be placed on a PropertyManagerPage.
'********************************************************************'

  Global swApp        As Object
  Global Part         As Object
  Global ModelDocExt  As Object
  Global MassValue    As Variant
  Global MassStatus   As Long

' The application's PropertyManagerPage
  Global swPage                  As csPropMgr
  
Sub main()
  Dim nRetVal             As Long
  
  Set swApp = CreateObject("SldWorks.Application")
  Set Part = swApp.ActiveDoc            ' Get active document
  Set swPage = Nothing
  
  ' Ensure we have a model
  If Not Part Is Nothing Then
    FileTyp = Part.GetType              ' Get document type
    If FileTyp = swDocPART Then         ' Is it a part model?
        
      ' Check if configurations exist in model
      ' If more than 1 configuration exists,
        ' Get list of what is different between configurations
        ' If 1 change or more exists,
            
            If swPage Is Nothing Then
              Set swPage = New csPropMgr
              swPage.Show 'display it
            Else
              swPage.Show
            End If
        
          ' Else only 1 configuration exists
            ' MsgBox "All configurations are the same." & chr(13) _
                     & "Please open a configured part model.", vbExclamation
          ' End number of configurations check
        
        ' Else only 1 configuration exists
          ' MsgBox "Model only has 1 configuration." & chr(13) _
                   & "Please open a configured part model.", vbExclamation
        ' End number of configurations check
      
    Else
      MsgBox "Current document is not a part model." & Chr(13) _
             & "Please open a configured part model.", vbExclamation
    End If
  Else
    MsgBox "No active document in SolidWorks." & Chr(13) _
           & "Please open a configured part model.", vbExclamation
  End If

End Sub
'-----------------------------------------------------------

