Macro to add Revisions to Drawing Revision block table

A while ago, I created a SolidWorks macro that allows the user to quickly add new revisions to a drawing’s revision block table. It’s called RevBlockControl. I’m fairly proud of this macro because of its flexibility and easy of use. Within SolidWorks, it can be used for any ASME Y14.35M-1997 compliant revision block table and even supports not so compliant layouts. One cool feature is that it supports revision block tables that start either from the top or bottom of a drawing. The macro even provides an option to update a revision custom property (though the name of the custom property is stored in the code). This one function, of course, is not as useful for those who update their custom properties within the part model. Another requested feature that was included is the addition of buttons to insert some common special characters like line feed and the +/- symbol.

RevBlockControl 1.01

Image of an early version of the RevBlockControl

This macro will not work with manually drawn or excel based revision blocks. It only works with a SolidWorks revision block table.  One area of the macro needing improvement is that of settings. Currently, the settings are stored within the code itself, or user selected each time the macro is run. Also, it does not validate if the current revision block table matches the user selected settings. However, it does have clear instructions within a detailed help area that will allow even a novice user to quickly modify the code to establish their settings preferences. There is currently only one known bug involving the form X button. Use the actual Cancel button if quitting the macro without making changes to the revision block table.

One big plus of the macro is that it has a simple preview area that allows the user to visualize how their revision entry will appear. The preview updates to match whatever settings are selected, and any data entered into the input fields.

The macro may be downloaded here: RevBlockControl.  It may be freely distributed. For additional details, see its .txt file and its help area.  Feedback is always welcome.

Author: fcsuper

As a drafter, mechanical designer and CAD engineer, I've been in the mechanical design field since 1991. For the first 8 years of my career, I was an AutoCAD professional. I utilized AutoLISP and many other AutoCAD customization features to streamline drafting activities for 6+ drafters and designers. I authored several custom functions, one of which was published in the March 1997 issue of Cadalyst Magazine. Since 1998, I've been used SolidWorks non-stop. I've worked to utilize the SolidWorks' user environment to simplify drafting and design activities for 20+ engineers. I've created this website to provide current information about SolidWorks from a variety of contributors. More recently, I am now employed by Dassault Systemes as SOLIDWORKS Sr. Product Definition Manager to improve drawing, annotation and MBD related areas.

11 thoughts on “Macro to add Revisions to Drawing Revision block table”

  1. Please note that this macro has now been updated to include a basic .ini to people’s initials can be added without directly editing the macro itself.

  2. Hi,

    I’ve been happily using your RevBlockControl macro for a long time, but now that we switched to 2014, it doesn’t work any longer. Probably VB6 is the culprit.
    Do you by any chance have an updated macro that runs under SW2014?

    Thanks,

    Frank

  3. Frank, There’s been improvements to API in SolidWorks 2014. I don’t know when I’ll have a chance to update the macro. However, you can check the Release Notes and What’s New for details about the general changes to the API in 2013 and 2014. There should be enough info in there to walk through the adjustments to the code that are needed. Here’s an example of what needs to be done: https://forum.solidworks.com/message/332905#332905

  4. I’d like to use your “RevblockControl macro”
    for our revision block here at our company we currently use Solidworks 12, but the only thing difference is the date come before Rev By.
    Is any way that I can change date before Rev By?
    Thanks

    Tuan

  5. Tuan,

    Yes, that is doable. Within the macro, there is code that fills columns. You can change the cell filled by each field. There is code in the macro that can be used as an example of how to change field and cells.

    Matt

  6. Hello,

    Can you please fix the download link to RevBlockControl? Some sort of php error happens when I try to download.

    Thanks…

  7. Brian,

    The website’s code is too outdated to update for current SQL, unfortunately. It’s been limping along, but appears that it didn’t withstand the most recent updates. This means I’m actually going to be closing that old site down, in favorite of this blog. I have already moved some files over, and expect to move others over sooner or later. Many of the macros are outdated and need editing to make them work in current versions of Visual Basic in SOLIDWORKS. You can try out RevBlockControl.zip. I’ll email it to you soon to try out, but I’m not sure of it’s current status.

  8. Hey, I also noticed the REV block control link is down. Do you have a link to your new site, or can you email be the zip?

    Thanks!

    JM

  9. Unfortunately, the old site is gone due mostly to the outdated system upon which is was based. I have many of the old macros, but just haven’t had time to add them to the site. I’ve also been far more selective about what I do add. I don’t have access to the old files right now, but check back here in a month or so and ping me again and I’ll see if I can get access to the files (they are buried on computer that is currently in storage).

  10. Gents – I got it working with SW 2015. Just add “PrtSafe” before each FUNCTION command. I think this occurs (3) places. Runs fine now.

Leave a Reply

Your email address will not be published. Required fields are marked *