• Insert Block As Floating Selection - Macro

    Hello, I want to make a macro that works on sw part and it does the following: -Creates a sketch on a selected face -Insert a sketch Block in that sketch (As floating selection)   Macro partially works. The i...
    Primoz Semprimoznik
    last modified by Primoz Semprimoznik
  • Solidworks API; Export to PDF

    Hello,   The designer has asked for a way to batch convert collections of Solidworks files into PDF on file change.  Using the eDrawings API and a PDF printer I managed to get it to work, although a little ...
    Joe McGrath
    last modified by Joe McGrath
  • Macro to edit views based on configuration size

    Hello,   I am trying to export drawings of a few hundred configurations. Drawing is quite simple, but its size variation is from 10mm to 400mm. So it changes drasticaly and every drawing has to be of scale 1:1 (...
    Ignas Trepkus
    last modified by Ignas Trepkus
  • 5 best practices to make your VBA macro great

    Hi,   I have published new blog post 5 best practices to make your VBA macro great. It practically demonstrates simple techniques which can be used in macro development which will make macro more reliable, ...
    Artem Taturevych
    last modified by Artem Taturevych
  • Measure Angles Between Coordinate Systems and Axis

    The Measure Tool in SOLIDWORKS has a serious limitation when coordinate systems are selected: it does not report angles!!!     or     Can the angle measurements be done by API?   The fir...
    Alin Vargatu
    last modified by Alin Vargatu
  • Structural member from sketch -> combine

    Hi everyone,    I'm looking to create a macro in SW2013 that will select all entities in a sketch, convert to a specific structural member, then combine all. Is this do-able?   Thank you,
    Bryan Campbell
    last modified by Bryan Campbell
  • Macro: Export all open drawings as PDF and DWG

    Attached is a macro to export all open drawings as PDF and DWG in the same location as the drawing file. The macro has been made on SW 2019 version but should work on earlier versions as well. Changing the macro refer...
    Deepak Gupta
    last modified by Deepak Gupta
  • How to measure between Origin and a Coordinate System by VBA Macro ?

    Hi All,   As the topic said, I want to get :   a. Distance between 2 features. delta X ? delta Y ? delta Z ?   b. Angle values in between regarding axis: X1 VS X2 Y1 VS Y2 Z1 VS Z2   How...
    Vincent Li
    last modified by Vincent Li
  • Flat-pattern export macro processing every single  instance of the sheet-metal part

    Hi Everyone, I need some help with one of the macros that we are using in our organisation. The macro is suppose to export flat-patterns from sheet-metal parts included in active assembly to the specified location, an...
    Rafal Brzozowski
    last modified by Rafal Brzozowski
  • how to update equations in assembly?

    Hello. SW 2018. I have the main equation in the root of the assembly. Further, I create the part with equations linked to the equations in the root assembly. All works fine: I can change one variable in root and e...
    Voverrr Mironoff
    created by Voverrr Mironoff
  • VBA - Show All Components

    Looking to Show all Components.. Process won't record in macro recorder, API help shows 2017 SOLIDWORKS API Help - Show All Components Example (VBA) .  Im being a crybaby, but shouldn't it be simpler than proces...
    Cad Admin
    last modified by Cad Admin
  • Replace revision with last 2 filename digits

    Hi, I'm trying to replace the revision letter "A" with the last 2 digits of my filename. Eventually I would save this as drawing sheet format template so it will automatically sync my future drawings. Any help w...
    Nadav Meir
    last modified by Nadav Meir
  • Summary Information Macro Help

    Hello,   In an effort to be more efficient I was wondering if anyone had a macro to export Information from the file properties window.  I just want a simple text box to pop up displaying the information be...
    Nick Spinelli
    last modified by Nick Spinelli
  • hi friends trying to change the diameter dimension leader as perpendicular to axis through API.

     Trying to change the diameter dimension leader as PARALLEL/perpendicular to axis through API.
    Kanishq Bansode
    last modified by Kanishq Bansode
  • How do I get the length of an edge to use in an equation?

    I'm trying to place dowel holes where the quantity of the dowel holes depends on the length of an edge. The pattern works in the library part, but when I go to use it in and actual part, it sets the hole quantity...
    Juliann Vatalaro
    last modified by Juliann Vatalaro
  • Setting up a custom task with macro

    Good morning,   I have been reading about running a macro in the task scheduler but I am still confused as to what the program path is. I have a stock size macro that I want to run on parts only, it errors out w...
    Greg Raymond
    last modified by Greg Raymond
  • My macro works on 'Parts' but not on 'Assemblys' (SW2017)

    Hello, y'all!   I'm a beginner when it comes to coding. For my job I got a task which I have to do over 400 times. I thought: hey let's write a macro for it. So I did, and it works fine for 'Parts'. And yes like...
    Mark Kamphuis
    last modified by Mark Kamphuis
  • Saving DXF of drawing in VBA fails

    Question about some api weirdness. Using SW2019 sp4 and VBA:   Saving a PDF of a drawing using ModelDocExtension.SaveAs2 works fine and will overwrite file if it already exists. Example: If Not swExt...
    Chris Dault
    last modified by Chris Dault
  • VBA Macro Add missing Custom Properties

    I have another division of our company, sent me a few thousand files.  I'm going through them & they are all are missing some needed Custom Properties.  Anyone have a Snip-it of code or a macro that chec...
    Cad Admin
    last modified by Cad Admin
  • Bitmap Image List

    How do I create a Bitmap Image List. I am trying to add my own icons to my Solidworks Addin and I followed the instructions i found on http://www.basis.com/kb00785 to create Bitmap Image Lists but when I add them to t...
    Joe Pickens
    last modified by Joe Pickens