Solidworks Macos



EDrawings Viewer is the only CAD viewer for Mac which delivers a premier 3D viewing experience for non CAD professionals. EDrawings Viewer enables anyone to quickly and easily view, print and review native eDrawings and SOLIDWORKS files in addition to AutoCAD DWG and DXF files. EDrawings is an email-enabled communication tool that dramatically eases the sharing of product design information. There are no versions of SOLIDWORKS that are written for Mac OS and OS X, however there are versions of eDrawings available for Mac OS. A change in Mac OS or an upgrade to SOLIDWORKS may suddenly give you major headache. We would always recommend running SOLIDWORKS on a Windows PC.

This page contains a library of useful macros, utilities and scripts for SOLIDWORKS engineers. Macros are grouped by categories: part assembly, drawing, performance etc.

Follow the Programming VBA and VSTA macros using SOLIDWORKS API section for guidelines of using and creating macros in SOLIDWORKS.

Cannot find the macro for you? Submit the request macro form and our team will review your request and will try to add the macro to the library.

Best practices for organizing macro library

Toolbar+ is a part a free and open-source CAD+ Toolset add-in for SOLIDWORKS which allows organize the macro library in custom toolbars integrated to SOLIDWORKS environment. Add-in also allows to manage multi-user environment by storing the configuration in the centralized location.

Alternatively macro buttons can be created using native SOLIDWORKS functionality. Read Creating macro buttons in SOLIDWORKS toolbars for more information.

Explore this section to find productivity and automation tools which suit your needs.

For additional productivity add-ins visit the SOLIDWORKS Labs page.

Batch Running

in some cases it might be required to batch run macros for multiple files or folders with SOLIDWORKS files. Try Batch+ is a free stand-alone application part a free and open-source CAD+ Toolset.

Categories

Import/Export

Automation of importing and exporting SOLIDWORKS files to different formats

Console application which exports all files from the specified folder to specified foreign format (e.g. eDrawings, html, stl, jpeg, etc.) using eDrawings API, without the need to have SOLIDWORKS installed or SOLIDWORKS license

Console application which exports all files from the specified folder to PDF format using eDrawings API, without the need to have SOLIDWORKS installed or SOLIDWORKS license

VBA macro to export flat patterns from all components of the active assembly or active part

VBA macro to export the selected 2D sketch in SOLIDWORKS part or assembly file to the DXF or DWG file

VBA macro to save all bodies (or selected bodies) in the SOLIDWORKS part document to individual files

Script allows exporting of the SOLIDWORKS file into the foreign format using command line

VBA macro to export only selected bodies to foreign format (e.g. 3D xml, xaml, amf, 3mf)

VBA macro to export file (or optionally all configuration or drawing sheets) to multiple formats

VBA macro to export all sheets (or selected sheets) from multi-sheets drawing to individual PDF files

Macro exports selected assembly component or part to stl format without the need of activating the document. Macro can optionally apply transformation to the exported STL to reorient the output

Power Shell script to export part file to parasolid format (.xmp_bin) from command line via Document Manager API (without SOLIDWORKS)

Model

Automation of 3D Models (parts and assemblies) and 2D drawings

Macro will display the callouts with the diameter values of all selected circular edges in the 3D model

Macro runs VBA code (or another macro) automatically on file load using SOLIDWORKS API

Solidworks Macos

Macro runs VBA code (or another macro) automatically on file save using SOLIDWORKS API

VBA macro to run other macros or code on every new document creation using SOLIDWORKS API

VBA Macro to set title with automatically incremented number from the shared file using SOLIDWORKS API for new files

VBA macro to remove all items (annotations, sketch segments, blocks etc) from the specified layer in SOLIDWORKS document

VBA macro which iterates all sheets and configurations of SOLIDWORKS file and activates each one by one

Macro removes all of the equations (or optionally only broken equations) in the active model (part or assembly)

Macro will create child configuration where all the dimension will be set to average value based on the minimum and maximum values of the tolerance

Macro replaces the text in the dimension names of the selected feature or features

Macro create new configurations for all features selected in the feature tree and suppresses them one by one in the respective configuration using SOLIDWORKS API

Macro allows to delete all of the features in the selected folder in one click using SOLIDWORKS API

Macro renames all the features in the order preserving the base names using SOLIDWORKS API

VBA macro to text from comments in the active document using SOLIDWORKS API

Solidworks Mac Os Catalina

Solidworks Macos

VBA macro which updates coordinates of the free form (through XYZ points) curve from the linked external text file

VBA macro feature which allows to configure the dimensions of the model via custom user Form

Macro feature to run VBA code on model loading using SOLIDWORKS API

Solidworks mac os 11

Macro allows to automatically run macros on every rebuild using the macro feature and designed binder attachment with SOLIDWORKS API

VBA macro to print SOLIDWORKS documents using the specified settings (printer name, printer range, orientation, paper size and scale)

VBA Macro to select all features in the active SOLIDWORKS model (part, assembly or drawing) by specifying its type

Example demonstrates how to select standard plane (Top, Front or Right) and origin by specifying its type

VBA macro to automatically assign new file name for the document based on the referenced drawing view or custom property using SOLIDWORKS API

Macro exports selected table (BOM, General Table, Revision etc.) into CSV format allowing to export with or without header preserving the special symbols like comma (,) and new line symbol using VBA macro

Macro will read all the data from the Excel table and import it into the new general table of the active document or update existing table using SOLIDWORKS API

Example in VBA to export active part or assembly document to IFC format (2x3 or 4) using SOLIDWORKS API

Frame

Automation of SOLIDWORKS menus, toolbars, 3rd party add-ins, documents management

Macro to trigger (load/unload) the specified add-in using SOLIDWORKS API

VBA macro to save all currently opened modified documents silently (without the popup messages) using SOLIDWORKS API

Closes all opened documents except of an active one using SOLIDWORKS API

Macro demonstrates how to run the group of macros within one macro using SOLIDWORKS API

Assembly

Automation of SOLIDWORKS assembly documents (*.sldasm): components, mates

VBA macro to collect all reference output files (e.g. DXF, PDF) from all folders into a single folder

VBA macro to add display data mark for configurations used in Large assembly to be opened in Large Design Review Mode

Macro adds additional selection criteria to the advanced selection tool allowing to select components which are excluded from bom, envelope, float etc.

Example will break all external references for all components in the active assembly using SOLIDWORKS API

Macro copies the path of the selected component in assembly or drawing into the clipboard using SOLIDWORKS API

Macro counts all unique components selected in the assembly and displays the result in the commands bar

This macro exports positions of components to an external CSV text file using SOLIDWORKS API

VBA macro to remove all mates and fix all top level components in the active SOLIDWORKS assembly

Macro move the components selected in the graphics area into a new folder in the feature manager tree

VBA macro to copy component name to the component reference using SOLIDWORKS with an ability to filter virtual components only

VBA macro to open each selected component in the assembly in the separate window in the same position they appear in the current assembly view

Macro performs a permutation for each components in the root level of the assembly using SOLIDWORKS API and saves the results as individual files

VBA macro to create copies of all selected components in the assembly and purge configurations in each of them

Macro demonstrates how to replace selected components in the batch preserving original selections using SOLIDWORKS API

VBA macro to batch set the rigid or flexible option for selected components in the assembly using SOLIDWORKS API

Example demonstrates how to open the folder of the selected component in the assembly in the Windows File Explorer

VBA macro to find the assemblies within active assembly which are using the selected component using SOLIDWORKS API

VBA macro for plumbing automation which inserts pipe component based on the stop faces of the fitting

Solidworks Macros Vba

VBA macro to move suppressed mates in assembly into feature folder using SOLIDWORKS API

VBA macro to open all selected sub-assemblies and part components in the Large Design Review (LDR) mode and view only mode correspondingly

Developers

Helpful utilities for developers building software utilizing SOLIDWORKS API

Macro allows capturing SOLIDWORKS and user commands into the list box

Helper methods allowing to identify the definition and specific type of the selected feature via SOLIDWORKS API and reflection

Performance

Boosting operational performance of SOLIDWORKS documents and application

VBA macro to handle the long running commands in SOLIDWORKS (open, rebuild, suppress etc.) and beep to notify its completion

Macro finds all features which are hidden in the SOLIDWORKS model and either displays or removes them

VBA macro to toggle on and off the scroll selected item into view option in SOLIDWORKS FeatureManager settings

VBA macro to force rebuild, hide all types and show isometric view of SOLIDWORKS model

This macro allows to suspend rebuild operation for parts, assemblies and drawings to enhance the performance using SOLIDWORKS API

VBA macro upgrades cosmetic threads to a new (SOLIDWORKS 2020) version which allows to improve performance of the document

Tool to open SOLIDWORKS assembly or drawing in quick view (large design review) mode from the context menu in Windows file explorer

Custom Properties

Automation of SOLIDWORKS generic, configuration and cut-list custom properties

Macro copies all the file specific properties into the properties of the active configuration

Macro renames all configurations of assembly or part into the value of the specified configuration specific custom property

VBA macro to sort file and configuration specific custom properties (in ascending and descending order) using logical order via SOLIDWORKS API

VBA macro to copy SOLIDWORKS custom properties from cut-list (sheet metal or weldment) to model or configuration

Macro feature to link specified custom properties from weldment cut-lists to SOLIDWORKS file custom properties

Excel macro which allows very fast way to manage (read and write) SOLIDWORKS custom properties in a batch directly from Excel spreadsheet

Part

Automation of SOLIDWORKS part documents (*.sldprt): geometry, feature tree

Macro demonstrates how to remove all colors from the part document on all levels (face, feature, body) using SOLIDWORKS API

Macro to convert all features in part to dumb solids (defeature part) and surfaces using SOLIDWORKS API

VBA macro renames (translates) the features in the part feature tree using SOLIDWORKS API

VBA macro to rename sheet metal flat patterns after the corresponding cut-list feature names

Diff tool to find the geometrical difference between multi-bodies parts using SOLIDWORKS API

Macro creates a precise bounding box in the part document using SOLIDWORKS API

Cut-List

Automation of SOLIDWORKS cut-lists in Sheet Metal and Weldment parts and drawings

Macro excludes the solid bodies selected from the graphics area or from the feature tree from weldment or sheet metal cut-list using SOLIDWORKS API

VBA macro to rename bodies within the SOLIDWORKS cut-list body folder (sheet metal or weldment) based on the predefined template (e.g. custom property value)

VBA macro to rename cut list features (sheet metal and weldment) based on custom properties using SOLIDWORKS API

Drawing

Automation of SOLIDWORKS drawing documents (*.slddrw): tables, views, sheets

Macro will update the referenced configurations for all Bill of Materials (BOM) tables on the active drawing document using SOLIDWORKS API

Macro will move all selected objects in the drawing sheet to specified layer using SOLIDWORKS API

VBA macro which copies all the referencing drawings paths of the components of the active assembly using SOLIDWORKS API

Solidworks Macos

VBA macro to copy specified custom properties from the selected or default drawing view into the drawing properties

VBA macro to export dimensions information (name, position, location, zone, value, tolerance) from SOLIDWORKS drawing to the CSV file

VBA macro to export flat pattern views in the drawing active sheet to DXF or DWG or other format preserving the bend notes, annotations etc. using SOLIDWORKS API

VBA macro which locks (or password protects) the sheet format editing using SOLIDWORKS API

VBA macro to open the drawings associated to the component in its own window regardless of naming (with an option to open the drawing in detailing mode)

VBA macro opens the document referenced by the selected drawing view in the referenced configuration and display state

VBA macro to rename all flat pattern views in the the active sheet after the respective cut-list names using SOLIDWORKS API

Macro will rename all drawings sheets using the value of the specified custom property using SOLIDWORKS API

VBA macro to replace sheet formats in the drawing sheets based on the specified map

Solidworks

VBA macro to scale drawing views in the current sheet based on the geometry size and specified map

This macro increments the numeric value of the notes by matching regular expression (e.g. incrementing the revision) using SOLIDWORKS API

Security

Enabling additional security and protection for the models and applications using SOLIDWORKS API

Adds the watermark feature (license) with custom message and name which cannot be deleted or edited

Materials

Automation of SOLIDWORKS materials database and properties in parts

Macro demonstrates how to copy the specified custom property from the material database to the model custom property using SOLIDWORKS API and XML parsers

Sketch

Automation of SOLIDWORKS sketch, segments and relations

Macro imports the points cloud from the specified CSV file into the active 2D or 3D Sketch using SOLIDWORKS API

VBA macro to export coordinates of sketch points from the selected sketch with an ability to convert coordinate to user units and into the model space

Macro will hide (blank) or show (unblank) all sketches (2D and 3D) in the active document using SOLIDWORKS API

VBA macro to merge selected sketches into a single 3D sketch using SOLIDWORKS API

VBA macro to find and select all arcs with diameter equal to the input arc using SOLIDWORKS API

Macro creates specified number of sketch points on the selected edge in the 3D sketch

Geometry

SOLIDWORKS geometry automation: custom features, topology optimization

Solidworks Mac Download

VBA macro which creates 3D bounding box sketch based on the SOLIDWORKS bounding box with an ability to select sketch segments

Macro splits the selected surface or solid body by faces creating individual sheet body for each face using SOLIDWORKS API

Motion Study

Automation of SOLIDWORKS Motion Study module

Macro demonstrates how to create an animation from configurations to represents model history or sheet metal folding

Solidworks Macros

Options

SOLIDWORKS document and system option automation

Macro allows to export all document properties into excel format using SOLIDWORKS API and reflection

This is a fairly long-standing issue we come up against on the Innova Systems technical support desk, and also while talking to prospective customers about SOLIDWORKS. The simple answer is that SOLIDWORKS do not develop an Apple Mac version of the software, so we can’t install SOLIDWORKS natively.

We used to recommend the Bootcamp route, which involves installation of Bootcamp and then Microsoft Windows on the partition Bootcamp creates. The issue here is that if you need to access the Apple Mac Operating System (OS), you would need to shut down windows and boot up the Apple Mac OS, because they cannot be running simultaneously. This allows the full use of the hardware (RAM and graphics card) you have in your Apple Mac for Windows.

The alternative solution that we used to steer people away from is Parallels, a virtual machine software that allows you to run another OS inside the Mac OS (inside a window). The reason for not recommending this is that you are sharing the resource of the machine with two operating systems, thus not necessarily having the required resource to run a demanding program like SOLIDWORKS.

There were also historic problems with not being able to use the graphics card properly which would result in exceptionally slow performance when selecting things. This is due to most Macs not having certified graphics cards for SOLIDWORKS and parallels using a virtual graphics card driver or the default Windows driver. The virtual or generic drivers don’t offer the level of performance needed to run SOLIDWORKS correctly.

Innova Systems Technical Director, Ed Hawkins, explains

We have now installed and configured this on over 20 users’ Apple Mac computers and I have to say the response from these people has been amazing.

I have a mid 2014 MacBook Pro, which I’ve been using as a test bed. The specs are listed below:

You will note that this machine has Intel Iris Graphics (specific to the Mac) and not a certified graphics card for SOLIDWORKS.

So, I installed the latest version of Parallels (version 10) and a fresh copy of Windows 10 into the virtual environment and then set about making SOLIDWORKS work!

It’s pretty easy to get Windows installed, as Parallels guides you through that process very nicely. You can specify how much of the machine’s resource to give to the Windows OS – which is where a high spec Mac will stand you in better stead. It is always a good rule of thumb to assign half the available RAM to the Windows OS, so in my set up, I assigned 4GB of RAM.

The difficult bit is making the “Use Software OpenGL” button inside SOLIDWORKS become accessible. When you first install SOLIDWORKS, this button is ticked and greyed out, so we can’t turn it off. In our opinion, SOLIDWORKS is unusable at this point, as selecting geometry and navigating the software is too slow to be productive.

With a bit of effort, and some registry modifications, I was able to untick the OpenGL box, allowing us to use the graphics card to a much higher potential. The difference in performance was huge, and it allowed me to select and navigate the software much, much faster. One limitation that frustrated me early on was the lack of RealView Graphics (Accurate reflections and appearances), so I set about solving this problem too. I’m happy to report that RealView works perfectly on a properly specced Mac Book Pro!

Of course, this isn’t necessarily a new solution – Parallels has been around for some time, and installing Windows on a Mac for as long. The difference with our solution is that we can make SOLIDWORKS behave as well as a normal windows PC. No more slow selecting or poor rotational speed.

Above is a screenshot of the working set up, albeit in Window mode, not full screen. I have this running at a resolution of 2560 x 1600 in full screen mode and it is functioning very well. Please note: the specification of my Mac, and the resource I can assign to Windows is far from ideal. It would be recommended for people who are creating fairly simple parts with up to 100 features, and assemblies containing up to 500 components. Any more than that, and I think it would struggle.

In summary, the Parallels solution is now recommended by Innova Systems. We are confident of this working well in a production environment, but the spec of the Mac is key to the success. Along with our modifications to the registry in Windows, of course.

Video: See SOLIDWORKS running on Apple Mac


Video: How to run SOLIDWORKS on Apple Mac Computers

Get in touch with us to find out more

Download Solidworks Macros

Are you based in the UK and interested in running SOLIDWORKS on your Apple Mac? We can demonstrate our configuration to you via a Team Viewer session, or if you prefer and are interested in purchasing SOLIDWORKS we can come out and show you live with some of your data.

Call us on (01223) 200690 or complete this form to organise a consultation

Editor’s note: This post was originally published in August 2015 and has been updated to feature new information on our process.