Posts

SOLIDWORKS MACRO TO HIDE/SHOW SKETCH IN DRAWING

Image
This macro helps to Hide/Show macro depending on the selected view. Click below for downloading the macro file. SKETCH_HIDE 1.Any view with model has to be selected before running the macro. The visibility of sketches are hided automatically by the macro.This is done by using Treecontrolitem ,Which helps to traverse the tree thoroughly.VBA collection is used to collect the features and the collected sketch are all hided by blanksketch, 

SolidWorks Macro to create DXF file from each configuration

'Hi All, 'The Code as follows: Dim swApp As SldWorks.SldWorks Dim swmodel As SldWorks.ModelDoc2 Dim swconfig As SldWorks.Configuration Dim vconfig As Variant Dim swpart As SldWorks.PartDoc Dim dataAlignment(11) As Double Dim varAlignment As Variant Dim dataViews(0) As String Sub main() Set swApp = Application.SldWorks Set swmodel = swApp.ActiveDoc Set swpart = swmodel vconfig = swmodel.GetConfigurationNames dataAlignment(0) = 0     dataAlignment(1) = 0     dataAlignment(2) = 0     dataAlignment(3) = 1     dataAlignment(4) = 0     dataAlignment(5) = 0     dataAlignment(6) = 0     dataAlignment(7) = 1     dataAlignment(8) = 0     dataAlignment(9) = 0     dataAlignment(10) = 0     dataAlignment(11) = 1     varAlignment = dataAlignment     dataViews(0) = "*Current" varviews = dataViews Dim bool As Boolean Dim fpath As String fp...

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.