Unlock Large Assembly and Drawing Performances with Macros and API
Last week I had a great pleasure delivering the joint presentation at 3DEXPERIENCE WORLD 2021 with the legend of SOLIDWORKS community and guru of large assemblies Alin Vargatu from Javelin Technologies.
We have demonstrated how an already amazing SOLIDWORKS functionality for handling large assemblies and detailing drawings can be pushed over the limit with powerful SOLIDWORKS API.
The presentation was attended by over 500 engineers worldwide. And there are dozens more attendees for the on-demand session.
If you registered you can view this and other presentations on demand
Several macros and tools were demonstrated during the demo. One of the most common questions we have received during the Q&A and after the presentation is
Where to download the macros?
So I have decided to write this blog post as a recap of the demonstrated features and provide download links and more information about how to access those macros.
Macro buttons in the Large Design Review mode
Unfortunately, standard SOLIDWORKS macro buttons cannot be used in the Large Design Review mode, but fortunately SOLIDWORKS API provides an alternative solution for that. Free and open-source Toolbar+ tool allows to host macros in toolbars and menus including the Large Design Review mode.
As expected there are some API limitations when running in Large Design Review Mode, but there are still a lot of APIs which can be successfully utilized.
In particular, it is possible to modify the application and document settings. This includes, but is not limited to changing the Scroll selected item into view toggle. This option allows to significantly improve the performance while navigating the Large Assembly. You can download this macro here.
Navigating the assembly tree
Working in Large Design Review mode may require activating sub-components or drawings. Especially as SOLIDWORKS allows some editing functionality while in Large Design Review mode which enables the possibility to modify an assembly (e.g. insert new component and mates). It is however the limitation when using the Open Component or associated drawing from the SOLIDWORKS context menu as the target file will be opened fully resolved which can affect the performance.
The following macro allows to open any selected component (or components) in its own window preserving Large Design Review mode for assemblies or view-only mode for parts. The component will be activated in the referenced configuration of the component.
If the referenced configuration is not active, it is required to add the display data mark. This macro can help
Furthermore, this macro can also work from drawings opened in detailing mode allowing to open assembly components in the Large Design Review mode.
This macro enables similar functionality, but it will open associated drawings in the detailing mode.
Unlike built-in functionality to open drawing from the component, this macro does not require drawings to be named the same as components or reside in the same folder. If there are multiple drawings linked to the component - all those drawing will be opened.
Tip on getting the icons for the macro buttons
Most of the icons associated with macros in the CodeStack are scalable vector graphics files (.SVG) which are supported by Toolbar+. You can download these icons and use them in your custom toolbars.
Managing custom properties
Properties+ module of the CAD+ toolset allows managing properties in the batch mode within the grid. This functionality is also available in the assembly loaded in Large Design Review mode. Properties can be accessed without loading components into memory which enables instant modifications for hundreds or even thousands of documents.
Even more, Properties+ can modify properties directly from Windows File Explorer.
This module is not yet publicly available and will be a part of CAD+ Standard package. For any inquiries, please send e-mail to info@xarial.com
Managing Bill Of Materials
Bill of Materials cannot be accessed from the assembly loaded in the Large Design Review mode. Sometimes it might be required to export the Bill Of Materials of the large assembly and import it to other systems (such as ERP or PLM). Currently, it is only possible by fully loading assembly or drawing and exporting BOM table. But fortunately, SOLIDWORKS API provides a way to get this information from the assembly opened in Large Design Review mode. BOM+ module from CAD+ toolset enables composing the Bill Of Materials as well as exporting this to various formats, including Excel, CSV, XML from assembly opened in the Large Design Review mode or even from Windows File Explorer.
Furthermore, BOM+ provides a new way to work with non-modeled items and hardware components, allowing to replace physical components with lightweight metadata attached to SOLIDWORKS entities, still preserving the accurate Bill Of Materials. As the result, the number of graphics triangles can be reduced hundreds of times.
This module is not yet publicly available and will be a part of CAD+ Professional package. For any inquiries, please send e-mail to info@xarial.com
Improving Batch operations performance
Free and open-source Batch+ utility is a part of CAD+ Toolset that lets you run macros for all files within the specified folder or folders. Batch+ was developed with resilience in mind which enables the automatic management of the sessions and recovery from 'disasters' (such as hanging or crashing of SOLIDWORKS). This ensures that your large job can be completed successfully.
As we have already learned certain APIs are available while in Large Design Review mode in assemblies or Detailing mode for drawings. This means that batch performance can be improved by leveraging this mode. If you want to export PDFs out of your drawings, just enable the 'Rapid' mode in Batch+ and this can improve the exporting performance dozens of times. Use this macro in conjunction with Batch+ to output the files in the desired format.
If you are new to Large Assemblies and Detailing Drawing or want to improve your workflow register for SOLIDWORKS Large Assembly and Drawing Workshop.