Posts

Showing posts with the label Customization

Referenced Configuration of Top level Components in Assembly

      Dim swApp As SldWorks.SldWorks     Dim swAssy As SldWorks.AssemblyDoc     Dim swSelMgr As SldWorks.SelectionMgr     Dim swModel As SldWorks.ModelDoc     Dim swComp As SldWorks.Component     Dim RefCfg As String     Dim vcomp As Variant Sub main()     Set swApp = Application.SldWorks     Set swModel = swApp.ActiveDoc     Set swAssy = swModel     vcomp = swAssy.GetComponents(True)     'Set swSelMgr = swModel.SelectionManager     For i = 0 To UBound(vcomp)          Set swComp = vcomp(i)     ' Change component configuration to "in-use"     'swComp.ReferencedConfiguration = ""     RefCfg = swComp.ReferencedConfiguration     MsgBox.Show swComp.Name2 & "-" & "Referenced configuration: " & RefCfg     Next     ' For changes to take effect     swModel.E...

SolidWorks VBA Macro to remove flag of Toolbox Components

Image
 We all work with SolidWorks toolbox components .But we wonder if we could remove the flag at sometime. I have created a Macro file which would help you to remove the flag of Toolbox Components in assembly. Reach me for any clarification.