Generated by All in One SEO Pro v5.0.1.1, this is an llms-full.txt file, used by LLMs to index the site. # BLUE BYTE SYSTEMS INC. SOLIDWORKS, CAD & PLM Experts Blue Byte Systems builds SOLIDWORKS and PDM automation tools, including PDMPublisher and PDMShell, plus custom API solutions for CAD, PDM, ERP, and PLM workflows. ## Posts ### [SOLIDWORKS Macro to Save Assembly As Part (All Components)](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-all-components/) **Published:** October 29, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#description) This macro automates the process of saving a SolidWorks assembly as a single part file that includes all components. It is particularly useful for simplifying assemblies for external use or reducing file size. ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#system-requirements) - **SolidWorks Version**: SolidWorks 2014 or newer - **Operating System**: Windows 7 or later ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#pre-conditions) - An assembly document must be open in SolidWorks. - The assembly must contain at least one part. ## Results[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#results) - The assembly will be saved as a single part file with [all components included](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-exterior-components/). ## Steps to Set Up the Macro[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#steps-to-setup-the-macro) ### 1. **Prepare the Assembly**:[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#1-prepare-the-assembly) - [Open the desired assembly in SolidWorks](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/). ### 2. **Run the Macro**:[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#2-run-the-macro) - Execute the macro to automate the process of [saving your assembly as a part file](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/). The SOLIDWORKS macro to save assembly as part ensures that all components are properly included, and the new file is created in the [same directory as the original assembly](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) with the `.SLDPRT` extension. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare SolidWorks objects and variables Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object Dim swModelDocExt As SldWorks.ModelDocExtension ' Extension object for model operations Dim FilePath As String ' Full file path of the active document Dim PathSize As Long ' Length of the file path string Dim PathNoExtension As String ' File path without extension Dim NewFilePath As String ' Path for the new part file Dim nErrors As Long ' Variable to store errors during save operation Dim nWarnings As Long ' Variable to store warnings during save operation ' Main subroutine to perform the save operation Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swModelDocExt = swModel.Extension ' Get the full path of the active assembly file FilePath = swModel.GetPathName PathSize = Strings.Len(FilePath) ' Remove the extension from the file path to prepare for the new part file PathNoExtension = Strings.Left(FilePath, PathSize - 6) ' Create the new file path with ".SLDPRT" extension NewFilePath = PathNoExtension & "SLDPRT" ' Set the user preference to save the assembly as a part with all components included swApp.SetUserPreferenceIntegerValue swSaveAssemblyAsPartOptions, swSaveAsmAsPart_AllComponents ' Save the assembly as a part file swModelDocExt.SaveAs NewFilePath, swSaveAsCurrentVersion, swSaveAsOptions_Silent, Nothing, nErrors, nWarnings ' Provide feedback to the user If nErrors = 0 And nWarnings = 0 Then MsgBox "Assembly successfully saved as part: " & NewFilePath, vbInformation, "Success" Else MsgBox "Save operation completed with errors or warnings." & vbCrLf & _ "Errors: " & nErrors & vbCrLf & "Warnings: " & nWarnings, vbExclamation, "Attention" End If End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_Assy_As_Part_(All_Parts).swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/SaveAssyAsPart%28All%20Parts%29.html#customization) Need to modify the macro to meet specific requirements or integrate it with other processes? We provide [custom macro development](https://bluebyte.biz/macros/the-vba-macro-to-automate-sketch-editing-in-solidworks/) tailored to your needs. [Contact us](https://bluebyte.biz/contact). **Categories:** macros **Tags:** solidworks assembly --- ### [How to Get a Free PDMPublisher Trial License](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) **Published:** August 4, 2026 **Author:** Amen Jlili **Content:** [![](https://bluebyte.biz/wp-content/uploads/2025/09/PDMPublisher-01-1024x1024.png)](https://bluebyte.biz/wp-content/uploads/2025/09/PDMPublisher-01.png) PDMPublisher helps SOLIDWORKS PDM Professional users automatically generate, export PDF, DXF. It is a great alternative to the convert task and combine documents. You can request a free PDMPublisher trial license through the Blue Byte Systems online store.This article explains how to submit your request, install the software, and activate your trial. ## System requirements Before requesting a trial, confirm that your environment meets these minimum requirements: - SOLIDWORKS 2018 or later - SOLIDWORKS PDM Professional 2018 or later PDMPublisher requires SOLIDWORKS PDM Professional and does not support SOLIDWORKS PDM Standard. ## Request your free trial 1. Open the PDMPublisher trial page in the Blue Byte Systems online store. 2. Review the product information and system requirements. 3. Select the number of seats that best represents your team. 4. Select **Add to cart**. 5. Open your shopping cart and proceed to checkout. 6. Enter the requested contact and company information. 7. Confirm that the product is listed as **PDMPublisher (Trial)**. 8. Confirm that the total due is **US$0.00**. 9. Submit the order. The seat pricing displayed on the product page is provided for reference only. You will not be charged for the trial request. > **Important:** Before submitting your order, verify that the checkout total is **US$0.00** and that the selected product is **PDMPublisher (Trial)**. ## What happens after submitting your request? After submitting the order, you will receive a confirmation email containing instructions for downloading, installing, and activating PDMPublisher. Your request may need to be reviewed by Blue Byte Systems before the trial license is issued. Make sure the contact and company information provided during checkout is accurate. ## Install and activate PDMPublisher After receiving your trial license: 1. Install PDMPublisher using PDMDeploy or follow the installation instructions included in your confirmation email. 2. Open the PDMPublisher license activation utility. 3. Enter or apply the trial license information provided in the email. 4. Confirm that the license activates successfully. 5. Set up and run your first PDMPublisher task. **Categories:** PDMPublisher, SOLIDWORKS, SOLIDWORKSPDM **Tags:** export pdf, pdmpublisher, solidworks pdm, trial --- ### [Why Serial Numbers and Folder Number Ranges Keep Your SOLIDWORKS PDM Vault Fast](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) **Published:** August 14, 2026 **Author:** Amen Jlili **Content:** Every PDM administrator eventually runs into the same argument. One camp says the vault is a database, so folders are irrelevant and you should just search for what you need. The other camp says folders matter, because the day the “LIBRARY” folder takes forty seconds to open, everybody notices. Both camps are right, and the resolution is not a compromise between them. It is a naming convention. ## The debate, as it actually plays out A [thread on the MyCAD forum](https://forum.mycad.visiativ.com/t/gestion-pdm-minimaliste-ou-beaucoup-de-dossiers/107143?locale=en&lang=en) captures this perfectly. A user asked whether SOLIDWORKS PDM should use a minimalist structure with one big library folder, or many categorized folders. His reasoning was sound: search by number and by data card variables should find the file, so why maintain a tree at all? The problem was that his company had already tried it. They started with a single `LIBRARY` folder and split it into *Assembly*, *Parts*, *Plans* and *Others* precisely because “the loading when opening the LIBRARY folder was long.” Other users in the thread confirmed the pattern from their own vaults, with one noting that PDM “starts to have slowness and stability from 3000” files in a folder. Treat that figure as a field observation rather than a published limit. It still lines up with what most administrators see. Somewhere in the low thousands of files per folder, browsing stops feeling instant. The most interesting suggestion in the thread came from a user who proposed keeping a minimal tree indexed by numerical ranges, since every file in his vault already carried an 8-digit auto-generated number. That single idea is the subject of this article. ## Why folders still cost you something SOLIDWORKS PDM is a database-backed system, so it is tempting to assume the folder structure is cosmetic. It isn’t, because folders are what the *client* enumerates. When a user expands a folder in the local view, the client has to reconcile every child item in that folder: name, current version, local version, state, checked-out-by, locked status, plus whatever data card columns the administrator chose to display. That reconciliation happens over the network against the archive server and the SQL database, and it happens for every item in the folder, not just the one the user wants. Put ten thousand parts in one folder and you have created a request that is ten thousand items wide, triggered every time somebody clicks the folder. Add a cold cache, a remote site over a WAN, or a replicated archive, and the cost multiplies. Meanwhile the SQL side pays for it too. Folder-scoped queries, permission evaluation, and column population all scale with the number of children. Search, by contrast, is indexed and cheap. That is exactly why the “just search for it” camp has a point. It is also exactly why it doesn’t save you. Users still browse. New engineers browse, subcontractors browse, and everyone browses when they don’t know the number yet. ## Why category folders are the wrong fix Splitting `LIBRARY` into *Parts*, *Assemblies* and *Drawings* helps for about a year. Then the *Parts* folder is the new *LIBRARY*. Category-based structures have three structural weaknesses. **They don’t bound growth.** A category folder grows without limit. Nothing in the scheme tells you when to split it, so it gets split reactively, after the slowdown rather than before. **They require judgment.** Is a purchased weldment a *Part* or an *Assembly*? Is a fixture a *Tool* or a *Component*? Every ambiguous case is a decision, and different people decide differently. As one forum participant pointed out, category navigation only works when metadata is properly populated in the first place, and if the metadata is that good, you didn’t need the categories. **They make files move.** Reclassify a component and it changes folder. Folder-based permissions, folder-based workflows and anything downstream that cached a path now have to follow it. Categories are metadata. Your vault already stores metadata, and it stores it better than a directory tree can. ## The fix: serial numbers plus numeric range folders The alternative is to stop treating the folder as a taxonomy and start treating it as an **address**. Give every file a serial number from the PDM serial number generator. Then place it in a folder determined mechanically by that number, where the first digits define the bucket. [![](https://bluebyte.biz/wp-content/uploads/2026/08/image.png)](https://bluebyte.biz/wp-content/uploads/2026/08/image.png)This structure earns its keep in five ways. - It is deterministic. Given a file number, you know its folder without asking anyone. Given a folder, you know exactly which numbers it holds. No convention document, no tribal knowledge. - It bounds folder size by construction. A `4000-4999` folder physically cannot exceed 1,000 items. You never wake up to a 12,000-file folder, because the scheme won’t let you build one. If 1,000 is still too many for your workload, use a tighter range such as `4000-4099`, or add a second level for 8-digit numbers, such as `12000000-12009999\12003000-12003999`. - Files never move. A serial number is assigned once and never changes. Neither does the folder. Revisions, reclassifications and lifecycle changes all happen in place, so folder permissions and cached paths stay valid for the life of the part. - It scales predictably. Growth adds folders, not folder *depth*, and each new folder arrives pre-sized. Capacity planning becomes arithmetic. - Search still works exactly as before. This is the part the minimalist camp cares about, and nothing is lost. The variable search, the data card search and the “where used” navigation are all unaffected. You have simply given every file a stable, boring physical home so browsing doesn’t punish you. ## Serial numbers beat descriptive filenames A related habit is worth breaking at the same time: filenames like `BRACKET-LEFT-REV-B-FINAL.SLDPRT`. Descriptive filenames encode information that changes. Revisions change, descriptions get corrected, projects get renamed, and each of those events tempts someone into renaming the file. Renames in a CAD environment are exactly as expensive as they sound. A serial number encodes nothing but identity. The description lives on the data card, where it can be edited freely. The revision lives in the workflow, where it belongs. The number stays fixed from first save to end of life. That is what makes ERP integration, supplier packages and long-term traceability work, and what makes numeric range folders possible in the first place. ## The half everyone forgets: your exports Here is where most well-organized vaults quietly undo their own work. The vault is disciplined. The published output is not. PDFs, DXFs and STEP files land in one flat network folder because that’s what the export task was configured to do on day one. Two years later that folder has 40,000 files in it. Unlike the vault, it has no database in front of it, no indexed search, and no client-side caching. It is a raw Windows share being browsed by the shop floor, purchasing and your suppliers, all of whom navigate by folder because that is all they have. The performance argument that justified organizing the vault applies with more force to the export target, not less. ## Automating it with [PDMPublisher](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher") This is why PDMPublisher exposes File number range as a path variable. [![](https://bluebyte.biz/wp-content/uploads/2026/08/image-1.png)](https://bluebyte.biz/wp-content/uploads/2026/08/image-1.png)In the Output section of the task properties, the Export Location is assembled from tokens rather than typed as a literal path: ``` [Vault root folder]\Released\[File number range (first 4 digits)]\[File name without extension] ``` PDMPublisher evaluates that expression per file at publish time. Part `4127` publishes to `...\Released\4000-4999\`, part `7318` publishes to `...\Released\7000-7999\`, and the folders are created as needed. The practical effect is that your published output mirrors the discipline of your vault automatically. No scripts, no scheduled sorting job, no one manually filing PDFs. Run it as a SOLIDWORKS PDM task on a workflow transition and every approved drawing files itself into the correct range folder the moment it is released. ## A short checklist - Turn on the PDM serial number generator and make the number the filename. - Choose a range size that keeps folders under roughly a thousand items, and leave headroom. - Create the range folders up front, empty. Nesting a second level costs nothing and saves a migration later. - Apply folder permissions to ranges, not to categories. - Point your export tasks at the same range structure so published files inherit it. - Keep descriptions and classifications on the data card, where they can change without touching the file. The goal is not a beautiful folder tree. It is a folder tree nobody has to think about, one that stays fast at 200,000 files because no single folder ever holds more than a thousand. Want to try it on your own vault? PDMPublisher runs as a SOLIDWORKS PDM task and supports PDF, 3D PDF, DWG, DXF, STEP, IGES, X\_T, STL, 3MF, IFC and more, with dynamic export locations like the one shown above. [ Request a free 7-day trial ](https://bluebyte.biz/product/pdmpublisher-trial/) [ Schedule a live demo ](https://calendly.com/bluebyte/pdm-convert-extended-demo-and-qa) **Categories:** PDMPublisher, SOLIDWORKS, SOLIDWORKSPDM **Tags:** pdmpublisher, solidworks pdm --- ### [Using Claude with SOLIDWORKS PDM through the PDMShell MCP Server](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) **Published:** August 1, 2026 **Author:** Amen Jlili **Content:** Most SOLIDWORKS PDM administrators are used to working through Windows Explorer, administration tools, scripts, and custom add-ins. These tools are powerful, but even a simple question can require several steps. For example: - How many files are in this folder? - Which files are currently checked out? - Who has a particular file checked out? - What state or revision is this file in? - Can I undo the checkout on a specific file? The PDMShell MCP Server provides another way to work with this information. It connects Claude to SOLIDWORKS PDM through PDMShell, allowing users to ask questions about their vault using normal language. ## What is MCP? MCP stands for Model Context Protocol. It provides a standard way for an AI application such as Claude to connect to external tools and data sources. Claude does not connect directly to the PDM database. Instead, it sends a structured request to the PDMShell MCP Server. PDMShell then performs the requested operation through the SOLIDWORKS PDM environment and returns the result. The basic flow is: **Claude → PDMShell MCP Server → SOLIDWORKS PDM Vault** This gives Claude access to specific PDM tools without requiring the user to write a command or API application for every request. ## A practical example In my test vault, I asked Claude:“Can you tell me how many files are in the Unreleased PDFs folder?” Claude used the PDMShell MCP Server to inspect the folder and returned the number of files. It also identified which files were checked in and which file was checked out. I could then follow up with: “Can you undo the checkout on the file ending in R\_002?” Because Claude already had the context from the first request, I did not need to enter the complete file path again. This is where the connection becomes useful. It is not only a chatbot answering general PDM questions. It can use tools provided by PDMShell to retrieve current information from the vault and, when permitted, perform an operation. ## Why use natural language? PDMShell already provides commands for automating common PDM operations. The MCP Server adds a conversational layer on top of those tools. Instead of remembering the exact syntax of a command, a user can describe the result they need. Claude interprets the request, selects the appropriate PDMShell tool, and presents the result in a readable format. This could be useful for: - Finding files and folders - Reviewing file information - Checking file status and metadata - Identifying checked-out files - Investigating vault problems - Running approved PDM operations - Building more advanced PDM automation workflows It can also help administrators explore a problem before deciding what action to take. ## Permissions still matter Connecting Claude to PDM should not bypass the existing security model. PDMShell operates within the permissions of the logged-in PDM user. If that user cannot access a folder or perform an operation, the MCP Server should not provide a way around that restriction. Write operations also need to be handled carefully. Reading the contents of a folder is very different from deleting a file, changing metadata, or undoing another user’s checkout. For that reason, the server should expose only the tools that are required. Important actions should also be reviewed before they are executed. ## This does not replace PDM administrators The goal is not to let AI make uncontrolled decisions inside a production vault. PDM administrators still define the workflows, permissions, variables, naming rules, and automation requirements. Claude provides a simpler way to interact with the tools that have been made available through PDMShell. The administrator remains in control of what Claude can access and which operations it can perform. ## Where this can go next The first use cases are straightforward: search the vault, inspect folders, read file information, and perform controlled file operations. The more interesting possibilities come from combining several operations. A user could ask Claude to identify files matching specific conditions, summarize the results, and prepare the next action for approval. That could make routine PDM administration faster while still keeping the vault’s permissions and business rules in place. The PDMShell MCP Server is an early step toward making SOLIDWORKS PDM easier to work with through modern AI tools. It combines the automation capabilities of PDMShell with Claude’s ability to understand normal language and maintain context throughout a conversation. **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** claude, solidworks pdm --- ### [PDMShell vs. PowerShell: The CAD Admin’s Guide to Engineering Automation](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) **Published:** June 27, 2026 **Author:** Amen Jlili **Content:** [![PDMShell workflow editor showing a dark IDE interface with a flowchart: Begin circle → Check out → Navigate to a vault folder → Run SOLIDWORKS Macro → Check in → + Add a new action; right panel labeled Command Parameters with fields for directory and id; bottom purple console line reading 'Good evening, jilili! Welcome to PDMShell.'](https://bluebyte.biz/wp-content/uploads/2026/06/visual-code-editor-templated-macro-run-1024x406.png)](https://bluebyte.biz/wp-content/uploads/2026/06/visual-code-editor-templated-macro-run.png) If you work in engineering IT or CAD administration, you’ve likely spent hours trying to make different software systems talk to each other. When searching for ways to automate these clunky processes, two tools with confusingly similar names always pop up: PowerShell and PDMShell. They sound like variations of the same thing, but they aren’t. One is a massive tool built by Microsoft for managing entire corporate networks. The other is a sharp, niche utility built by Blue Byte Systems specifically for SOLIDWORKS PDM Professional. Let’s break down what they actually do, how they differ, and why you might end up using both. The easiest way to understand the difference is by looking at what they were built to control. PowerShell is for your entire operating system and cloud environment. PDMShell is strictly for your SOLIDWORKS PDM vault. FeaturePowerShellPDMShell**What does it control?**Windows, cloud servers, and networksSOLIDWORKS PDM vaults only**Who made it?**MicrosoftBlue Byte Systems Inc.**How do you use it?**Advanced programming (.NET objects)Simple text scripts (`.pdmshell`)**Who is it for?**IT Admins and DevOps EngineersCAD Admins and Data Managers**How do you get it?**Built right into WindowsDownload from pdmshell.com![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSauVJXN4gwhqc_J6uH9OAGNDdwk3vSnQwNGyPf_ZFDFfmMvIu7a1noYZx8&s=10) PowerShell is Microsoft’s heavy-duty automation framework. It is incredibly powerful because it doesn’t just read plain text; it understands actual data objects. If an IT admin needs to create 50 new user accounts in Active Directory, back up a server to the cloud, or update software registry keys across an entire department, they use PowerShell. The downside? It has a steep learning curve. Because it is a full programming language tied to Microsoft’s .NET framework, you need a decent grasp of coding logic and complex syntax to get anything done. [![](https://bluebyte.biz/wp-content/uploads/2025/05/data-migration-with-pdmshell-1024x590.jpeg)](https://bluebyte.biz/wp-content/uploads/2025/05/data-migration-with-pdmshell.jpeg) PDMShell: The SOLIDWORKS Short-Cut. If you’ve ever tried to customize SOLIDWORKS PDM, you know that interacting with its API usually requires writing complex C# or VB.NET code in Visual Studio. For a CAD manager who just wants to get a job done, this is often overkill. That is why Blue Byte Systems built PDMShell. It acts as a friendly middleman for the complex PDM API. Instead of writing lines of heavy code, you write simple text scripts using straightforward, built-in commands like `checkout`, `checkin`, or `addtovault`. [It plugs right into your existing PDM Tasks and Dispatch actions, letting you automate boring vault tasks without needing a degree in software engineering.](https://bluebyte.biz/product/pdmshell/ "PDMShell") **Categories:** PDMShell, SOLIDWORKSPDM **Tags:** solidworks api, solidworks pdm --- ### [PowerShell PDMShell Search Command: Complete Guide for SOLIDWORKS PDM Administrators](https://bluebyte.biz/solidworks/solidworkspdm/powershell-pdmshell-search-command-complete-guide-for-solidworks-pdm-administrators/) **Published:** November 28, 2025 **Author:** Amen Jlili **Content:** PDMShell gives SOLIDWORKS PDM administrators the ability to run precise, scriptable, and automated operations across large sets of files, and the PowerShell PDMShell search command is at the center of that capability. One of its most powerful features is the unified search syntax unlocks a completely different level of control over your PDM vault. [![PowerShell PDMShell Search Command and Screenshot showing a split view of SOLIDWORKS PDM tools in dark mode. On the left is a PDMSHELL (PDMShell 3.0.6.0) console window with a completed search command highlighted in red: search --search "Name=%.sldprt;Recursive=true;@Document Number=143" The results show two files found: membrane.sldprt EdmObject_File On the right is the regular SOLIDWORKS PDM Explorer window open to a “Speaker” folder. The same file “membrane.sldprt” is selected (highlighted with a red border). Its data card in the lower pane shows: Document Number: 000143 (highlighted in red) Description: 1” 3 Material: Revision: A-01 The image demonstrates using PDMSHELL to quickly search the vault for all part files that have Document Number 143, instantly locating and highlighting the matching file “membrane.sldprt” in the vault.](https://bluebyte.biz/wp-content/uploads/2025/11/image-8-1024x589.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-8.png) Consider the following search command: ``` pdmshell -search "Name=%.sldprt;Recursive=true;@Document Number~143" ``` At first glance, it may appear complicated, but every element serves a clear purpose and is easy to understand once broken down. ## Name=%.sldprt This filter targets all part files (SLDPRT) using a wildcard pattern. The use of % allows flexible pattern matching, returning any file that ends with .sldprt regardless of prefix or naming convention. ## Recursive=true This instructs PDMShell to search not only the current folder, but all subfolders beneath it. This is especially important for large vaults, deep project structures, or multi-level assemblies. ## @Document Number~143 This uses a variable-based search. PDMShell looks up the PDM variable named “Document Number” and applies a contains (~) comparison against the value 143. Variable search supports all standard comparison operators, including equals, greater than, less than, contains, and more. What makes this system so powerful is that the same search filter can be passed into a wide range of PDMShell commands. You write the search once, and then apply it to whatever action you need to perform. Below are the PDMShell commands that fully support the -search parameter, along with direct documentation links: ### Version Control frogleap (increment, decrement, or manage versions) ### Bulk Variable Updates setvar (update PDM variables in bulk) ### File Removal delete (soft-delete matching files) destroy (permanently remove matching files) ### Local Cache Retrieval get (retrieve files to local cache) ### Publishing and Exporting export (PDF, DXF, STEP, and custom publishing) ### SOLIDWORKS Automation runswmacro (open SOLIDWORKS and execute a macro on each file) ### File State Management checkout checkin [If you would like more examples, additional documentation, or help building automated workflows, reach out anytime.](https://bluebyte.biz/contact/ "Contact") **Categories:** data migration, SOLIDWORKSPDM --- ### [Automate Weekly SOLIDWORKS PDM Check-Ins with PDMShell and Windows Task Scheduler](https://bluebyte.biz/solidworks/solidworkspdm/automate-weekly-solidworks-pdm-check-ins-with-pdmshell-and-windows-task-scheduler/) **Published:** June 3, 2026 **Author:** Amen Jlili **Content:** This article explains how to use PDMShell with Windows Task Scheduler to automatically check in files from a SOLIDWORKS PDM vault folder on a weekly schedule. [PDMShell ](https://bluebyte.biz/product/pdmshell/ "PDMShell")is a command-line tool for SOLIDWORKS PDM that allows administrator to run PDM operations from scripts. By combining PDMShell with Windows Task Scheduler, you can automate recurring PDM tasks such as logging in to a vault, navigating to a folder, searching for files, and checking in files. Before setting this up, make sure [PDMShell ](https://pdmshell.com)is installed on the computer that will run the scheduled task. The computer must also have a local PDM vault view, and the Windows account running the task must have access to that vault view. The same user must also have permission to check in the files. In most SOLIDWORKS PDM environments, a user can only check in files that are checked out by that same user. If the files are checked out by another user, the scheduled task will not be able to check them in unless you have a controlled administrative process in place. Click on the Open button then click on Browse PDMShell.com scripts… [![](https://bluebyte.biz/wp-content/uploads/2026/06/image.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image.png)Download the script called Check In All Files: [![](https://bluebyte.biz/wp-content/uploads/2026/06/image-1-1024x719.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image-1.png)When the download completes, please click Yes to confirm this dialog: [![](https://bluebyte.biz/wp-content/uploads/2026/06/image-2.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image-2.png)PDMShell will load the downloaded script in the Visual Editor: [![](https://bluebyte.biz/wp-content/uploads/2026/06/image-3-1024x388.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image-3.png)If you click on the check-in box, you will the parameters of the command. [![](https://bluebyte.biz/wp-content/uploads/2026/06/image-5.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image-5.png)In this instance, the command does a search for all checked out files recursively and check them into the vault. The check options configure the check-in operation. The script will eventually terminate the PDMShell application when done through the Exit PDMShell action: [![](https://bluebyte.biz/wp-content/uploads/2026/06/image-6.png)](https://bluebyte.biz/wp-content/uploads/2026/06/image-6.png)Before scheduling the script, test it manually from Command Prompt: ``` "C:\Program Files\Blue Byte Systems Inc\PDMShell\pdmcli.exe" runscript "C:\Scripts\WeeklyCheckIn.pdmshell" ``` Update the path to `pdmcli.exe` if PDMShell is installed in a different location. Once the script works manually, open Windows Task Scheduler and create a new task. On the General tab, use a name such as: ``` Weekly PDM Check-In ``` Select the option to run whether the user is logged on or not. Also enable the option to run with highest privileges. The task should run under the same Windows account that has access to the vault view and owns the checked-out files. On the Triggers tab, create a weekly trigger. For example, you can run the task every Friday at 6:00 PM. On the Actions tab, create a new action using Start a program. Program/script: ``` C:\Program Files\Blue Byte Systems Inc\PDMShell\pdmcli.exe ``` Add arguments: ``` runscript "C:\Scripts\WeeklyCheckIn.pdmshell" ``` Start in: ``` c:\Program Files (x86)\BLUE BYTE SYSTEMS INC\pdmshell ``` On the Conditions tab, review the power and network options. If the task runs on a workstation, make sure the machine is online and connected to the PDM archive server when the task starts. On the Settings tab, it is recommended to allow the task to be run on demand, run the task as soon as possible after a scheduled start is missed, stop the task if it runs longer than a reasonable time, and prevent a new instance from starting if the task is already running. For production usage, keep the script focused on a controlled folder instead of running it against the entire vault. For example: ``` Checkin -search "Name=%;Locked=true;Recursive=true" -comment "checked in by script" -Checkinoptions "EdmUnlock_IgnoreCorruptFile+EdmUnlock_IgnoreRefsOutsideVault+EdmUnlock_IgnoreRefsNotLockedByCaller" quit -silent ``` PDMShell and Windows Task Scheduler provide a simple way to automate recurring SOLIDWORKS PDM maintenance tasks. For production environments, always test the script on a small folder first and make sure the scheduled task runs under the correct Windows and PDM user. Few considerations: - Before scheduling PDMShell scripts, make sure automatic login is enabled in SOLIDWORKS PDM and PDMShell. This allows PDMShell to connect to the vault using the Windows/PDM session of the logged-in user, instead of hard-coding usernames and passwords inside scripts. - This approach is more secure and easier to maintain, especially for scheduled tasks. - You will also need PDMShell Premium, since scheduled and unattended automation scenarios require the premium command-line capabilities. - Finally, the scheduled script must run on the computer of the user who has the correct PDM access, local vault view, and automatic login configured. The Windows Task Scheduler job should run under that same Windows user account. **Categories:** PDMShell, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [SOLIDWORKS Task Pane Icons: Fixing Transparency Issues](https://bluebyte.biz/solidworks/solidworks-task-pane-icons-fixing-transparency-issues/) **Published:** May 17, 2026 **Author:** Amen Jlili **Content:** When creating a SOLIDWORKS task pane, the SOLIDWORKS API documentation says that icon transparency can be handled by using a specific background color. For `CreateTaskpaneView3`, the documentation explains that task pane bitmap images should use a 256-color palette, and that the transparent area should use the following color: ``` RGB(192, 192, 192) ``` The expectation is simple: wherever the icon uses that gray color, SOLIDWORKS should treat it as transparent. In practice, that does not always work. You may create the icon exactly as described, use the correct gray background color, and still see a gray box behind the icon inside SOLIDWORKS. The documentation suggests that this gray color should be treated as transparent. However, when the task pane loads, SOLIDWORKS may still display the gray background. This can make the task pane icon look unfinished or inconsistent with the rest of the SOLIDWORKS interface. This usually means the image background was not actually transparent. It was only colored gray, and SOLIDWORKS did not remove it during rendering. ## The Solution: I have not been able to verify this for older version of SOLIDWORKS. Instead of depending on SOLIDWORKS to interpret `RGB(192, 192, 192)` as transparent, remove the background from the image and save it as a PNG with real transparency. This gives SOLIDWORKS a cleaner image to work with and avoids the visible gray background issue. Use an image editor that supports real PNG transparency and layers. I highly suggest good old mspaint.exe. This works great if you are on Windows 11 with the AI-enabled MSPaint. The general process is: - Open the icon. - Select the entire image. - Use Magic Erase to remove the selected background color. - Open the Layers panel: [](https://bluebyte.biz/wp-content/uploads/2026/05/image.png) [![](https://bluebyte.biz/wp-content/uploads/2026/05/image-1.png)](https://bluebyte.biz/wp-content/uploads/2026/05/image-1.png)- Select the bottom icon layer. - Right-click the bottom background layer: [![](https://bluebyte.biz/wp-content/uploads/2026/05/image-2.png)](https://bluebyte.biz/wp-content/uploads/2026/05/image-2.png)- Choose Hide Background. You will get something similar this: [![](https://bluebyte.biz/wp-content/uploads/2026/05/image-3.png)](https://bluebyte.biz/wp-content/uploads/2026/05/image-3.png)- Save the file as a PNG. After saving, the background should be truly transparent instead of just colored gray in SOLIDWORKS. **Categories:** SOLIDWORKS **Tags:** solidworks api --- ### [How to Export Flat Patterns with PDMPublisher](https://bluebyte.biz/macros/how-to-export-flat-patterns-with-pdmpublisher/) **Published:** November 21, 2025 **Author:** Amen Jlili **Content:** With [PDMPublisher](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher"), exporting flat patterns from a top-level SOLIDWORKS assembly is completely automated and requires no manual steps.If you have ever wondered how to export flat patterns with PDMPublisher in a reliable, hands-off way, this workflow makes the entire process effortless. ### Step 1: Set the Export Location In this example, the export location is defined as the **DXF** subfolder inside the **C:\\Export** directory. [![Screenshot of a small section of a SOLIDWORKS PDM task configuration dialog focusing on the "Output" settings. The collapsible "Output" panel is expanded, showing a field labeled "Export Location" with the value "C:\Export\DXF". Below it, the evaluated (resolved) value is displayed in gray text as "C:\Export\DXF". To the right are three buttons: a folder icon ("...") for browsing, a question mark for help, and a "Browse..." button. At the bottom right is a checkbox labeled "Customize Location..." alongside a small folder icon. This section defines where exported DXF files will be saved when the task runs.](https://bluebyte.biz/wp-content/uploads/2025/11/image.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image.png) By enabling **“Export file references individually,”** both the main assembly and its referenced parts will be processed automatically. [![](https://bluebyte.biz/wp-content/uploads/2025/11/image-1.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-1.png)### Step 2: Enable Flat Pattern Export [![Screenshot of a section of a SOLIDWORKS PDM task configuration dialog showing two export-related checkboxes. The first checkbox is unchecked and labelled "Archive all exported documents (.zip)". The second checkbox is also unchecked and labelled "Export sheet metal parts to 1:1 flat pattern DXF". To the right of the second option is a grey "Flat Pattern Settings" button and a small question mark help icon. This section allows the user to optionally create a ZIP archive of all exported files and to automatically export sheet metal parts as full-scale flat pattern DXF files during the task execution.](https://bluebyte.biz/wp-content/uploads/2025/11/image-2.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-2.png) Next, check the option **“Export sheet metal part to **1:1**** **[flat pattern DXF](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/).”** This ensures that only [sheet metal components](https://bluebyte.biz/macros/solidworks-macro-to-export-sheet-metal-to-dxf-in-solidworks/) are exported as clean, accurate flat patterns that are ideal for manufacturing. ### Step 3: Define the Naming Convention [File names](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-stop-using-file-names-in-pdm-automation-heres-why-ids-are-better/) are automatically built using the part number (or item name) followed by the revision. This keeps every exported file organized and traceable within your vault or output folder. ### Step 4: Apply Filters (Optional) [![Screenshot of the PDMPublisher add-in window in SOLIDWORKS PDM, showing the "Conditions" tab. The toolbar at the top displays buttons for Export, Import, and Help. Below is a data mapping grid with one active rule highlighted in green. The rule is configured as an AND/OR condition set to OR, with three columns: FileName (column header) → condition "TextEqualTo" → value "*.sldprt" (with a green checkmark indicating the rule is valid) Configuration Name column has a red X (indicating no condition applied to configurations) A red circle with an X also appears on the right side of the row. This condition means the task will apply only to files whose names end with ".sldprt" (SOLIDWORKS part files), regardless of configuration. The interface is used to define which files the publisher task will process during export or conversion.](https://bluebyte.biz/wp-content/uploads/2025/11/image-3.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-3.png) To avoid processing every component, you can apply filename filters. In this case, the export was limited to parts named **base\_shape** and **control\_panel**, allowing targeted processing for selected models. ### Step 5: Publish Finally, click **Publish**. [PDM Publisher](https://bluebyte.biz/solidworks/pdmpublisher-for-solidworks-automate-your-drawing-exports-like-never-before/) will begin processing the top-level assembly and its references, loading them into memory, extracting each flat pattern, and saving them to the target folder automatically. ### Step 6: Review the Results Once complete, your DXF flat pattern files are ready for fabrication, organized, clean, and consistent. **Categories:** macros --- ### [SOLIDWORKS API Memory Access Violations Caused by GDI Object Count and Unreleased COM Objects](https://bluebyte.biz/solidworks/solidworks-api-memory-access-violations-caused-by-gdi-object-count-and-unreleased-com-objects/) **Published:** March 29, 2026 **Author:** Amen Jlili **Content:** [![](https://bluebyte.biz/wp-content/uploads/2026/03/image-1024x411.png)](https://bluebyte.biz/wp-content/uploads/2026/03/image.png)When building long-running SOLIDWORKS API tools, crashes are not always caused by high RAM usage. One of the most common causes of instability is excessive GDI object usage combined with unreleased COM objects. This often appears during batch automation jobs where SOLIDWORKS repeatedly opens documents, makes them visible, generates previews, switches windows, or captures images. The most typical symptom is the “Memory access violation” exception which tends to crash SOLIDWORKS. In many cases, the real issue is that GDI objects are slowly accumulating until the process reaches the Windows limit. ## What Causes GDI Object Leaks? GDI objects are Windows resources used for UI rendering. They include: - Bitmaps - Graphics objects - Pens - Brushes - Fonts - Icons - Window handles - Preview images In the SOLIDWORKS API, GDI count can increase rapidly if you repeatedly: - Open and activate documents - Make documents visible - Switch between drawings, parts, and assemblies - Generate previews or screenshots - Create WinForms controls dynamically - Use `Bitmap`, `Graphics`, `Image`, `Font`, `Brush`, or `Pen` objects without disposing them At the same time, COM references to SOLIDWORKS objects can remain alive longer than expected if they are not released manually. Common SOLIDWORKS COM objects that should be released include: - `ModelDoc2` - `AssemblyDoc` - `DrawingDoc` - `Feature` - `Component2` - `Body2` - `Face2` - `Edge` - `View` - `SelectionMgr` Opening documents silently is usually much safer than opening them visibly. When a document is made visible, SOLIDWORKS creates additional windows, previews, feature manager graphics, graphics pipeline objects, and UI resources. For example: ``` swApp.Visible = true;var model = swApp.OpenDoc6(path, type, options, "", ref errors, ref warnings); ``` If this occurs repeatedly inside a large loop without proper cleanup, the GDI count can climb rapidly. This is especially common when processing: - Large assemblies - Drawings with many sheets - Thumbnail generation - Image export - PDF export - Batch previews - PDM task add-ins ## How to Monitor GDI Object Count You can monitor GDI usage directly in Windows Task Manager: 1. Open Task Manager 2. Go to the Details tab 3. Right-click the column header row 4. Choose Select Columns 5. Enable “GDI Objects” Watch the `SLDWORKS.exe` process while your code runs. If the GDI count keeps climbing and never comes back down, you likely have a leak. Once a process gets close to around 10,000 GDI objects, crashes and instability become much more likely. ## Best Practices to Avoid Crashes ### 1. Dispose Graphics Resources Always wrap GDI-related objects in `using` blocks: ``` using (Bitmap bmp = new Bitmap(width, height))using (Graphics g = Graphics.FromImage(bmp)){ g.Clear(Color.White); // Draw content here bmp.Save(outputPath);} ``` This applies to: - `Bitmap` - `Graphics` - `Font` - `Pen` - `Brush` - `Image` - `Icon` - `Stream` ### 2. Close Documents Immediately Never leave documents open longer than necessary: ``` ModelDoc2 model = null;try{ model = swApp.OpenDoc6(path, type, options, "", ref errors, ref warnings); // Process document}finally{ if (model != null) { swApp.CloseDoc(model.GetTitle()); Marshal.ReleaseComObject(model); model = null; }} ``` ### 3. Release COM Objects Aggressively SOLIDWORKS API objects often remain alive even after they go out of scope. Release them manually: ``` if (feature != null){ Marshal.ReleaseComObject(feature); feature = null;}if (component != null){ Marshal.ReleaseComObject(component); component = null;} ``` This is especially important in loops processing hundreds or thousands of components, features, faces, or bodies. ### 4. Periodically Force Garbage Collection For large batch operations, periodic garbage collection can help reduce memory pressure: ``` GC.Collect();GC.WaitForPendingFinalizers();GC.Collect(); ``` This should not replace proper disposal and COM cleanup, but it can help stabilize long-running jobs. ### 5. Prefer Silent Processing Whenever possible, process documents silently instead of visibly: ``` int options = (int)swOpenDocOptions_e.swOpenDocOptions_Silent; ``` This reduces UI overhead and significantly lowers GDI usage. ## Final Thoughts If your SOLIDWORKS API application crashes after [running for a long time](https://bluebyte.biz/solidworks/reporting-progress-for-long-operations-in-the-solidworks-api/), do not assume the issue is only RAM usage. Monitor GDI objects, dispose of graphics resources, close documents immediately, and aggressively release COM references. These small changes can make a major difference in the [stability of long-running SOLIDWORKS automation tools](https://bluebyte.biz/solidworks/most-useful-api-calls-to-optimize-solidworks-performance/), especially when processing large assemblies, exporting files, or generating previews. For large PDM tasks, image generation, PDF export, or batch automation jobs, careful cleanup is often the difference between a stable application and one that crashes after a few hundred files. **Categories:** SOLIDWORKS **Tags:** solidworks api --- ### [Automating Bill of Materials Extraction in SOLIDWORKS PDM Using the PDMShell BOM Command](https://bluebyte.biz/solidworks/solidworkspdm/automating-bill-of-materials-extraction-in-solidworks-pdm-using-the-pdmshell-bom-command/) **Published:** November 30, 2025 **Author:** Amen Jlili **Content:** *Ride of the Valkyries Alert 🎼 — Don’t listen if you don’t enjoy Wagner.* When you are managing complex assemblies inside SOLIDWORKS PDM, generating a bill of materials (BOM) is a routine task, but i’s also one of the most repetitive. This is exactly where the PDMShell BOM command becomes invaluable, eliminating manual exports and saving your from those small tasks quitely eat away engineering hours across large teams. PDMShell solves this problem with a simple but extremely powerful tool: the **[BOMCommand](https://pdmshell.com/src/BOM.html)**. The **BOMCommand** extracts a Bill of Materials directly from a SOLIDWORKS file in the PDM vault and exports it as a clean [CSV file](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/). It removes all manual steps by providing a scriptable way to generate BOMs using batch jobs, scheduled tasks, or [command-line workflows](https://bluebyte.biz/solidworks/solidworkspdm/powershell-pdmshell-search-command-complete-guide-for-solidworks-pdm-administrators/). If you’ve ever needed fully automated downstream manufacturing data, [ERP integrations](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/), or repeatable export pipelines, this command is designed for exactly that. **Categories:** data migration, SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [SolidWorks Macro to Rebuild Referenced Models in All Drawing Sheets](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/) **Published:** November 19, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#description) This SolidWorks macro to rebuild referenced models in all drawing sheets works by rebuilding all referenced models for each sheet in an active SOLIDWORKS drawing document. It validates the active document, iterates through every sheet, and for each one, ensures the referenced model views are refreshed. After completing the rebuild process, the macro closes the models to free up memory efficiently. [![SolidWorks Macro to Rebuild Referenced Models in All Drawing Sheets and A side-by-side comparison labeled "BEFORE" and "AFTER" in a SOLIDWORKS drawing sheet with an A-size border. The "BEFORE" section shows a small 3D-rendered vertical rectangular bracket centered on the sheet, with a blue cursor dot nearby and a title block at the bottom containing basic information and a macro button labeled "Rebuild_Referenced_File." The "AFTER" section displays the same bracket and sheet, but a pop-up dialog box in the center reads "SOLIDWORKS" at the top, "Rebuild is done." in the middle, and an "OK" button highlighted in blue. The title block remains unchanged, and the macro button is still present, indicating the rebuild process has been successfully completed.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Rebuild-Referenced-Models-in-All-Drawing-Sheets.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Rebuild-Referenced-Models-in-All-Drawing-Sheets.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#system-requirements) - **SOLIDWORKS Version**: SOLIDWORKS 2014 or newer - **Operating System**: Windows 10 or later ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#pre-conditions) - SOLIDWORKS must be installed and running on the machine. - An active drawing with multiple sheets and views is open. ## Post-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#post-conditions) - The [referenced files](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) will be opened, rebuilt, and closed. - The original drawing views will update. ## VBA Macro Code[](https://solidworksvbamacros.bluebyte.biz/images/Rebuild_Referenced_File.png) ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare variables Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swDrawModel As SldWorks.ModelDoc2 Dim swDraw As SldWorks.DrawingDoc Dim swView As SldWorks.View Dim swSheet As SldWorks.Sheet Dim vSheetNameArr As Variant Dim vSheetName As Variant Dim bRet As Boolean Dim sFileName As String Dim nErrors As Long Sub main() ' Initialize SOLIDWORKS application object Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if a drawing document is active If swModel Is Nothing Then swApp.SendMsgToUser2 "A drawing document must be open and the active document.", swMbWarning, swMbOk Exit Sub End If ' Verify the document is a drawing If swModel.GetType SwConst.swDocDRAWING Then swApp.SendMsgToUser2 "A drawing document must be open and the active document.", swMbWarning, swMbOk Exit Sub End If ' Cast the active document as a drawing Set swDraw = swModel ' Get the current sheet and sheet names Set swSheet = swDraw.GetCurrentSheet vSheetNameArr = swDraw.GetSheetNames ' Loop through each sheet For Each vSheetName In vSheetNameArr ' Activate each sheet bRet = swDraw.ActivateSheet(vSheetName) Set swView = swDraw.GetFirstView Set swView = swView.GetNextView ' Skip the sheet's overall view ' Loop through all views in the sheet Do While Not swView Is Nothing ' Get the referenced model for the view Set swDrawModel = swView.ReferencedDocument sFileName = swDrawModel.GetPathName ' Open and rebuild the referenced model Set swDrawModel = swApp.ActivateDoc3(sFileName, True, swRebuildActiveDoc, nErrors) ' Rebuild the referenced model swDrawModel.EditRebuild3 ' Close the referenced model after rebuild swApp.CloseDoc swDrawModel.GetTitle ' Move to the next view Set swView = swView.GetNextView Loop Next vSheetName ' Notify the user that the rebuild is complete MsgBox "Rebuild is done." End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Rebuild_Referenced_File.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Referenced_File.html#customization) Need to [modify the macro](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/) to meet specific requirements or integrate it with other processes? We provide [custom macro development](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/) tailored to your needs. [Contact us](https://bluebyte.biz/contact) **Categories:** macros --- ### [SOLIDWORKS Macro for Reloading Sheet Formats in Drawing Documents](https://bluebyte.biz/macros/solidworks-macro-for-reloading-sheet-formats-in-drawing-documents/) **Published:** November 17, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#description) The SolidWorks macro for reloading sheet formats in drawing documents automates the process of refreshing and standardizing sheet templates across all sheets in a SOLIDWORKS drawing. It iterates through each sheet, temporarily removes the current format, and then reloads the original template. This macro ensures every sheet is updated with the correct default format, rebuilding and saving the document automatically to simplify drawing maintenance and formatting consistency. [![SOLIDWORKS Macro for Reloading Sheet Formats in Drawing Documents and A side-by-side comparison labeled "BEFORE" and "AFTER" in a SOLIDWORKS drawing sheet with an A-size border. The "BEFORE" section shows a blank sheet with a large circle centered on it, intersected by horizontal and vertical centerlines, and an empty title block at the bottom. The "AFTER" section displays the same circle and sheet, but a pop-up dialog box in the center reads "SOLIDWORKS" at the top, "Sheet format reloaded!" in the middle, and an "OK" button highlighted in blue. The title block is now fully populated with standard fields such as company name, drawing title, and revision table, and a macro button labeled "Reload_All_Sheet_Formats" appears at the bottom right, indicating the sheet format has been successfully reloaded.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-for-Reloading-Sheet-Formats-in-Drawing-Documents.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-for-Reloading-Sheet-Formats-in-Drawing-Documents.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#system-requirements) - **SolidWorks Version**: SolidWorks 2014 or newer - **Operating System**: Windows 10 or later - **Excel Version**: Microsoft Excel 2010 or later (for Excel integration features) ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#pre-conditions) - SolidWorks must be installed and running on the machine. - An [active drawing](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/) is open. ## Post-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#post-conditions) - The macro will first remove the existing [sheet format](https://bluebyte.biz/macros/automatically-refresh-drawing-sheet-formats-in-solidworks-with-vba/) and then reload the previous format from the specified location for each sheet. - Note: This may remove all content contained within the old/existing format. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swDraw As SldWorks.DrawingDoc Dim swSheet As SldWorks.Sheet Dim vSheetProps As Variant Dim vSheetName As Variant Dim vTemplateName As Variant Dim longstatus As Long Dim longwarnings As Long Dim nErrors As Long Dim nWarnings As Long Dim i As Long ' Initialize SolidWorks application Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if an active drawing is open If swModel Is Nothing Then MsgBox "There is no active drawing document." Exit Sub End If ' Ensure the active document is a drawing If swModel.GetType swDocDRAWING Then MsgBox "Open a drawing first and then try again!" Exit Sub End If Set swDraw = swModel vSheetName = swDraw.GetSheetNames ' Traverse and update each sheet in the drawing For i = 0 To UBound(vSheetName) swDraw.ActivateSheet vSheetName(i) Set swSheet = swDraw.GetCurrentSheet ' Retrieve sheet properties and format template vTemplateName = swSheet.GetTemplateName vSheetProps = swSheet.GetProperties ' Remove the current sheet format swModel.SetupSheet5 swSheet.GetName, swDwgPapersUserDefined, swDwgTemplateNone, _ vSheetProps(2), vSheetProps(3), False, "", _ vSheetProps(5), vSheetProps(6), "Default", True ' Reload the original sheet format swModel.SetupSheet5 swSheet.GetName, swDwgPapersUserDefined, swDwgTemplateCustom, _ vSheetProps(2), vSheetProps(3), False, vTemplateName, _ vSheetProps(5), vSheetProps(6), "Default", True swDraw.ViewZoomtofit2 Next i ' Activate the first sheet and force rebuild swDraw.ActivateSheet vSheetName(0) swDraw.ForceRebuild3 False ' Save the drawing swDraw.Save3 1, nErrors, nWarnings ' Clean up Set swDraw = Nothing Set swModel = Nothing Set swApp = Nothing MsgBox "Sheet format reloaded!" End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Reload_All_Sheet_Formats.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/Reload_All_Sheet_Formats.html#customization) Need to modify the macro to meet specific requirements or integrate it with other processes? We provide [custom macro development](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) tailored to your needs. [Contact us](https://bluebyte.biz/contact). **Categories:** macros --- ### [SOLIDWORKS Macro to Set Layer and Draw Line in SolidWorks Drawing](https://bluebyte.biz/macros/solidworks-macro-to-set-layer-and-draw-line-in-solidworks-drawing/) **Published:** November 14, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#description) This macro sets the specified layer as the current layer in the active SolidWorks drawing document and adds a sketched line on that layer. It automates the process of layer management and drawing creation, ensuring that all subsequent sketched entities are added to the specified layer. This is particularly useful for organizing different sketch entities in separate layers. A SolidWorks macro to set layer and draw line in SolidWorks drawing helps users to keep [drawing elements](https://bluebyte.biz/macros/solidworks-macro-to-programmatically-insert-a-block-into-solidworks-drawing/) structured without any repetitive manual steps. [![SOLIDWORKS Macro to Set Layer and Draw Line in SolidWorks Drawing and A side-by-side comparison labeled "BEFORE" and "AFTER" in a SOLIDWORKS sheet format editing environment. Both sections show a rectangular frame with five circular holes arranged in a horizontal row near the bottom, each with a crosshair center mark. Above the holes is a horizontal line with endpoints marked by blue dots. The "BEFORE" section has a red callout box highlighting the Options dropdown in the Line Properties panel, where "None" is selected under Style. The "AFTER" section shows the same dropdown now set to "Grain" with a red highlight, and the top horizontal line now displays a grain direction arrow pointing right with a small circle at the end. An orange dashed border outlines the editable area in both views, and the interface includes toolbars and property panels on the left.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Set-Layer-and-Draw-Line-in-SolidWorks-Drawing-1024x316.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Set-Layer-and-Draw-Line-in-SolidWorks-Drawing.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#system-requirements) - **SolidWorks Version**: SolidWorks 2014 or newer - **Operating System**: Windows 7 or later ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#pre-conditions) - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be a drawing document. - The specified layer (`Grain`) must already exist in the active drawing. ## Results[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#results) - The specified layer (`Grain`) will be set as the active layer. - A new [sketch line](https://bluebyte.biz/macros/solidworks-macro-to-apply-custom-color-and-width-to-drawing-edges/) will be created on the specified layer at the given coordinates. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Define necessary variables for SolidWorks application, drawing, and layer manager Dim swApp As Object ' Application object (SldWorks) Dim pDrawing As Object ' Active drawing document object Dim pLayerMgr As Object ' Layer manager object Dim pSketchSegment1 As Object ' Sketch segment object (line) Sub main() ' Initialize SolidWorks application Set swApp = Application.SldWorks ' Get the active drawing document Set pDrawing = swApp.ActiveDoc ' Check if the active document is a drawing If pDrawing Is Nothing Then swApp.SendMsgToUser "No active drawing document found. Please open a drawing and try again." Exit Sub End If ' Get LayerMgr object from the active drawing document Set pLayerMgr = pDrawing.GetLayerManager ' Check if LayerMgr was obtained successfully If pLayerMgr Is Nothing Then swApp.SendMsgToUser "Failed to get Layer Manager. Make sure you are in a drawing document." Exit Sub End If ' Set "Grain" as the current layer Dim res As Boolean res = pLayerMgr.SetCurrentLayer("Grain") ' Check if the layer activation was successful If res = False Then swApp.SendMsgToUser "Error activating the layer 'Grain'. Please ensure the layer exists in the drawing." Exit Sub End If ' Enable adding objects to the database without displaying them pDrawing.SetAddToDB True Create a line sketch on the active layer Set pSketchSegment1 = pDrawing.CreateLine2(0.15, 0.25, 0, 0.45, 0.25, 0) ' Check if the line was created successfully If pSketchSegment1 Is Nothing Then swApp.SendMsgToUser "Failed to create the sketch line. Please check the sketch coordinates." pDrawing.SetAddToDB False Exit Sub End If ' Disable adding objects to the database pDrawing.SetAddToDB False ' Clear all selections in the drawing pDrawing.ClearSelection ' Notify user of successful operation swApp.SendMsgToUser "Layer set and line created successfully on the active layer." End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/SetLayersAndDrawLine.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/SetLayersAndDrawLine.html#customization) Need to modify the macro to meet specific requirements or integrate it with other processes? We provide custom macro development tailored to your needs. [Contact us](https://bluebyte.biz/contact). **Categories:** macros --- ### [SOLIDWORKS Macro to Align All Dimensions Automatically](https://bluebyte.biz/macros/solidworks-macro-to-align-all-dimensions-automatically/) **Published:** November 12, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Align_All_Dimensions_Automatically.html#description) This VBA macro automates selecting and arranging dimensions in SOLIDWORKS drawings. It loops through views, selects display dimensions, and auto-arranges them. [![SOLIDWORKS Macro to Align All Dimensions Automatically and](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Align-All-Dimensions-Automatically.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Align-All-Dimensions-Automatically.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/Align_All_Dimensions_Automatically.html#system-requirements-1) To run this VBA macro, ensure that your system meets the following requirements: - SOLIDWORKS Version: SOLIDWORKS 2018 or later - VBA Environment: Pre-installed with SOLIDWORKS (Access via Tools > Macro > New or Edit) - Operating System: Windows 7, 8, 10, or later. ## Prerequisites In order for the macro to run as intended, the following condition must be satisfied: - There is an active drawing document (.SLDDRW) open, and it is the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) in SOLIDWORKS. ## Steps to Set Up the Macro ### Open Your Drawing - Make sure the [SOLIDWORKS drawing](https://bluebyte.biz/macros/how-to-automatically-insert-a-solidworks-drawing-watermark-using-a-macro/) you want to align dimensions in is open and active. ### Load the Macro File (.swp) - Download the provided `.swp` macro file, or - Copy the code (from `Option Explicit` to `End Sub`) and save it as `.swp` using VBA Editor or any text editor. - Remember where you save it. This SolidWorks macro to [align all dimensions automatically](https://bluebyte.biz/macros/solidworks-macro-to-toggle-dimension-style-fraction-vs-decimal/) ensures your dimension layout stays clean and readable without manual adjustments. ### Run the Macro - Go to **Tools > Macro > Run** - Select the `.swp` file - Click **Run**. The macro will align dimensions automatically ## VBA Macro Code ``` ' ******************************************************************** ' DISCLAIMER: ' This code is provided as-is with no warranty or liability by ' Blue Byte Systems Inc. The company assumes no responsibility for ' any issues arising from the use of this code in production. ' ******************************************************************** Option Explicit Public swApp As SldWorks.SldWorks Public swModel As SldWorks.ModelDoc2 Public swDraw As SldWorks.DrawingDoc Public swView As SldWorks.View Public swDispDim As SldWorks.DisplayDimension Public swAnn As SldWorks.Annotation Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Ensure the active document is a drawing If swModel.GetType swDocDRAWING Then MsgBox "This macro only works on drawings!", vbCritical, "Error" Exit Sub End If Set swDraw = swModel Set swView = swDraw.GetFirstView swModel.ClearSelection2 True ' Loop through all views and select display dimensions Do While Not swView Is Nothing Set swDispDim = swView.GetFirstDisplayDimension5 Do While Not swDispDim Is Nothing Set swAnn = swDispDim.GetAnnotation swAnn.Select True Set swDispDim = swDispDim.GetNext5 Loop Set swView = swView.GetNextView Loop ' Auto-arrange dimensions swModel.Extension.AlignDimensions swAlignDimensionType_AutoArrange, 0.06 swModel.ClearSelection2 True End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Align_All_Dimensions_Automatically.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/AddMassCenter.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/Align_All_Dimensions_Automatically.html#customization) Need to modify the macro to meet specific requirements or integrate it with other processes? We provide custom macro development tailored to your needs. [Contact us](https://bluebyte.biz/contact). **Categories:** macros --- ### [SOLIDWORKS Macro to Programmatically Insert a Block into SolidWorks Drawing](https://bluebyte.biz/macros/solidworks-macro-to-programmatically-insert-a-block-into-solidworks-drawing/) **Published:** November 10, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#description) A one-line function call to programmatically insert a block into SolidWorks drawing allows you to quickly place a block in the active document. This macro returns the `SketchBlockInstance` for the inserted block, enabling users to efficiently place and manage sketch blocks within a drawing. It is particularly useful for automating the placement of standardized blocks, reducing repetitive tasks. [![Programmatically Insert a Block into SolidWorks Drawing and A side-by-side comparison labeled "BEFORE" and "AFTER" showing a blank engineering drawing sheet with a standard border and grid labels (1 to 4 horizontally, D to F vertically). The "BEFORE" section is completely empty except for a small cursor icon near the bottom center. The "AFTER" section shows the same sheet with the addition of a blue text label "TEST BLOCK" centered horizontally and vertically in the middle of the sheet. Both sections have a small cursor icon near the bottom, indicating user interaction. The change demonstrates the insertion of a test block or note onto the drawing.](https://bluebyte.biz/wp-content/uploads/2025/10/Programmatically-Insert-a-Block-into-SolidWorks-Drawing.png)](https://bluebyte.biz/wp-content/uploads/2025/10/Programmatically-Insert-a-Block-into-SolidWorks-Drawing.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#system-requirements) - **SolidWorks Version**: [SolidWorks 2014 or newer](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/) - **Operating System**: Windows 7 or later ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#pre-conditions) - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be a drawing file. - The block file to be inserted must exist in the [specified path](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/). ## Results[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#results) - The block will be inserted at the specified X and Y coordinates. - The macro returns a `SketchBlockInstance` object for the inserted block. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As SldWorks.SldWorks ' Main subroutine to insert a block and print block attributes Sub main() Dim part As ModelDoc2 Dim swBlkInst As SketchBlockInstance Dim boolstatus As Boolean ' Initialize SolidWorks application Set swApp = Application.SldWorks Set part = swApp.ActiveDoc ' Insert the block at specified location with optional scale and rotation Set swBlkInst = Insert_Block(part, "C:\temp\myblock.SLDBLK", 0.254, 0.254) ' Display block attributes in the Immediate window Debug.Print "Number of attributes: " & swBlkInst.GetAttributeCount Debug.Print "Scale: " & swBlkInst.Scale Debug.Print "Name: " & swBlkInst.Name ' Set an attribute value for the inserted block boolstatus = swBlkInst.SetAttributeValue("ItemNo", "Value") End Sub ' Function to insert a block into the active document Function Insert_Block(ByVal rModel As ModelDoc2, ByVal blkName As String, ByVal Xpt As Double, ByVal Ypt As Double, _ Optional ByVal sAngle As Double = 0, Optional ByVal sScale As Double = 1) As Object Dim swBlockDef As SketchBlockDefinition Dim swBlockInst As SketchBlockInstance Dim swMathPoint As MathPoint Dim vBlockInst As Variant Dim swMathUtil As MathUtility Set swMathUtil = swApp.GetMathUtility ' Prepare coordinates for block insertion Dim pt(2) As Double pt(0) = Xpt pt(1) = Ypt pt(2) = 0 ' Turn off grid and entity snapping to facilitate block insertion rModel.SetAddToDB True ' Check if the block definition already exists in the drawing Set swBlockDef = GetBlockDefination(Mid(blkName, InStrRev(blkName, "\") + 1), rModel) Set swMathPoint = swMathUtil.CreatePoint(pt) ' Insert the block if definition is found, otherwise create a new one If Not swBlockDef Is Nothing Then Set swBlockInst = rModel.SketchManager.InsertSketchBlockInstance(swBlockDef, swMathPoint, sScale, sAngle) Else Set swBlockDef = rModel.SketchManager.MakeSketchBlockFromFile(swMathPoint, blkName, False, sScale, sAngle) vBlockInst = swBlockDef.GetInstances Set swBlockInst = vBlockInst(0) End If ' Restore grid and entity snapping rModel.SetAddToDB False ' Redraw graphics to reflect the changes rModel.GraphicsRedraw2 Set Insert_Block = swBlockInst End Function ' Function to get the block definition if it already exists in the drawing Function GetBlockDefination(ByVal blkName As String, ByVal rModel As ModelDoc2) As Object Dim swBlockDef As Object Dim vBlockDef As Variant Dim i As Integer ' Check if there are existing block definitions in the drawing If rModel.SketchManager.GetSketchBlockDefinitionCount > 0 Then vBlockDef = rModel.SketchManager.GetSketchBlockDefinitions If UBound(vBlockDef) >= 0 Then ' Loop through existing definitions to find the matching one For i = 0 To UBound(vBlockDef) Set swBlockDef = vBlockDef(i) If UCase(Mid(swBlockDef.FileName, InStrRev(swBlockDef.FileName, "\") + 1)) = UCase(blkName) Then Set GetBlockDefination = swBlockDef Exit Function End If Next i End If End If ' Return nothing if no matching block definition is found Set GetBlockDefination = Nothing End Function ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/InsertBlock.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/InsertBlock.html#customization) Need to modify the macro to meet specific requirements or integrate it with other processes? We provide [custom macro development](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) tailored to your needs. [Contact us](https://bluebyte.biz/contact) **Categories:** macros --- ### [SOLIDWORKS Macro to Rebuild and Save All Drawings in a Directory as PDF](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/) **Published:** November 3, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#description) This macro rebuilds all SolidWorks drawing files (.SLDDRW) in a specified directory and saves them as PDF files in the same location. It automates the process of batch exporting drawings to PDFs, making it ideal for users who need to handle large quantities of files efficiently. By using a SOLIDWORKS macro to [rebuild and save all drawings in a directory as PDF](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/), teams can ensure every updated drawing is exported consistently without manual effort. [![SOLIDWORKS Macro to Rebuild and Save All Drawings in a Directory as PDF and A side-by-side comparison labeled "BEFORE" and "AFTER" showing a file explorer window. The "BEFORE" section lists four PDF files named "Rebuild_Save_All_Drawings_in_a_Directory_as_PDF" with sizes 70 KB, 71 KB, 74 KB, and 70 KB, all dated 4/19/2025 4:33 PM. The "AFTER" section shows the same files with updated sizes: 30 KB, 31 KB, 32 KB, and 70 KB, and file types changed to "Microsoft Edge PDF Document" for the first three, while the fourth remains a SOLIDWORKS Drawing at 70 KB. Red arrows point to the size reductions in the first three files, highlighting a significant decrease in file size after processing.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Rebuild-and-Save-All-Drawings-in-a-Directory-as-PDF-1024x189.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Rebuild-and-Save-All-Drawings-in-a-Directory-as-PDF.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#system-requirements) - **SolidWorks Version**: SolidWorks 2014 or newer - **Operating System**: Windows 10 or later - **Excel Version**: Microsoft Excel 2010 or later (for Excel integration features) ## Pre-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#pre-conditions) - The folder containing the SolidWorks drawings must be specified in the code. - SolidWorks must be installed and running on the machine. ## Post-Conditions[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#post-conditions) - PDF files will be saved in the same location as the [SolidWorks drawings](https://bluebyte.biz/macros/how-to-quickly-delete-dangling-dimensions-in-solidworks-drawings/). - The original drawing files will remain unchanged. ## VBA Macro Code[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#vba-macro-code) ``` ' Disclaimer:' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz).Option Explicit' Define the main variables for SolidWorks application and modelDim swApp As SldWorks.SldWorksDim swModel As ModelDoc2Dim swFilename As StringDim swRet As BooleanDim swErrors As LongDim swWarnings As LongDim swResponse As String' Main subroutineSub Main() ' Initialize SolidWorks application Set swApp = Application.SldWorks ' Specify the folder location containing the SolidWorks drawings RebuildAndSaveAllDrawingsAsPDF "C:\SOLIDWORKS", ".SLDDRW", TrueEnd Sub' Subroutine to rebuild drawing and save as PDFSub RebuildAndSaveAllDrawingsAsPDF(swFolder As String, swExt As String, swSilent As Boolean) Dim swDocTypeLong As Long ' Ensure the file extension is in uppercase swExt = UCase$(swExt) swDocTypeLong = Switch(swExt = ".SLDDRW", swDocDRAWING, True, -1) ' If the file type is not supported, exit the subroutine If swDocTypeLong = -1 Then Exit Sub End If ' Change directory to the folder ChDir (swFolder) ' Get the first file in the folder swResponse = Dir(swFolder) Do Until swResponse = "" swFilename = swFolder & swResponse ' Check if the file extension matches If Right(UCase$(swResponse), 7) = swExt Then ' Open the SolidWorks document Set swModel = swApp.OpenDoc6(swFilename, swDocTypeLong, swOpenDocOptions_Silent, "", swErrors, swWarnings) Rebuild the drawing if it's a drawing file If swDocTypeLong swDocDRAWING Then swModel.ShowNamedView2 "*Isometric", -1 End If ' Define file path variables Dim swFilePath As String Dim swPathSize As Long Dim swPathNoExtension As String Dim swNewFilePath As String swFilePath = swModel.GetPathName swPathSize = Strings.Len(swFilePath) swPathNoExtension = Strings.Left(swFilePath, swPathSize - 6) swNewFilePath = swPathNoExtension & "PDF" ' Save the document as PDF swRet = swModel.SaveAs3(swNewFilePath, 0, 0) ' Close the document swApp.CloseDoc swModel.GetTitle End If ' Get the next file in the folder swResponse = Dir LoopEnd Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.swp). ## Customization[](https://solidworksvbamacros.bluebyte.biz/src/Rebuild_Save_All_Drawings_in_a_Directory_as_PDF.html#customization) Need to modify the macro to meet specific requirements or [integrate it with other processes](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/)? We provide [custom macro development](https://bluebyte.biz/macros/solidworks-macro-for-reloading-sheet-formats-in-drawing-documents/) tailored to your needs. [Contact us](https://bluebyte.biz/contact). **Categories:** macros --- ### [SolidWorks Macro to Batch Rebuild and Export Drawings to PDF](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) **Published:** November 1, 2025 **Author:** Amen Jlili **Content:** ## **Description** The script will automatically rebuild all SolidWorks drawing files (.SLDDRW) in a user-specified Windows directory, assuring every view and annotation is up to date, and will immediately save each as a PDF file. [![SolidWorks Macro to Batch Rebuild and Export Drawings to PDF and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a sketch on the "Front Plane" with a simple rectangular outline and a single dimension line labeled "L." The feature tree on the left lists "Sketch1" under "Front Plane." The "After" section shows the same sketch transformed into a filled square with diagonal lines, now including dimension lines labeled "59.43" for the length and "60.0" for the width, and the same feature tree updated with "Sketch2." Both sections include toolbars and a 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Batch-Rebuild-and-Export-Drawings-to-PDF-1024x366.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Batch-Rebuild-and-Export-Drawings-to-PDF.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 10 or later - **Excel Version:** Microsoft Excel 2010 or later (for Excel integration features) ## Pre-requisites - The macro code must have the absolute file path of the folder that contains the [SolidWorks drawings](https://bluebyte.biz/macros/how-to-quickly-delete-dangling-dimensions-in-solidworks-drawings/) before running the macro. - SolidWorks needs to be installed and open on the machine in order to run the macro. ## Results - For each original SolidWorks drawing processed, a [PDF file is created](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/). - PDF files are saved in the same directory as their SolidWorks drawing source files. - The original files (.SLDDRW) will be opened, rebuilt, and closed, with no changes. ## Steps to Set Up the Macro 1. **Register the Macro File:** Start with SolidWorks open and go to Tools>Macro>New. 2. **Name and Register:** Give the macro a meaningful name (e.g., BatchPDFExport.swp) and save the file. This step will open your VBA editor automatically. 3. **Paste the code:** Download the VBA code we have provided below and place it in your editor. 4. **Define Target Folder (Important step):** In the VBA editor, in the Sub Main() sub-routine, replace the file path in the code line: *[RebuildAndSaveAllDrawingsAsPDF “C:SOLIDWORKS”, “.SLDDRW”, True](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/)* Replace “C:\\SOLIDWORKS” with the target folder where your drawing files are located. This SOLIDWORKS macro to batch rebuild and [export drawings to PDF](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/) helps streamline this process by automating rebuild and export tasks for all drawings within the specified folder. 5. **Run Macro:** Close your VBA editor and save the work when prompted. You can now run the macro with [Tools>Macro>Run](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/) or an assigned shortcut. ## **VBA Macro Code** ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Define the main variables for SolidWorks application and model Dim swApp As SldWorks.SldWorks Dim swModel As ModelDoc2 Dim swFilename As String Dim swRet As Boolean Dim swErrors As Long Dim swWarnings As Long Dim swResponse As String ' Main subroutine Sub Main() ' Initialize SolidWorks application Set swApp = Application.SldWorks ' Specify the folder location containing the SolidWorks drawings RebuildAndSaveAllDrawingsAsPDF "C:\SOLIDWORKS", ".SLDDRW", True End Sub ' Subroutine to rebuild drawing and save as PDF Sub RebuildAndSaveAllDrawingsAsPDF(swFolder As String, swExt As String, swSilent As Boolean) Dim swDocTypeLong As Long ' Ensure the file extension is in uppercase swExt = UCase$(swExt) swDocTypeLong = Switch(swExt = ".SLDDRW", swDocDRAWING, True, -1) ' If the file type is not supported, exit the subroutine If swDocTypeLong = -1 Then Exit Sub End If ' Change directory to the folder ChDir (swFolder) ' Get the first file in the folder swResponse = Dir(swFolder) Do Until swResponse = "" swFilename = swFolder & swResponse ' Check if the file extension matches If Right(UCase$(swResponse), 7) = swExt Then ' Open the SolidWorks document Set swModel = swApp.OpenDoc6(swFilename, swDocTypeLong, swOpenDocOptions_Silent, "", swErrors, swWarnings) ' Rebuild the drawing if it's a drawing file If swDocTypeLong swDocDRAWING Then swModel.ShowNamedView2 "*Isometric", -1 End If ' Define file path variables Dim swFilePath As String Dim swPathSize As Long Dim swPathNoExtension As String Dim swNewFilePath As String swFilePath = swModel.GetPathName swPathSize = Strings.Len(swFilePath) swPathNoExtension = Strings.Left(swFilePath, swPathSize - 6) swNewFilePath = swPathNoExtension & "PDF" ' Save the document as PDF swRet = swModel.SaveAs3(swNewFilePath, 0, 0) ' Close the document swApp.CloseDoc swModel.GetTitle End If ' Get the next file in the folder swResponse = Dir Loop End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Template.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Template.swp). ## Need Customization & Expert Support? If so, make sure to [reach out](https://bluebyte.biz/contact)! Our specialized team at [Blue Byte Systems Inc](https://bluebyte.biz/). develops custom macros and add-ins to meet these advanced workflow needs. **Categories:** macros --- ### [Enforce Consistent Units: SOLIDWORKS Macro to Match Component Unit System](https://bluebyte.biz/macros/enforce-consistent-units-solidworks-macro-to-match-component-unit-system/) **Published:** October 31, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/ChangePartUnitAsPerAssembly.html#description) This macro changes the unit system of all sub-parts and sub-assemblies in the active assembly to match the unit system of the main assembly. The macro ensures that all components in the assembly have a consistent unit system, which is crucial for accurate measurement and interoperability. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** [Windows 7 or later](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) ## Pre-requisites To execute the macro, the following prerequisites must be satisfied: - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be an assembly document (.SLDASM) within SOLIDWORKS. - The macro requires the necessary file permissions to the component files (.SLDPRT, .SLDASM) in order to execute **open, edit and save** actions. ## Results When executed, the unit consistency is enforced with the following results: - All [sub-parts and sub-assemblies](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) in the assembly will have their unit system preferences set to that of the main assembly’s unit system. - The changes are [permanently saved to the individual component files](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-all-components/). - A final message box will show the updated unit system (e.g., MKS, MMGS, IPS) as confirmation for the user. ## **Steps to Set Up the Macro** - **Registering a Macro File:** Starting from open or closed SolidWorks, go to Tools > Macro > New… - **Naming the Macro File:** To help identify your macro in the near future, a good practice is to name the macro in some relevant way. For example, you may want to give the file a name like “BatchUnitMatch.swp”. Once you have entered a name for the macro, press save. A new Window for the VBA editor should pop up. - **Place the Code:** Simply download the VBA code provided below and then copy paste it into your editor. - **Execute The Macro:** Exit from the editor and save when prompted. With the [active target assembly](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/), run the macro via Tools > Macro > Run, or by your previously assigned shortcut. This SOLIDWORKS macro to match component unit system helps [enforce consistent units](https://bluebyte.biz/macros/solidworks-macro-to-toggle-dimension-style-fraction-vs-decimal/) across all parts in your assembly, ensuring accuracy and uniformity in your design data. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare global variables Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swmodel As SldWorks.ModelDoc2 ' Active model document (assembly) Dim swasm As SldWorks.AssemblyDoc ' Assembly document object Dim swconf As SldWorks.Configuration ' Configuration object Dim swrootcomp As SldWorks.Component2 ' Root component of the assembly Dim usys As Long ' Main assembly unit system Dim usys1 As Long ' Main assembly linear units Dim dunit As Long ' Dual linear unit system value Dim bret As Boolean ' Boolean return status variable Dim err As Long, war As Long ' Error and warning variables ' -------------------------------------------------------------------------- ' Main subroutine to initialize the process and update unit systems ' -------------------------------------------------------------------------- Sub main() ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swmodel = swApp.ActiveDoc ' Check if there is an active document open If swmodel Is Nothing Then MsgBox "No active document found. Please open an assembly and try again.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is an assembly If swmodel.GetType swDocASSEMBLY Then MsgBox "This macro only works on assemblies. Please open an assembly and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Get the active configuration and root component of the assembly Set swconf = swmodel.GetActiveConfiguration Set swrootcomp = swconf.GetRootComponent3(True) ' Get the main assembly's unit system and dual units usys = swmodel.GetUserPreferenceIntegerValue(swUnitSystem) ' Unit system (CGS, MKS, IPS, etc.) dunit = swmodel.GetUserPreferenceIntegerValue(swUnitsDualLinear) ' Dual linear unit system If usys = 4 Then usys1 = swmodel.GetUserPreferenceIntegerValue(swUnitsLinear) ' Custom linear units End If ' Traverse through all sub-components and update their unit systems Traverse swrootcomp, 1 ' Notify the user about the updated unit system Select Case usys Case 1 swApp.SendMsgToUser2 "Unit system changed to CGS", swMbInformation, swMbOk Case 2 swApp.SendMsgToUser2 "Unit system changed to MKS", swMbInformation, swMbOk Case 3 swApp.SendMsgToUser2 "Unit system changed to IPS", swMbInformation, swMbOk Case 4 swApp.SendMsgToUser2 "Unit system changed to Custom Unit", swMbInformation, swMbOk Case 5 swApp.SendMsgToUser2 "Unit system changed to MMGS", swMbInformation, swMbOk End Select End Sub ' -------------------------------------------------------------------------- ' Recursive function to traverse through the assembly and update unit systems ' -------------------------------------------------------------------------- Sub Traverse(swcomp As SldWorks.Component2, nlevel As Long) ' Declare necessary variables Dim vChildComp As Variant ' Array of child components in the assembly Dim swChildComp As SldWorks.Component2 ' Individual child component object Dim swCompConfig As SldWorks.Configuration ' Component configuration object Dim swpmodel As SldWorks.ModelDoc2 ' Model document object of the component Dim path As String ' Path of the component file Dim sPadStr As String ' String for formatting debug output Dim i As Long ' Loop counter for iterating through child components ' Format padding for debug output based on level For i = 0 To nlevel - 1 sPadStr = sPadStr + " " Next i ' Get child components of the current component vChildComp = swcomp.GetChildren ' Loop through each child component For i = 0 To UBound(vChildComp) Set swChildComp = vChildComp(i) ' Set the child component ' Recursively traverse through sub-components Traverse swChildComp, nlevel + 1 ' Check if the child component is valid If Not swChildComp Is Nothing Then path = swChildComp.GetPathName ' Get the path of the component ' Open the part or assembly based on file extension If (LCase(Right(path, 3)) = "prt") Then Set swpmodel = swApp.OpenDoc6(path, swDocPART, 0, swChildComp.ReferencedConfiguration, err, war) ElseIf (LCase(Right(path, 3)) = "asm") Then Set swpmodel = swApp.OpenDoc6(path, swDocASSEMBLY, 0, swChildComp.ReferencedConfiguration, err, war) End If ' If the component is successfully opened, update its unit system If Not swpmodel Is Nothing Then bret = swpmodel.SetUserPreferenceIntegerValue(swUnitSystem, usys) bret = swpmodel.SetUserPreferenceIntegerValue(swUnitsDualLinear, dunit) If usys = 4 Then bret = swpmodel.SetUserPreferenceIntegerValue(swUnitsLinear, usys1) End If ' Save the component after updating the unit system swpmodel.Save3 0, err, war Set swpmodel = Nothing ' Release the object End If End If Next i End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Change_Part_Unit_As_Per_Assembly.swp). ## Need Help With Customization? Get Our Expert Support! Our specialized team at [Blue Byte Systems Inc](https://bluebyte.biz/contact/). creates custom macros and add-ins to meet any of these advanced workflow requests. **Categories:** macros --- ### [SolidWorks Macro for Efficient Assembly Navigation: Open and Activate Top-Level Assembly](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/) **Published:** October 30, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/OpenTopLevelAssembly.html#description) This macro is designed to navigate through the assembly structure in SolidWorks to find the top-level assembly for a selected component and open it if it’s not already active. If the selected component is a part, the macro will open its file directly. [![SolidWorks Macro for Efficient Assembly Navigation and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a rectangular block with a red cylindrical component and a blue spherical component attached, and a feature tree on the left listing "Valve Assembly," "Control Panel," and components like "Valve Mixer Shaft" and "Lifted Control Knob" with constraints. The "After" section shows a refined 3D model with two red cylindrical components connected by a central structure, and the feature tree updated with "MateGroup1" and similar components. Both sections include toolbars and an isometric 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Efficient-Assembly-Navigation-1024x327.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Efficient-Assembly-Navigation.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-Conditions - The macro must run within an open SolidWorks document. - That component must be selected in an open assembly or part document before the macro is run. ## Results The macro executes a specific file-related action and makes a specific window active based on the selection made: - The macro opens and becomes active on the highest-level assembly document containing the [selected component](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/). - If the selected object is a part, and it doesn’t have a [parent assembly](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/) (so it is either a top-level component or a part selected in a part document), then the macro will open that part document and make it active directly. ## Steps to Set Up the Macro Follow these steps to get the SolidWorks macro for efficient assembly navigation running: 1. **Create the Module:** Launch the VBA editor from SolidWorks by pressing Alt + F11. In the desired VBA project, right-click on the Modules folder, and select Insert → Module. 2. **Insert the Code:** Paste the VBA code provided below into the newly created module. Save the file as your macro (for example, OpenTopAssembly.swp). 3. **Set up the Document:** Ensure that an assembly document is open, and that a component (or feature associated with a component) is selected in SolidWorks in the feature manager tree or in the graphics area. 4. **Execute the Macro:** Run the macro from the Tools → macro → run menu in SolidWorks. Then choose your saved macro. Doing so will immediately allow the macro to handle traversing the hierarchy and activating the files, minimising clicks and search time. ## **VBA Macro Code** ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' SolidWorks application and document objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swmodel As SldWorks.ModelDoc2 ' Active document object Dim assemdoc As SldWorks.ModelDoc2 ' Assembly document object Dim swselmgr As SldWorks.SelectionMgr ' Selection manager object Dim selcomp As SldWorks.Component2 ' Selected component object Dim swent As SldWorks.Entity ' Entity object representing selected geometry Dim parcomp As SldWorks.Component2 ' Parent component in the hierarchy Dim tempcomp As SldWorks.Component2 ' Temporary component for parent traversal Sub main() ' Initialize SolidWorks application Set swApp = Application.SldWorks ' Get the active document Set swmodel = swApp.ActiveDoc ' Get the selection manager for the active document Set swselmgr = swmodel.SelectionManager ' Get the first selected object as an entity Set swent = swselmgr.GetSelectedObject(1) ' Retrieve the component associated with the selected entity Set selcomp = swent.GetComponent ' Get the parent component of the selected component Set tempcomp = selcomp.GetParent ' Check if the selected component has no parent (it is a standalone part) If tempcomp Is Nothing Then ' Open the document associated with the selected component Set swmodel = swApp.OpenDoc(selcomp.GetPathName, 2) ' Open as a part document ' Activate the document to display it in the SolidWorks interface Set swmodel = swApp.ActivateDoc(selcomp.Name) Exit Sub End If ' Initialize parent component as the immediate parent Set parcomp = tempcomp ' Traverse the hierarchy to find the topmost parent component Do While Not tempcomp Is Nothing ' Get the parent of the current component Set tempcomp = tempcomp.GetParent ' Update the parent component to the current one if valid If Not tempcomp Is Nothing Then Set parcomp = tempcomp End If Loop ' Get the assembly document associated with the topmost parent component Set assemdoc = parcomp.GetModelDoc2 ' Open the assembly document Set swmodel = swApp.OpenDoc(assemdoc.GetPathName, 2) ' Open as an assembly document ' Activate the assembly document to display it Set swmodel = swApp.ActivateDoc(assemdoc.GetTitle) End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/OpenTopLevelAssembly.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/OpenTopLevelAssembly.swp). ## Need Help Customizing The Macro? Need to modify the macro to meet specific requirements or integrate it with other processes? We provide custom macro development tailored to your needs. [Contact us today](https://bluebyte.biz/contact/)! **Categories:** macros --- ### [SOLIDWORKS Macro to Automate Parent Assembly Selection](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/) **Published:** October 29, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/ParentSelect.html#description) This macro selects the parent assembly of the currently selected assembly component in SolidWorks. It is particularly useful for navigating assembly hierarchies and understanding component relationships within complex assemblies. [![SOLIDWORKS Macro to Automate Parent Assembly Selection and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a rectangular block with a single red spherical component and a blue cylindrical attachment on top, and a feature tree on the left listing "Valve Assembly," "Control Panel," and components like "Valve Mixer Shaft" and "Lifted Control Knob" with constraints. The "After" section shows the same block with two blue spherical components and cylindrical attachments on the right side, and the feature tree updated with "Sketch2" and similar constraints. Both sections include toolbars and an isometric 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Automate-Parent-Assembly-Selection-1024x320.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Automate-Parent-Assembly-Selection.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites The conditions below must be satisfied before the macro is executed: - An assembly document must be currently open in your SOLIDWORKS environment. - At least one part/sub-assembly must be previously selected in the assembly window. ## Results - The assembly selection will immediately change to the parent assembly component. - If the item selected is already a top-level component (i.e., there are no parents), the selection will not change. ## Steps to Set Up the Macro To deploy the SolidWorks macro to automate parent assembly selection, go through these easy-to-follow steps: ### Create the VBA Modules - Launch the SolidWorks VBA Editor by pressing (Alt + F11). - Insert a new module into your project and paste the provided VBA code into this module. ### Execute the Macro - [Open an assembly](https://bluebyte.biz/macros/how-to-open-selected-part-separately-from-the-assembly-in-solidworks/) with components that can be selected. - Run the macro from within SolidWorks via Tools > Macro > Run and select the saved macro. ### Using the Macro - The last selected item will automatically be replaced by its [parent assembly](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/), making it the active selection. - If the selected item has no parent assembly or is a top-level component, the selection will not change. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). ' SolidWorks VBA macro to select the parent assembly of a selected component Option Explicit ' Main subroutine Sub main() ' Declare variables for SolidWorks objects and operations Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object Dim swSelMgr As SldWorks.SelectionMgr ' Selection manager object Dim swSelComp As SldWorks.Component2 ' Selected assembly component object Dim bRet As Boolean ' Boolean for operation success Dim i As Integer ' Loop counter (unused in this version) Dim CurSelCount As Long ' Number of selected objects Dim NewObjToSelect As Object ' Object to select (parent assembly) Dim DwgDocComp As DrawingComponent ' Drawing component object for drawings Dim OldToggleVal As Long ' Stores the previous toggle state of a user preference ' Initialize the SolidWorks application and active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if a document is open If swModel Is Nothing Then Exit Sub ' Validate the document type (must be assembly or assembly drawing) If swModel.GetType = swDocPART Then Exit Sub ' Exit if the document is a part ElseIf swModel.GetType = swDocDRAWING Then ' Check if the drawing references a part document If swModel.ActiveDrawingView.ReferencedDocument.GetType = swDocPART Then Exit Sub ' Exit if the referenced document is a part End If End If ' Get the selection manager Set swSelMgr = swModel.SelectionManager ' Get the number of selected objects CurSelCount = swSelMgr.GetSelectedObjectCount If CurSelCount = 0 Then MsgBox "Nothing was selected" Exit Sub End If ' Get the selected object (component or drawing component) If swModel.GetType = swDocDRAWING Then ' For drawings, retrieve the component associated with the drawing view Set DwgDocComp = swSelMgr.GetSelectedObjectsComponent2(CurSelCount) Set swSelComp = DwgDocComp.Component Else ' For assemblies, get the selected assembly component Set swSelComp = swSelMgr.GetSelectedObjectsComponent(CurSelCount) End If ' Get the parent assembly of the selected component Set NewObjToSelect = swSelComp.GetParent If Not NewObjToSelect Is Nothing Then ' Deselect the current selection swSelMgr.DeSelect CurSelCount If swModel.GetType = swDocDRAWING Then ' For drawings, adjust selection to the drawing context Set NewObjToSelect = NewObjToSelect.GetDrawingComponent(swSelMgr.GetSelectedObject6(swSelMgr.GetSelectedObjectCount2(-1), -1)) swModel.ClearSelection2 True ' Temporarily disable the property manager auto-show preference OldToggleVal = swApp.GetUserPreferenceToggle(swAutoShowPropertyManager) swApp.SetUserPreferenceToggle swAutoShowPropertyManager, False ' Select the new object (parent assembly) bRet = NewObjToSelect.Select(True, Nothing) ' Restore the original preference toggle value swApp.SetUserPreferenceToggle swAutoShowPropertyManager, OldToggleVal Else ' For assemblies, directly select the parent assembly bRet = NewObjToSelect.Select(True) End If End If End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/ParentSelect.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/ParentSelect.swp). ## Customization and Advanced Solutions [Contact our experts](https://bluebyte.biz/contact/) today to discuss a fully customized solution that enhances your use of the Parent Assembly Selector Macro and all your automation needs. **Categories:** macros --- ### [SOLIDWORKS Macro to Save Assembly as Part (Exterior Components)](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-exterior-components/) **Published:** October 25, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Save%20Assy%20As%20Part%20%28Exterior%20Components%29.html#description) This macro converts an active SolidWorks assembly into a part file that contains only the exterior components. This feature is useful for reducing the complexity of the assembly when sharing with external stakeholders or for performance improvements in visualization and analysis. [![SOLIDWORKS Macro to Save Assembly as Part and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a box-like container with a hinged lid, a blue plane labeled "Top Plane," and a feature tree on the left listing "Upper & Lower_Covers" with components like "Hinge" and "Handle" under "History" and "Solid Bodies." The "After" section shows the same container with the lid closed and a shaded surface, the feature tree updated with additional "Solid Bodies" like "Upper_Cover-B1-solid1," and similar components. Both sections include toolbars and an isometric 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Save-Assembly-as-Part.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Save-Assembly-as-Part.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Prerequisites The following conditions must be satisfied for the macro to function as intended: - An assembly document (.SLDASM) must be currently open and the frontmost document in SOLIDWORKS. - The active assembly document must contain at least one part component to make the operation meaningful. ## Results - The macro successfully takes the active assembly and saves it as a new part file (.SLDPRT) that contains only exterior geometry. - The part file is automatically saved in the same directory as the original assembly file using the same file name base, except with the extension .SLDPRT. - The original assembly document remains unchanged. ## Steps to Set Up the Macro To deploy the SOLIDWORKS macro to save assembly as part utility, you must follow these simple steps: ### Prepare SolidWorks - Open SolidWorks and load the assembly document you wish to modify. - Your assembly must contain at least one part component. ### Configure and Run the Macro - Open the SolidWorks VBA editor by pressing (Alt + F11) from within SolidWorks. - Add a new module, and copy the [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) code provided below into the module you added. The module serves as the permanent destination for the code, ensuring the utility is saved within SOLIDWORKS for repeated, quick access. - Next, execute the macro in SolidWorks by navigating to Tools > Macro > Run, and select the file you saved. ### Outcome of Using the Macro - The macro will automatically save the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) as a new part file containing only the exterior parts. - The automation handles all the complex API settings for Save As Part simplification, ensuring that every time it is executed, in the same way, and the document preserves the history as a part file. - The original assembly will remain unchanged. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' SolidWorks application and document variables Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active SolidWorks document object Dim swModelDocExt As SldWorks.ModelDocExtension ' Extension object for advanced file operations Dim FilePath As String ' Full file path of the current document Dim PathSize As Long ' Length of the file path Dim PathNoExtension As String ' File path without extension Dim NewFilePath As String ' File path for the new part file Dim nErrors As Long ' Counter for errors during the save operation Dim nWarnings As Long ' Counter for warnings during the save operation ' Main subroutine Sub main() ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Check if a document is open If swModel Is Nothing Then MsgBox "No active document found. Please open a file." Exit Sub End If ' Get the ModelDocExtension object for advanced operations Set swModelDocExt = swModel.Extension ' Extract the file path and prepare the new file path FilePath = swModel.GetPathName ' Get the full file path of the active document PathSize = Strings.Len(FilePath) ' Get the length of the file path PathNoExtension = Strings.Left(FilePath, PathSize - 6) ' Remove the last 6 characters (e.g., ".SLDASM") NewFilePath = PathNoExtension & "SLDPRT" ' Append "SLDPRT" to create the new file path ' Set options to save only the exterior components swApp.SetUserPreferenceIntegerValue swSaveAssemblyAsPartOptions, swSaveAsmAsPart_ExteriorComponents ' Save the assembly as a new part file swModelDocExt.SaveAs NewFilePath, swSaveAsCurrentVersion, swSaveAsOptions_Silent, Nothing, nErrors, nWarnings ' Check for errors and warnings during the save operation If nErrors = 0 And nWarnings = 0 Then ' Success: Notify the user that the save operation was successful MsgBox "Assembly saved as part file successfully at: " & NewFilePath Else ' Failure: Notify the user about errors and warnings MsgBox "Failed to save assembly as part file. Errors: " & nErrors & ", Warnings: " & nWarnings End If End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Save%20Assy%20As%20Part%20%28Exterior%20Components%29.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/SaveAssemblyasPartExteriorComponents.swp). ## Customization and Advanced Solutions by Experts To get started with customizing this macro or to create any other fully custom solutions for your engineering projects, [reach out to our team](https://bluebyte.biz/contact/) of engineers today! **Categories:** macros **Tags:** vba macro --- ### [SolidWorks Macro for Feature Driven Component Pattern](https://bluebyte.biz/macros/solidworks-macro-for-feature-driven-component-pattern/) **Published:** October 22, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/CompPattern.html#description) This macro creates a feature-driven pattern for all selected components in an assembly. The last selection in the list is used as the driving pattern, such as a hole feature. [![SolidWorks Macro for Feature Driven Component Pattern and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a table with a blue top surface, a circular hole, and a supporting leg, with a feature tree on the left listing "History," "Annotations," "Front Plane," "Right Plane," and constraints like "base shelf" and "side plank." The "After" section shows a 2D sketch of the same table top with the circular hole, viewed from above, and the feature tree updated with "Sketch2" and similar constraints. Both sections include toolbars and a 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Feature-Driven-Component-Pattern.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Feature-Driven-Component-Pattern.png) ## System Requirements[](https://solidworksvbamacros.bluebyte.biz/src/CompPattern.html#system-requirements) - **SolidWorks Version**: SolidWorks 2014 or newer - **Operating System**: Windows 7 or later ## Pre-Conditions - An assembly document must be open in SolidWorks. - Multiple components and a feature to drive the pattern must be selected in the order required. ## Results - A derived component pattern will be created in the assembly based on the selected driving feature. ## Steps to Set Up and Run the Macro Follow these steps to outline the process, from the initial one-time file setup to the routine execution of the **Feature-Driven Component Pattern** utility. - **Register and Save the Macro File (One-time Setup):** - Go to Tools > Macro > New… in SOLIDWORKS.Give the macro file a descriptive name (e.g., FeatureDrivenPattern.swp) and it will save and automatically open the VBA editor.Paste the Code: Paste the code provided in the code window of the editor. This setup is essential when creating or using a SolidWorks macro for feature driven component pattern. - **Register and Save the Macro File (One-time Setup):** - Go to Tools > Macro > New… in SOLIDWORKS.Give the macro file a descriptive name (e.g., FeatureDrivenPattern.swp) and it will save and automatically open the VBA editor.Paste the Code: Paste the code provided in the code window of the editor - It will prompt you to save the file, and you can exit the editor. - **Prepare the Selections (Execution Pre-condition):** - In the assembly that is currently active, [select all target components](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/) to be patterned. - Importantly, [select the driving pattern feature](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/) (for example, a hole feature or cut pattern) as the last selection. The macro uses this last item to identify the pattern geometry. - **Execute the Macro:** Once the components are specified and the driving feature is selected, execute the macro via Tools > Macro > Run, or by using the keyboard shortcut assigned to it. The macro will immediately create the feature-driven component pattern. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object Dim SelMgr As Object ' Selection manager for the active document Dim boolstatus As Boolean ' Boolean status for operations Dim longstatus As Long, longwarnings As Long ' Long status for warnings/errors Dim Feature As Object ' Feature object Dim CurSelCount As Long ' Count of selected items Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Ensure there is an active document If Part Is Nothing Then MsgBox "No active document found. Please open a part or assembly and try again.", vbCritical, "Error" Exit Sub End If ' Initialize the selection manager Set SelMgr = Part.SelectionManager ' Disable input dimensions on creation swApp.SetUserPreferenceToggle swInputDimValOnCreate, False ' Check if a plane or face is preselected CurSelCount = SelMgr.GetSelectedObjectCount If CurSelCount = 0 Then MsgBox "Please preselect a plane or face before running the macro.", vbExclamation, "No Selection" Exit Sub End If ' Insert a new sketch on the selected plane or face boolstatus = Part.Extension.SelectByID2("", "PLANE", 0, 0, 0, False, 0, Nothing, 0) Part.InsertSketch2 True Part.ClearSelection2 True ' Create a rectangle centered about the origin Part.SketchRectangle -0.037, 0.028, 0, 0.015, -0.019, 0, True ' Clear selection and add a diagonal construction line Part.ClearSelection2 True Dim Line As Object Set Line = Part.CreateLine2(-0.037, -0.019, 0, 0.015, 0.028, 0) Line.ConstructionGeometry = True ' Add midpoint constraints to ensure the rectangle is centered boolstatus = Part.Extension.SelectByID2("Point1@Origin", "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0) Part.SketchAddConstraints "sgATMIDDLE" Part.ClearSelection2 True ' Add dimensions to the rectangle boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", -0.001, 0.027, 0, False, 0, Nothing, 0) Dim Annotation As Object Set Annotation = Part.AddDimension2(-0.0004, 0.045, 0) ' Horizontal dimension Part.ClearSelection2 True boolstatus = Part.Extension.SelectByID2("Line2", "SKETCHSEGMENT", -0.030, 0.001, 0, False, 0, Nothing, 0) Set Annotation = Part.AddDimension2(-0.061, -0.001, 0) ' Vertical dimension Part.ClearSelection2 True ' Re-enable input dimensions on creation swApp.SetUserPreferenceToggle swInputDimValOnCreate, True ' Inform the user that the macro is complete MsgBox "Rectangle sketch created successfully.", vbInformation, "Success" End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/CompPattern.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/CompPattern.swp). ## Build More Effective Custom Solutions With Our Team Of Experts! [Contact us](https://bluebyte.biz/contact/) today to discuss your custom automation solutions – and beyond! **Categories:** macros --- ### [SolidWorks Macro to Efficiently Manage Assembly by Hiding All Sketches](https://bluebyte.biz/macros/solidworks-macro-to-efficiently-manage-assembly-by-hiding-all-sketches/) **Published:** October 21, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/HideAllSketchesInAssy.html#description) This macro hides all visible sketches in the active assembly. This is useful for cleaning up the view in complex assemblies where multiple sketches may clutter the workspace. [![SolidWorks Macro to Efficiently Manage Assembly by Hiding All Sketches and An image divided into two side-by-side sections labeled "Before" and "After," showing a 3D model of a gas cylinder in a SOLIDWORKS interface. The "Before" section displays the cylinder with a handle and valve assembly at the top, a blue plane labeled "Plane2" and "Plane4" intersecting it, and a circular base outline. The "After" section shows the same cylinder with the handle and valve assembly adjusted, the blue planes repositioned, and the circular base outline removed, indicating a refined design. Both sections include a 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Efficiently-Manage-Assembly-by-Hiding-All-Sketches.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Efficiently-Manage-Assembly-by-Hiding-All-Sketches.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Prerequisites - An assembly document must be the active document and open in SolidWorks. - At least one of the [components in the assembly](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/) must have a sketch feature currently displayed to be relevant to the macro’s action. ## Results - The macro will iterate through the [feature tree of the assembly](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) and all nested components, and all visible sketches will become hidden globally across the active assembly. ## Steps to Set Up the Macro To quickly get the SolidWorks macro to efficiently [manage assembly](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/) by hiding all sketches up and running, follow these brief instructions: 1. **Open the Target Assembly:** Open the desired SolidWorks assembly file to be the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) that will hide sketches. 2. **Load the Macro:** Open the VBA editor by selecting Alt+F11, then load the macro file (SWP) into the SolidWorks Environment. 3. **Execute The Macro:** Run the macro by navigating to Tools → Macro → Run, in the SolidWorks interface. *Pro-Tip: It is highly recommended to assign a keyboard shortcut or a toolbar button to this macro to achieve maximum speed and efficiency.* ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). ' ********************************************************* ' Hide All Sketches.swp ' Description: Macro to hide all sketches in the active assembly. ' ********************************************************* Option Explicit ' Subroutine to hide a sketch feature Sub BlankSketchFeature(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, swFeat As SldWorks.Feature) Dim bRet As Boolean ' Check if the feature is a sketch If "ProfileFeature" = swFeat.GetTypeName Then ' Select the sketch and hide it bRet = swFeat.Select2(False, 0): Debug.Assert bRet swModel.BlankSketch End If End Sub ' Subroutine to traverse features and their subfeatures Sub TraverseFeatureFeatures(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, swFeat As SldWorks.Feature, nLevel As Long) Dim swSubFeat As SldWorks.Feature Dim swSubSubFeat As SldWorks.Feature Dim swSubSubSubFeat As SldWorks.Feature Dim sPadStr As String Dim i As Long Dim bRet As Boolean ' Create padding for debug output based on the level of recursion For i = 0 To nLevel sPadStr = sPadStr + " " Next i ' Traverse through all features While Not swFeat Is Nothing Debug.Print sPadStr + swFeat.Name + " [" + swFeat.GetTypeName + "]" BlankSketchFeature swApp, swModel, swFeat ' Traverse subfeatures Set swSubFeat = swFeat.GetFirstSubFeature While Not swSubFeat Is Nothing Debug.Print sPadStr + " " + swSubFeat.Name + " [" + swSubFeat.GetTypeName + "]" BlankSketchFeature swApp, swModel, swSubFeat ' Traverse sub-subfeatures Set swSubSubFeat = swSubFeat.GetFirstSubFeature While Not swSubSubFeat Is Nothing Debug.Print sPadStr + " " + swSubSubFeat.Name + " [" + swSubSubFeat.GetTypeName + "]" BlankSketchFeature swApp, swModel, swSubSubFeat ' Traverse sub-sub-subfeatures Set swSubSubSubFeat = swSubSubFeat.GetFirstSubFeature While Not swSubSubSubFeat Is Nothing Debug.Print sPadStr + " " + swSubSubSubFeat.Name + " [" + swSubSubSubFeat.GetTypeName + "]" BlankSketchFeature swApp, swModel, swSubSubSubFeat Set swSubSubSubFeat = swSubSubSubFeat.GetNextSubFeature Wend Set swSubSubFeat = swSubSubFeat.GetNextSubFeature Wend Set swSubFeat = swSubFeat.GetNextSubFeature Wend Set swFeat = swFeat.GetNextFeature Wend End Sub ' Subroutine to traverse features of a component Sub TraverseComponentFeatures(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, swComp As SldWorks.Component2, nLevel As Long) Dim swFeat As SldWorks.Feature Set swFeat = swComp.FirstFeature TraverseFeatureFeatures swApp, swModel, swFeat, nLevel End Sub ' Subroutine to traverse components and their features Sub TraverseComponent(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, swComp As SldWorks.Component2, nLevel As Long) Dim vChildComp As Variant Dim swChildComp As SldWorks.Component2 Dim sPadStr As String Dim i As Long ' Create padding for debug output based on the level of recursion For i = 0 To nLevel - 1 sPadStr = sPadStr + " " Next i ' Get child components and traverse them vChildComp = swComp.GetChildren For i = 0 To UBound(vChildComp) Set swChildComp = vChildComp(i) Debug.Print sPadStr & "+" & swChildComp.Name2 & " " TraverseComponentFeatures swApp, swModel, swChildComp, nLevel TraverseComponent swApp, swModel, swChildComp, nLevel + 1 Next i End Sub ' Subroutine to traverse features in the main model Sub TraverseModelFeatures(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, nLevel As Long) Dim swFeat As SldWorks.Feature Set swFeat = swModel.FirstFeature TraverseFeatureFeatures swApp, swModel, swFeat, nLevel End Sub ' Main subroutine to execute the macro Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swConf As SldWorks.Configuration Dim swRootComp As SldWorks.Component2 Dim nStart As Single ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel Is Nothing Then MsgBox "No active document found. Please open an assembly.", vbExclamation, "Error" Exit Sub End If Set swConf = swModel.GetActiveConfiguration Set swRootComp = swConf.GetRootComponent ' Start timing the process nStart = Timer Debug.Print "File = " & swModel.GetPathName ' Traverse and hide all sketches in the model TraverseModelFeatures swApp, swModel, 1 TraverseComponent swApp, swModel, swRootComp, 1 ' Output elapsed time Debug.Print "Time = " & Timer - nStart & " s" End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/HideAllSketchesInAssy.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/HideAllSketchesInAssy.swp). ## Customize with Expert Support [Contact us](https://bluebyte.biz/contact/) today and get the most from your SolidWorks automation. **Categories:** macros --- ### [SOLIDWORKS Macro to Export Assembly Components as Parasolid](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) **Published:** October 20, 2025 **Author:** Amen Jlili **Content:** ## Description The macro will traverse your open SOLIDWORKS assembly file (.SLDASM) methodically and recursively, detect each child component (part), and then proceed to automatically save each part in the stable Parasolid (X\_T) format. The macro traverses recursively through the assembly structure so that each part is saved based on the part name. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later. ## Pre-requisites To execute the macro, the following conditions must be satisfied: - The active document within SOLIDWORKS needs to be an assembly document (.SLDASM). - There should be a valid output folder path ready to receive the Parasolid (X\_T) files. ## Results The results of your [automated batch export](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) process are: - A separate Parasolid (X\_T) file will be created for [each unique part](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-all-components/) that is processed in the assembly’s hierarchy. - The files will be exported to the [user-specified folder path](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-exterior-components/) and retain the original part file name used when exporting. - The macro also intelligently skips parts that are suppressed or already opened in a second SOLIDWORKS window. ## Steps to Set Up the Macro - **Register Macro File:** Open either a new or existing SolidWorks session and navigate to the Tools > Macro > New… - **Name Macro File:** It is advisable to give the macro an appropriate title, such as “BatchAssemblyToXT.swp”, which will stand for easier identification in the future. Once you have saved, another dialog will then display with the VBA editor open. - **Paste the code:** Download and copy the VBA code provided for you below, and paste it into your editor. This process setup is typically used when a creating SOLIDWORKS macro to [export assembly components](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/) as parasolid efficiently. - **Execute the Macro:** Wait for the prompt to save your work and close the editor. With the assembly open, you can now run your macro through Tools > Macro > Run, or by using a previously assigned shortcut. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' -------------------------------------------------------------------------- ' Main subroutine to initialize the process and prompt the user for a save path ' -------------------------------------------------------------------------- Sub main() ' Declare necessary SolidWorks objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object (assembly) Dim savepath As String ' User input for the folder path to save Parasolid files ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if there is an active document open If swModel Is Nothing Then MsgBox "No active document found. Please open an assembly and try again.", vbCritical, "No Active Document" Exit Sub End If ' Prompt user for the folder path to save Parasolid files savepath = InputBox("Where do you want to save the Parasolid (X_T) files?") ' Call the traverse function to iterate through components and save as Parasolid files traverse swApp.ActiveDoc, savepath End Sub ' -------------------------------------------------------------------------- ' Recursive function to traverse through the assembly components and save parts ' -------------------------------------------------------------------------- Function traverse(Pathname As ModelDoc2, savepath As String) ' Declare necessary variables and objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Model document object for components Dim swConfMgr As SldWorks.ConfigurationManager ' Configuration manager object Dim swConf As SldWorks.Configuration ' Configuration object for the active configuration Dim swRootComp As SldWorks.Component2 ' Root component of the assembly Dim vChildComp As Variant ' Array of child components in the assembly Dim swChildComp As SldWorks.Component2 ' Individual child component object Dim i As Long ' Loop counter for iterating through child components Dim longstatus As Long ' Status variable for capturing save operations ' Initialize SolidWorks application Set swApp = Application.SldWorks Set swModel = Pathname ' Set the model to the input pathname (active document) ' Get the configuration manager and active configuration of the model Set swConfMgr = swModel.ConfigurationManager Set swConf = swConfMgr.ActiveConfiguration ' Get the root component of the assembly Set swRootComp = swConf.GetRootComponent3(True) ' Get the child components of the root component vChildComp = swRootComp.GetChildren ' Loop through each child component in the assembly For i = 0 To UBound(vChildComp) Set swChildComp = vChildComp(i) ' Set the child component ' Get the model document of the child component Set swModel = swChildComp.GetModelDoc2 ' If the child component is a part, traverse further or save as Parasolid (X_T) If Not swModel Is Nothing Then ' Check if the component is an assembly (type 2 = swDocASSEMBLY) If swModel.GetType = 2 Then ' Recursively traverse through sub-assemblies traverse swModel, savepath Else ' Save the part as a Parasolid (X_T) file in the specified folder longstatus = swModel.SaveAs3(savepath & "\" & swModel.GetTitle & ".X_T", 0, 0) End If End If Next i End Function ' -------------------------------------------------------------------------- ' Function to extract the title (filename without extension) from the path ' -------------------------------------------------------------------------- Public Function GetTitle(Path As String) As String ' Declare necessary variables Dim path1 As Variant ' Array to hold path segments Dim title As String ' Extracted title (filename without extension) ' Split the path into segments based on "\" path1 = Split(Path, "\") ' Get the last segment of the path as the filename title = path1(UBound(path1)) ' Return the title without the file extension GetTitle = Left(title, InStr(title, ".") - 1) End Function ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/ExportToParasolid.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/ExportAsPARASOLID.swp). [Reach out, and we’d be happy to assist with integrating this or any other batch process into a more complete system based on your needs.](https://bluebyte.biz/contact) **Categories:** macros --- ### [Why “Class Not Registered” Happens When Loading SOLIDWORKS PDM Add-ins](https://bluebyte.biz/solidworks/solidworkspdm/why-class-not-registered-happens-when-loading-solidworks-pdm-add-ins/) **Published:** October 15, 2025 **Author:** Amen Jlili **Content:** [![](https://bluebyte.biz/wp-content/uploads/2025/10/image-3.png)](https://bluebyte.biz/wp-content/uploads/2025/10/image-3.png) If you have ever tried loading a PDM add-in and hit a confusing startup error, understanding why “class not registered” happens when loading SOLIDWORKS PDM add-ins is the first step to fixing it. This issue usually points to a broken or incomplete COM registration, often caused by mismatched permissions or missing system components. When a SOLIDWORKS PDM add-in fails to load with the message: > **Failed to load add-in** > `Reason: Class not registered` the cause often isn’t the add-in code or COM registration itself:[ It’s the elevation context in which the host application runs](https://stackoverflow.com/questions/5649544/component-creation-fails-under-uac-admin-works-without-uac-elevation). Windows isolates COM registrations between two different scopes: COM Registration ScopeRegistry LocationAccessible When**Per-User**`HKEY_CURRENT_USER\Software\Classes\CLSID`The process runs *non-elevated* (normal user context).**Per-Machine**`HKEY_LOCAL_MACHINE\Software\Classes\CLSID`The process runs *elevated* (as Administrator) or system-wide.When you [register your SOLIDWORKS PDM add-in](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/) (e.g. `CardSync.dll`) using regasm or the PDM Administration tool, it is normally stored under the current user’s profile (HKCU). However, if the host process like File Explorer, PDM Explorer, or even your test harness (Orca.Tests.exe – At Blue Byte Systems, we have developed our very own unit testing framework for add-ins), runs as Administrator, Windows will block access to any COM object registered *per user*. That’s exactly what the **[“Class not registered”](https://bluebyte.biz/pdm-api-tips/common-must-know-solidworks-epdm-add-ins-errors-for-api-enthusiasts/)** dialog means. [SOLIDWORKS PDM Explorer](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/) itself is not designed to run elevated. When your own executable or service is launched as *Administrator*, it now operates in a different COM security boundary and cannot see the user-level registration of your add-in. In the example of the screenshot above, I’m debugging inside **Visual Studio (ADMIN)** and launching my process from there. The moment Visual Studio is elevated, every child process (including your test harness) inherits that elevation, and therefore loses access to the per-user COM registry hive. ## Microsoft’s Official Explanation > Applications that are run-elevated [(whether manifested as *RequireAdministrator* or selected via *Run as Administrator*](https://learn.microsoft.com/en-us/previous-versions/bb756926(v=msdn.10)?redirectedfrom=MSDN)), as well as applications run from an Administrator account where UAC is disabled, **cannot access any COM objects configured per-user.** (Source: [MSDN – “Manifestation”](https://learn.microsoft.com/en-us/previous-versions/bb756926(v=msdn.10)) and [Stack Overflow discussion](https://stackoverflow.com/questions/5649544/component-creation-fails-under-uac-admin-works-without-uac-elevation)) ### How to Fix or Avoid It - **Do not run Visual Studio or your test tool “as Administrator”.** - Keep it at normal user level so it shares the same registry hive as SOLIDWORKS PDM Explorer. - Verify which hive your CLSID resides in: - `HKEY_CURRENT_USER\Software\Classes\CLSID\{Your-GUID}` → per-user only. - `HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{Your-GUID}` → visible to elevated processes. - If elevation is required (for example, when writing to Program Files), [register your add-in for all users](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/) using: ``` regasm CardSync.dll /codebase /tlb /nologo /regfile:addin.reg reg import addin.reg /reg:64 ``` ## Our Practical Advice > If your application interacts with [SOLIDWORKS PDM’s COM APIs](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/), **never run it as Administrator** unless the add-in is registered per-machine. **Categories:** add-ins, SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [SolidWorks Macro to Export Sheet Metal to DXF in SOLIDWORKS](https://bluebyte.biz/macros/solidworks-macro-to-export-sheet-metal-to-dxf-in-solidworks/) **Published:** October 15, 2025 **Author:** Amen Jlili **Content:** ## Description The macro processes an active SOLIDWORKS assembly file (.SLDASM) in a systematic fashion, finds each sheet metal part, and exports its corresponding flat pattern geometry to a DXF file. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2017 or higher - **VBA Environment:** Pre-installed in SOLIDWORKS (To access, select Tools > Macro > New or Edit) - **Operating System:** Windows 7, 8, 10, or higher ## Pre-requisites In order to run the macro, the following requirements must be met: - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be an assembly document (.SLDASM) inside SOLIDWORKS. - The [components in the assembly](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) must have valid sheet metal parts created with a formed flat pattern. - In order to run the macro, SOLIDWORKS must be installed and opened on the computer. ## Results - A [DXF file](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/) is generated for each distinct sheet metal part that we process, which contains the flat pattern. - The DXF files are placed in the unique directory intended for their SOLIDWORKS part file source. - The macro calls the ExportToDWG2 method so that the flat pattern can be issue accurate and complete with bend lines. ## Steps to Set Up the Macro 1. **Register Macro File:** Either from SolidWorks opened already or not, go to Tools > Macro > New… 2. **Name Macro File:** To help identify your macro in the future, a good practice is to name the macro something relevant. For example, if you are creating a SolidWorks macro to export sheet metal to DXF in SOLIDWORKS, you might call the file “BatchSheetMetalDXF.swp”. Once you have named the macro, you can hit save. A new editor window for your VBA editor should open automatically. 3. **Paste the code:** Download the VBA code we have provided for you below and place it in your editor. 4. **Run Macro:** Exit out of your editor and save your work when prompted. With a Sheet Metal assembly active (the sheet metal option should check under “View>Hide/Show>Sheet Metal”), you are now able to run your macro via Tools > Macro > Run, or via your previously assigned shortcut. ## **VBA Macro Code** ``` Option Explicit ' ******************************************************************** ' DISCLAIMER: ' This code is provided as-is with no warranty or liability by ' Blue Byte Systems Inc. The company assumes no responsibility for ' any issues arising from the use of this code in production. ' ******************************************************************** ' Enum for Sheet Metal export options Enum SheetMetalOptions_e ExportFlatPatternGeometry = 1 IncludeHiddenEdges = 2 ExportBendLines = 4 IncludeSketches = 8 MergeCoplanarFaces = 16 ExportLibraryFeatures = 32 ExportFormingTools = 64 ExportBoundingBox = 2048 End Enum ' solidworks app variable Dim swApp As SldWorks.SldWorks Dim swModelDoc As ModelDoc2 Dim swAssemblyDoc As AssemblyDoc Dim swComponents As Variant Dim swComponent As Component2 Dim swComponentIterator Dim processedFiles() As String Sub Main() ReDim processedFiles(0) processedFiles(0) = "" Set swApp = Application.SldWorks Set swModelDoc = swApp.ActiveDoc Set swAssemblyDoc = swModelDoc swComponents = swAssemblyDoc.GetComponents(False) For Each swComponentIterator In swComponents Set swComponent = swComponentIterator Dim swComponentModelDoc As ModelDoc2 Set swComponentModelDoc = swComponent.GetModelDoc2 If Not swComponentModelDoc Is Nothing Then If ExistsInProcessedFiles(processedFiles, swComponentModelDoc.GetPathName()) = False Then addItemToProcessedFiles processedFiles, swComponentModelDoc.GetPathName() PrintDXF swComponentModelDoc End If End If Next swComponentIterator End Sub Function ExistsInProcessedFiles(ByRef arr() As String, fileName As Variant) As Boolean Dim i As Long For i = LBound(arr) To UBound(arr) If arr(i) = fileName Then ExistsInProcessedFiles = True Exit Function End If Next i ExistsInProcessedFiles = False End Function Sub PrintDXF(ByRef swmodel As ModelDoc2) If swmodel.GetType() = swDocumentTypes_e.swDocPART Then Dim swPart As PartDoc Set swPart = swmodel Dim modelPath As String modelPath = swmodel.GetPathName Dim outPath As String outPath = Left(modelPath, Len(modelPath) - 6) outPath = outPath + "dxf" swmodel.Visible = True Dim saveDXF As Boolean saveDXF = swPart.ExportToDWG2(outPath, modelPath, swConst.swExportToDWG_e.swExportToDWG_ExportSheetMetal, True, vbEmpty, False, False, SheetMetalOptions_e.ExportFlatPatternGeometry + SheetMetalOptions_e.ExportFlatPatternGeometry + SheetMetalOptions_e.ExportFlatPatternGeometry + SheetMetalOptions_e.ExportBendLines, vbEmpty) If saveDXF Then Debug.Print swmodel.GetTitle() & " saved" Else Debug.Print swmodel.GetTitle() & " failed to save" End If swmodel.Visible = False End If End Sub Public Sub addItemToProcessedFiles(ByRef arr() As String, ByVal processedFile As String) Dim arrLength As Long arrLength = UBound(arr) If arrLength < 0 Then ReDim arr(0) arr(0) = processedFile Else ReDim Preserve arr(arrLength + 1) arr(arrLength + 1) = processedFile End If End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/assembly_export_dxf.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/assembly_export_dxf.swp). ## **Need Customization & Expert Support?** Our specialized team at **[Blue Byte Systems Inc](https://bluebyte.biz/contact/).** develops custom macros and add-ins to meet these advanced workflow needs. **Categories:** macros --- ### [SolidWorks Macro for Instant Centered Rectangle Sketching: SketchBox](https://bluebyte.biz/macros/solidworks-macro-for-instant-centered-rectangle-sketching-sketchbox/) **Published:** October 13, 2025 **Author:** Amen Jlili **Content:** ## Description You can utilize the tool for the purpose of creating a rectangle that is centered about the origin, on a selected plane or face. [![SolidWorks Macro for Instant Centered Rectangle Sketching](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Instant-Centered-Rectangle-Sketching-1024x366.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-for-Instant-Centered-Rectangle-Sketching.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - [plane or face must be pre-selected](https://bluebyte.biz/macros/solidworks-macro-for-feature-driven-component-pattern/) prior to starting the macro. - SolidWorks must have an [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/). ## Results - A centered rectangle will be drawn on the specified plane or face. - The opposite corners of the rectangle will have a construction line drawn between them, which will be constrained to the origin. - The rectangle’s width and height will be created. ## Steps to Set Up the Macro 1. **Choose a Plane or Face:** In your SolidWorks document, pre-select the plane (e.g., Right Plane) or planar face on which the rectangle will be sketched. 2. **Execute the Macro:** Now run the macro (preferably via an assigned keyboard shortcut for maximum speed). The centered rectangle and all related features will be completely created on the selected geometry. This SOLIDWORKS macro for instant centered rectangle sketching ensures that the sketch is generated quickly and precisely without manual alignment. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object Dim SelMgr As Object ' Selection manager for the active document Dim boolstatus As Boolean ' Boolean status for operations Dim longstatus As Long, longwarnings As Long ' Long status for warnings/errors Dim Feature As Object ' Feature object Dim CurSelCount As Long ' Count of selected items Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Ensure there is an active document If Part Is Nothing Then MsgBox "No active document found. Please open a part or assembly and try again.", vbCritical, "Error" Exit Sub End If ' Initialize the selection manager Set SelMgr = Part.SelectionManager ' Disable input dimensions on creation swApp.SetUserPreferenceToggle swInputDimValOnCreate, False ' Check if a plane or face is preselected CurSelCount = SelMgr.GetSelectedObjectCount If CurSelCount = 0 Then MsgBox "Please preselect a plane or face before running the macro.", vbExclamation, "No Selection" Exit Sub End If ' Insert a new sketch on the selected plane or face boolstatus = Part.Extension.SelectByID2("", "PLANE", 0, 0, 0, False, 0, Nothing, 0) Part.InsertSketch2 True Part.ClearSelection2 True ' Create a rectangle centered about the origin Part.SketchRectangle -0.037, 0.028, 0, 0.015, -0.019, 0, True ' Clear selection and add a diagonal construction line Part.ClearSelection2 True Dim Line As Object Set Line = Part.CreateLine2(-0.037, -0.019, 0, 0.015, 0.028, 0) Line.ConstructionGeometry = True ' Add midpoint constraints to ensure the rectangle is centered boolstatus = Part.Extension.SelectByID2("Point1@Origin", "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0) Part.SketchAddConstraints "sgATMIDDLE" Part.ClearSelection2 True ' Add dimensions to the rectangle boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", -0.001, 0.027, 0, False, 0, Nothing, 0) Dim Annotation As Object Set Annotation = Part.AddDimension2(-0.0004, 0.045, 0) ' Horizontal dimension Part.ClearSelection2 True boolstatus = Part.Extension.SelectByID2("Line2", "SKETCHSEGMENT", -0.030, 0.001, 0, False, 0, Nothing, 0) Set Annotation = Part.AddDimension2(-0.061, -0.001, 0) ' Vertical dimension Part.ClearSelection2 True ' Re-enable input dimensions on creation swApp.SetUserPreferenceToggle swInputDimValOnCreate, True ' Inform the user that the macro is complete MsgBox "Rectangle sketch created successfully.", vbInformation, "Success" ``` ### Macro You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/SketchBox.swp). **Categories:** macros --- ### [SolidWorks Macro to Instantly Isolate Selected Components in an Assembly](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/) **Published:** October 12, 2025 **Author:** Amen Jlili **Content:** ## Description[](https://solidworksvbamacros.bluebyte.biz/src/Isolate.html#description) Pre-select one or more components in an assembly and execute the macro. The selected components will become isolated in the assembly. The SolidWorks macro to instantly isolate selected components in an assembly can be placed on the Graphics Area menu (which pops up when you right-click a component) for convenient access. [![SolidWorks Macro to Instantly Isolate Selected Components in an Assembly and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a rectangular block with a red cylindrical component attached to its top surface, and a feature tree on the left listing "Control Panel" and "Valve Assembly" with various constraints and features like "Lifted Control." The "After" section shows the same block with the red cylindrical component removed, leaving a cutout section, and the feature tree updated to reflect the modified assembly. Both sections include toolbars and a 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Instantly-Isolate-Selected-Components-in-an-Assembly-1024x288.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SolidWorks-Macro-to-Instantly-Isolate-Selected-Components-in-an-Assembly-scaled.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Prerequisites - At least one component must be [pre-selected in an active SolidWorks assembly document](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/). - The active document must be an assembly document (.SLDASM). ## Results - The pre-selected components will be isolated in the assembly environment. - If no components are selected, or if the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) is not an assembly document, a message box will appear to direct the user to do so. ## Steps to Set Up the Macro 1. **Registering the Macro File:** Make sure you have SolidWorks open, and navigate to Tools > Macro > New… 2. **Name and Register:** Name the macro meaningfully (e.g., IsolateComponents.swp), then save the file. This will automatically [open your VBA editor](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/). 3. **Paste the VBA code:** Please download the VBA code we have listed below and place it within your editor. 4. **Run Macro (Optional Next Setup):** Close the VBA editor and save when prompted. Now you can run the macro with Tools > Macro > Run, or with a shortcut, or you can add it to a shortcut menu for convenience. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Main subroutine to isolate selected components in an assembly Sub main() ' Declare SolidWorks application and active document objects Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object (assembly) Dim boolstatus As Boolean ' Boolean status to capture operation results Dim longstatus As Long, longwarnings As Long ' Long variables for capturing status and warnings ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Check if there is an active document open If Part Is Nothing Then MsgBox "No active document found. Please open an assembly and try again.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is an assembly If Part.GetType swDocASSEMBLY Then MsgBox "This macro only works on assemblies. Please open an assembly and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Isolate the pre-selected components in the assembly ' RunCommand with ID 2726 is used to isolate components in SolidWorks boolstatus = Part.Extension.RunCommand(2726, "") ' Note: The following command can be used to exit isolation mode if required: ' boolstatus = Part.Extension.RunCommand(2732, "") ' RunCommand ID 2732 exits isolate mode ' Clean up by releasing references to objects Set Part = Nothing Set swApp = Nothing End Sub ``` ### Macro You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Isolate_Component_In_Assembly.swp). We build [custom macros and add-ins](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) that meet your specific workflow needs. [Contact us](https://bluebyte.biz/contact/) to discuss custom development needs and projects! **Categories:** macros --- ### [SOLIDWORKS Macro to Save Drawings as PDF (Toolbar Button Integration)](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/) **Published:** October 10, 2025 **Author:** Amen Jlili **Content:** ## Description This macro is a one-action solution that exports the active SolidWorks drawing as a PDF file. It combines all the drawing sheets into one single PDF file. This utility is made to be paired with a custom button on the SolidWorks toolbar as a quick one-click way for engineers to create a SolidWorks PDF directly from the drawing environment. The SOLIDWORKS macro to save drawings as PDF makes this process even more efficient by [automating the export](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/) with a single command. ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-Conditions - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be a saved drawing file (.SLDDRW). - The drawing file must have a [valid path](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/) (not saved to read-only). - This macro is designed to exclusively work with drawing documents and will not work with part or assembly files. ## Results - Every sheet contained in the active drawing is [exported into a single PDF file](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/). - The PDF file is automatically saved in the same directory as the original drawing file, and uses the original drawing name with the extension of .PDF. - A message box indicates the status of the operation (Completion status or Failure). ## Steps to Set Up the Macro To create the one-click PDF export functionality: 1. **Create the Macro File:** In SolidWorks, choose Tools > Macro > New…. 2. **Save the File:** Give the macro a name (e.g., ExportDrawingPDF.swp) and save it to a location you intend to keep it. The VBA editor will launch immediately after. 3. **Insert the Code:** Copy the code from the “VBA Macro Code” below and paste it in the VBA editor, erasing the prefilled content. 4. **Save and Close:** Save in the VBA editor. 5. **Create the Button on the Toolbar:** - Go to: Tools > Customize (this can also be called Options > Customize). - Click on the Commands tab. - Select Macro from the Categories list. - Click and drag the ‘New Macro Button’ and drop it in an existing toolbar, or create a new custom toolbar. - **Configure the Button:** Right-click the new button and select “Customize Macro Button…”. - **Macro File:** Browse to the folder where you saved the ExportDrawingPDF.swp and select it. - **Method:** Specify the main subroutine. - **Tooltip/Image:** Provide an appropriate tooltip (e.g., One-Click Save as PDF) and also provide a toolbar icon. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' -------------------------------------------------------------------------- ' Main subroutine to save the active drawing as a PDF file ' -------------------------------------------------------------------------- Sub main() ' Declare and initialize necessary SolidWorks objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object (drawing) Dim swModelDocExt As SldWorks.ModelDocExtension ' Document extension object for saving operations Dim swExportData As SldWorks.ExportPdfData ' PDF export data object Dim boolstatus As Boolean ' Boolean status to capture operation results Dim filename As String ' String to hold the file path of the drawing Dim lErrors As Long ' Error variable for save operation Dim lWarnings As Long ' Warning variable for save operation ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if there is an active document open If swModel Is Nothing Then MsgBox "No current document. Please open a drawing and try again.", vbCritical, "No Active Document" End End If ' Check if the active document is a drawing If swModel.GetType swDocDRAWING Then MsgBox "This macro only works on drawings. Please open a drawing and try again.", vbCritical, "Invalid Document Type" End End If ' Get the document extension object for saving operations Set swModelDocExt = swModel.Extension ' Get the export PDF data object to specify PDF export options Set swExportData = swApp.GetExportFileData(swExportPDFData) ' Get the file path of the active drawing filename = swModel.GetPathName ' Check if the drawing has been saved previously (it must have a valid file path) If filename = "" Then MsgBox "Please save the file first and try again.", vbCritical, "File Not Saved" End End If ' Generate the PDF file path by changing the file extension to .PDF filename = Strings.Left(filename, Len(filename) - 6) & "PDF" ' Set the export option to include all sheets in the PDF file boolstatus = swExportData.SetSheets(swExportData_ExportAllSheets, 1) ' Save the drawing as a PDF file using the specified filename and options boolstatus = swModelDocExt.SaveAs(filename, 0, 0, swExportData, lErrors, lWarnings) ' Check if the save operation was successful and display a message box If boolstatus Then MsgBox "Save as PDF successful!" & vbNewLine & filename, vbInformation, "Save Successful" Else MsgBox "Save as PDF failed. Error code: " & lErrors, vbExclamation, "Save Failed" End If End Sub ``` ### Macro You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_Drawing_As_Pdf.swp) ## **Need a Macro Developed to Improve Your Custom Workflow?** [Contact us](https://bluebyte.biz/contact/) to either customize this macro or build completely new solutions to satisfy your specific workflow needs precisely. **Categories:** macros --- ### [SOLIDWORKS Macro to Save Drawing as PDF (Instant Export)](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/) **Published:** October 9, 2025 **Author:** Amen Jlili **Content:** ## Description - This macro is a quick option to get the currently active part or assembly drawing in SolidWorks, saved as a PDF. - The PDF will automatically get the same name and save in the same folder as the drawing. ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - The active document must be saved as a drawing (.SLDDRW) file. - The drawing file must contain [at least one sheet](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/). - Confirm that the drawing is open and that it is the [active document](https://bluebyte.biz/macros/solidworks-macro-for-reloading-sheet-formats-in-drawing-documents/) before running the macro. ## Results - The macro will export [all sheets of the active drawing](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/) into a single PDF file. - The SolidWorks PDF will be [saved in the same directory as the original drawing file](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/), using the same name as the drawing. ## Steps to Set Up the Macro To configure the macro in your SolidWorks environment, complete the following steps: 1. **Register the Macro File:** Start by opening SolidWorks and go to Tools > Macro > New… 2. **Name and Register Your Macro:** Provide a descriptive name (i.e., SaveDrawingAsPDF.swp) and then save the file wherever you like on the system. This should automatically launch the VBA editor. 3. **Place the Code:** Paste the VBA code provided (located below in the `Example [VBA Macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) Code` section) into the VBA editor (ensuring that the default code is overwritten) 4. **Execute the Macro:** Close the VBA editor and save it when prompted. 5. **Assign Shortcut (Optional but Recommended):** Either go to Tools > Customize, or Options > Customize, depending on your environment, and: - Go to the Keyboard tab. - Filter by Macros in the “Commands” box. - Find your saved macro, click in the “Shortcut” box, and enter a preferred key combo (i.e., Ctrl + Shift + P), and you will have an [instantaneous SolidWorks PDF export](https://bluebyte.biz/macros/how-to-export-flat-patterns-with-pdmpublisher/). This process essentially creates a SOLIDWORKS macro to [save drawing as PDF](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/), allowing users to quickly generate PDM files directly from the drawing environment. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Sub main() ' Declare and initialize necessary SolidWorks objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object Dim swModelDocExt As SldWorks.ModelDocExtension ' Model document extension object Dim swExportData As SldWorks.ExportPdfData ' PDF export data object Dim boolstatus As Boolean ' Status of export operation Dim filename As String ' Filename of the PDF to be saved Dim lErrors As Long ' Variable to capture errors during save Dim lWarnings As Long ' Variable to capture warnings during save ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if a document is currently open in SolidWorks If swModel Is Nothing Then MsgBox "No active document found. Please open a drawing and try again.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is a drawing If swModel.GetType swDocDRAWING Then MsgBox "This macro only works with drawing files. Please open a drawing and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Get the extension object of the active drawing document Set swModelDocExt = swModel.Extension ' Initialize the PDF export data object Set swExportData = swApp.GetExportFileData(swExportPDFData) ' Get the file path of the active drawing filename = swModel.GetPathName ' Check if the drawing has been saved If filename = "" Then MsgBox "The drawing must be saved before exporting to PDF. Please save the drawing and try again.", vbCritical, "Save Required" Exit Sub End If ' Modify the file path to save as PDF (replace extension with .PDF) filename = Strings.Left(filename, Len(filename) - 6) & "PDF" ' Set the export option to include all sheets in the drawing boolstatus = swExportData.SetSheets(swExportData_ExportAllSheets, 1) ' Save the drawing as a PDF using the specified filename and export data boolstatus = swModelDocExt.SaveAs(filename, 0, 0, swExportData, lErrors, lWarnings) ' Check if the export was successful and display appropriate message If boolstatus Then MsgBox "Drawing successfully saved as PDF:" & vbNewLine & filename, vbInformation, "Export Successful" Else MsgBox "Save as PDF failed. Error code: " & lErrors, vbExclamation, "Export Failed" End If End Sub ``` ### Macro You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_Drawing_To_PDF.swp). ## **Need experts’ help for customization?** [Contact us](https://bluebyte.biz/contact) today and let us find your custom solutions that fit the automation of SolidWorks your way! **Categories:** macros --- ### [SOLIDWORKS Macro for Automated Batch Export of Configurations to STEP](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) **Published:** October 8, 2025 **Author:** Amen Jlili **Content:** ## Description The SOLIDWORKS macro provided here is a means to batch export configurations to STEP. ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - You should have an assembly or [part document ](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/)with at least one configuration open. - The macro should be run in the [SolidWorks environment](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-all-components/). ## Results - All configurations in the active document are saved as [separate STEP files](https://bluebyte.biz/macros/solidworks-macro-export-part-and-assembly-to-iges-file/), ensuring that each design iteration is isolated from one another. - The user determines the file name and destination by providing a unique file prefix and [output directory](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/). - When the batch export process proceeds, status and progress are tracked via a [progress bar](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/). ## Steps to Set Up the Macro 1. Opening The SOLIDWORKS Document - Prior to executing the following instructions, ensure that the Assembly or Part file containing the design configurations you wish to export is the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) in SOLIDWORKS. 2. **Executing the Macro** - **Opening the VBA Editor:** A VBA editor can be opened while SOLIDWORKS is open by pressing Alt + F11. - **Loading the Code:** Add a new module using Insert > Module and paste the provided VBA code from the SOLIDWORKS macro for automated batch export in the new module window. - **Executing:** You can either run the macro in the VBA Editor by selecting Run > Run Sub/UserForm, or you can save the macro as a macro file (.swp), then it can be run from the SOLIDWORKS menu (Tools > Macro > Run). 3. **Specify Output Parameters** After the macro has been run, you will then be prompted to input two critical parameters: - File Prefix: Input a static string (e.g., “Project\_Model\_”) that will be added to the beginning of each exported file name, and help in identifying related files. - Output Directory: Input the name of a new folder (e.g., “STEP\_Exports”) that the exported files will go into. ### Verify Completion Confirm the outcome of the process: 1. The progress bar will display progress in real-time, showing each configuration’s status as it is processed and saved. 2. Once all configurations have been successfully converted, one last message box will appear, listing the total number of new [STEP files](https://bluebyte.biz/macros/how-to-print-step-files-in-solidworks-and-automate-export-with-pdm-publisher/) that were saved to the path you provided. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Sub main() ' Initialize SolidWorks application and document Dim swApp As SldWorks.SldWorks Set swApp = Application.SldWorks Dim swModel As SldWorks.ModelDoc2 Set swModel = swApp.ActiveDoc ' Verify an active document is open If swModel Is Nothing Then MsgBox "No active document found. Please open a model.", vbCritical, "Error" Exit Sub End If ' Declare configuration management objects Dim swConfigMgr As SldWorks.ConfigurationManager Set swConfigMgr = swModel.ConfigurationManager Dim swConfig As SldWorks.Configuration Set swConfig = swModel.GetActiveConfiguration ' Prepare file path and name variables Dim path As String, fname As String, current As String, prefix As String, dirName As String path = swModel.GetPathName fname = Mid(path, InStrRev(path, "\") + 1, Len(path) - InStr(path, ".") - 1) path = Left(path, InStrRev(path, "\") - 1) current = swModel.GetActiveConfiguration.Name Dim configs As Variant configs = swModel.GetConfigurationNames ' User input for file prefix and output directory prefix = InputBox("Enter the prefix:", "Names", fname) If prefix = "" Then MsgBox "Prefix cannot be empty.", vbCritical, "Error" Exit Sub End If dirName = InputBox("Enter the directory name for saving:", "Directory Name", "STEP") If dirName = "" Then MsgBox "Directory name cannot be empty.", vbCritical, "Error" Exit Sub End If ' Ensure output directory exists If Dir(dirName, vbDirectory) = "" Then MkDir dirName ChDir dirName ' Progress bar setup and configuration iteration Dim i As Long For i = 0 To UBound(configs) Dim name As String name = prefix & configs(i) & ".STEP" swModel.ShowConfiguration2 configs(i) Call swModel.SaveAs3(name, 0, 0) Next i ' Confirmation message and cleanup MsgBox "Saved " & CStr(i) & " files!", vbInformation, "Done" swModel.ShowConfiguration2 current ChDir path End Sub ``` ### Macro You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_Configurations_As_Separate_Step_Files.swp.swp) ## Our team of experts is at your service! [Contact us ](https://bluebyte.biz/contact)today to develop a custom solution that meets your specific workflow needs! **Categories:** macros **Tags:** solidworks --- ### [SOLIDWORKS Macro to Create Custom ISO Views (8 Orientations)](https://bluebyte.biz/macros/solidworks-macro-to-create-custom-iso-views-8-orientations/) **Published:** October 7, 2025 **Author:** Amen Jlili **Content:** ## Description - Creates eight custom-named ISO views (based on front, right, back, and left, viewed from top and bottom). - Enables quicker, consistent access to ISO views beyond the standard two. [![SOLIDWORKS Macro to Create Custom ISO Views and n image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a partially constructed 3D model of a valve with a few extruded components and a feature tree on the left listing steps like "Base Extrude" and "Cut Extrude." The workspace is mostly empty with a gray background. The "After" section shows the completed 3D model of the valve, featuring a more detailed structure with multiple cylindrical and connected parts, and the same feature tree on the left with additional steps like "Fillet" and "Mirror." Both sections include toolbars and menus at the top, with the "After" section highlighting the finalized design in a 3D view.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Create-Custom-ISO-Views-1024x294.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Create-Custom-ISO-Views.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - An open document of SOLIDWORKS must be active. - It is best to use a 3D model, as the ISO views generated will represent geometric perspectives with meaning and use. ## Results - Eight ISO views are generated, and the name is customized for easy identification and use. - Top-front-right (**TRF-ISO**) - Top-right-rear (**TRR-ISO**) - Top-left-rear (**TLR-ISO**) - Top-left-front (**TLF-ISO**) - Bottom-right-front (**BRF-ISO**) - Bottom-right-rear (**BRR-ISO**) - Bottom-left-rear (**BLR-ISO**) - Bottom-left-front (**BLF-ISO**) - The macro will then delete any previously named views that have the same eight names before creating them, giving us a set of custom ISO views that will not cause duplicates. ## Steps to Implement the Macro 1. **Open the File:** You should have a 3D model file open in SOLIDWORKS where ISO views can be meaningfully generated. 2. **Load and Run the Macro:** - Open the [SOLIDWORKS VBA editor](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) by pressing **(Alt + F11).** - Insert a new Module and then paste the provided macro code from the SOLIDWORKS macro to create custom ISO views. - You can run it immediately from the VBA editor, or from the main SOLIDWORKS software by navigating to **Tools > Macro > Run** and selecting the file. This depends on your particular work procedure. 3. **Using the Macro:** - The macro will run automatically: it will first delete any existing named views that take the same output name as the eight specified in order not to duplicate the views produced. - Then it will create new ISO views based on the specifications and save the created views under those new names for easy selection and use. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). ' ********************************************************* ' Description: ' This macro creates a series of isometric views and saves them as named views in the active SolidWorks document. ' ********************************************************* Sub main() ' Declare SolidWorks application and document variables Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object Dim boolstatus As Boolean ' Boolean to capture status (not used in this macro) Dim longstatus As Long ' Long status for operations (not used in this macro) Dim Annotation As Object ' Annotation object placeholder (not used here) Dim Gtol As Object ' Geometric tolerance object placeholder (not used here) Dim DatumTag As Object ' Datum tag object placeholder (not used here) Dim FeatureData As Object ' Feature data placeholder (not used here) Dim Feature As Object ' Feature object placeholder (not used here) Dim Component As Object ' Component object placeholder (not used here) ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Check if a document is open If Part Is Nothing Then MsgBox "No active document found. Please open a model.", vbExclamation, "Error" Exit Sub End If ' Define mathematical constants and view transformations pi = 4 * Atn(1) ' Value of π (pi) Z = Tan(30 * pi / 180) ' Tangent of 30 degrees X = Atn(Z / Sqr(-Z * Z + 1)) ' Rotation angle in radians for X-axis Y = -45 * pi / 180 ' Rotation angle in radians for Y-axis ' Delete previously saved ISO views to ensure clean state Part.DeleteNamedView ("TRF-ISO") Part.DeleteNamedView ("TRR-ISO") Part.DeleteNamedView ("TLF-ISO") Part.DeleteNamedView ("TLR-ISO") Part.DeleteNamedView ("BRF-ISO") Part.DeleteNamedView ("BRR-ISO") Part.DeleteNamedView ("BLF-ISO") Part.DeleteNamedView ("BLR-ISO") ' Create and save named views for different ISO perspectives ' Top Right Front ISO View Part.ShowNamedView2 "*Front", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TRF-ISO") ' Top Right Rear ISO View Part.ShowNamedView2 "*Right", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TRR-ISO") ' Top Left Rear ISO View Part.ShowNamedView2 "*Back", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TLR-ISO") ' Top Left Front ISO View Part.ShowNamedView2 "*Left", -1 Part.ActiveView().RotateAboutCenter X, Y Part.ViewZoomtofit Part.NameView ("TLF-ISO") ' Bottom Right Front ISO View Part.ShowNamedView2 "*Front", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BRF-ISO") ' Bottom Right Rear ISO View Part.ShowNamedView2 "*Right", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BRR-ISO") ' Bottom Left Rear ISO View Part.ShowNamedView2 "*Back", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BLR-ISO") ' Bottom Left Front ISO View Part.ShowNamedView2 "*Left", -1 Part.ActiveView().RotateAboutCenter -X, Y Part.ViewZoomtofit Part.NameView ("BLF-ISO") ' Clean up objects Set Part = Nothing Set swApp = Nothing End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/ISOViews.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/ISOViews.swp) ## Need to modify the macro to meet specific requirements? [Contact us](https://bluebyte.biz/contact) today to see how our experience can help provide you with a custom solution for maximizing your engineering efficiency. **Categories:** macros **Tags:** solidworks, vba macro --- ### [SOLIDWORKS Macro to Insert Part into New Part Document (Derived Parts)](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/) **Published:** October 4, 2025 **Author:** Amen Jlili **Content:** ## Overview This utility is intended for SOLIDWORKS engineers who are looking to easily create a derived part from an existing design. This SOLIDWORKS macro to insert part into new part document automates this process of opening a new part document and inserting the currently active part as an external reference.. Most importantly, it also allows you to transfer the material properties of the original part to the new part, so you can ensure the material specification is not lost. [![SOLIDWORKS Macro to Insert Part into New Part Document](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Insert-Part-into-New-Part-Document-1024x332.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Insert-Part-into-New-Part-Document.png) This provides a highly effective workflow in which derived designs can be created, simplified versions of large assemblies can be produced, or [configurations can be generated](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) that remain linked to the material specifications specified in the original part file. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - A part document must be open and active in SOLIDWORKS. ## Results - A new part document is created and opened automatically. - The active, original part is inserted into the new part document as one feature (Insert Part feature). - Material properties are correctly copied from the original part to the new part, so it is not necessary to assign a material relationally. ## Steps to Implement the Macro 1. **Open the Part Document:** Ensure that the original **SOLIDWORKS part** document you intend to replicate or derive from is the currently active window in SOLIDWORKS. 2. **Load and Execute the Macro:** - Load the macro into SOLIDWORKS through the VBA editor with **Alt + F11**. - Run the macro through SOLIDWORKS by going to **Tools > Macro > Run** and selecting the saved file. ## **VBA Macro Code** ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). ' ****************************************************************************** ' Insert Part into a New Part ' Description: This macro inserts the currently active SolidWorks part into a new part, ' copies the material properties, and adjusts the view. ' ****************************************************************************** Option Explicit ' Global variables for SolidWorks application and document objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim Part, Parent As Object ' Objects for new part and parent part Dim boolstatus As Boolean ' Boolean status for operations Dim longstatus As Long, longwarnings As Long ' Status and warnings for operations Dim Parent_FullPathName As String ' Full path of the parent part Dim EmptyStr As String ' Placeholder for empty strings Dim myFeature As Object ' Feature object for inserting the part Dim sMatName As String ' Material name of the parent part Dim sMatDB As String ' Material database path Sub main() ' Initialize SolidWorks application Set swApp = Application.SldWorks Set Parent = swApp.ActiveDoc ' Get the currently active document ' Precondition: Exit quietly if the active document is not a part If (Parent.GetType swDocPART) Then Exit Sub ' Get the full path name of the parent part Parent_FullPathName = Parent.GetPathName ' Get the short name (title) of the parent part and remove the file extension if present Dim ParentName As String ParentName = Parent.GetTitle If InStr(1, ParentName, ".") Then ParentName = Left$(ParentName, InStr(1, ParentName, ".") - 1) End If ' Get the material name and database path of the parent part sMatName = Parent.GetMaterialPropertyName2("", sMatDB) ' Create a new part Set Part = swApp.NewPart ' Insert the parent part into the new part Set myFeature = Part.InsertPart2(Parent_FullPathName, 1) Part.ClearSelection2 True ' Clear any selections in the new part Set the view to isometric and fit the window Part.ShowNamedView2 "*Isometric", 7 Part.ViewZoomtofit2 ' Copy material from the parent part to the new part Part.SetMaterialPropertyName "SOLIDWORKS Materials.sldmat", sMatName ' Clean up references to objects Set Parent = Nothing Set Part = Nothing End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/InsertPartIntoNewPart.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/InsertPartIntoNewPart.swp). ## **Need an expert’s help customizing the macro?** [Contact us](https://bluebyte.biz/contact) to customize this SOLIDWORKS macro to insert part into new part document based on your needs (e.g., applying a feature template automatically, file naming conventions, or any PDM/PLM integrations). **Categories:** macros --- ### [SOLIDWORKS Macro to Toggle Dimension Style: Fraction vs. Decimal](https://bluebyte.biz/macros/solidworks-macro-to-toggle-dimension-style-fraction-vs-decimal/) **Published:** October 2, 2025 **Author:** Amen Jlili **Content:** ## Description This utility is a must-have for SOLIDWORKS engineers who often use both measurement methods. This macro, known as the SOLIDWORKS macro to toggle dimension style, automates the process of toggling the SOLIDWORKS dimension style. The logic is simple but powerful, and proceeds as follows. The macro first checks the [unit system](https://bluebyte.biz/macros/enforce-consistent-units-solidworks-macro-to-match-component-unit-system/) used in the drawing. [![SOLIDWORKS Macro to Toggle Dimension Style and An image divided into two side-by-side sections labeled "Before" and "After," showing a software interface for document properties and units settings. The "Before" section displays a table with basic unit types (e.g., length, angle, mass) and their corresponding units (e.g., millimeters, degrees, grams) set to 12 decimal places, with options for fractions and more. The "After" section shows the same table with updated settings: length is set to "none" with 32 decimal places, dual dimension length is in inches with 12 decimal places, and other units remain the same. Both sections include a search options bar, drafting standards, and additional settings like borders and centerlines, with the "After" section highlighting changes in red.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Toggle-Dimension-Style-1024x335.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Toggle-Dimension-Style.png) If the dimension is decimal, the macro will change the style to fractional, will change the denominator (the fraction) to 1/32 (which is a common style in the industry), and will set the rounding to the nearest fraction. If the dimension is already in fractional style, then the macro instantly reverts the unit system back to decimal. This is a one-click solution to change the unit system quickly. It saves you time setting the style all over again, when the active drawing was set in a different unit system. It also has error handling, so that it can gracefully terminate if things go wrong. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 10 or later ## Pre-requisites - The application [SOLIDWORKS](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/) should be installed and running on the machine. - An open [drawing document](https://bluebyte.biz/macros/solidworks-macro-for-reloading-sheet-formats-in-drawing-documents/) must be running. - The document must have some views with dimensions that have unit styles to switch. ## Results - The style of dimension in the active drawing document will automatically switch from fractional to decimal (or vice versa). - In fractional unit styles, the denominator will automatically be set to 32, and rounding of the dimension to the nearest fraction will be turned on for precision. ## Steps to Implement the Macro 1. **Prepare the Document:** Make certain there is an active [SOLIDWORKS drawing](https://bluebyte.biz/macros/how-to-automatically-insert-a-solidworks-drawing-watermark-using-a-macro/) with the dimensions you want to adjust. 2. **Load and Execute the Macro:** - Open macro in SOLIDWORKS using the VBA editor **(Alt + F11).** - [Run the macro](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/) from SOLIDWORKS through **Tools > Macro > Run** to select the saved file. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swDraw As SldWorks.DrawingDoc ' Active drawing document Dim boolstatus As Boolean ' Status flag for checking if operations were successful Sub main() ' Error handling: jump to ErrorHandler if an error occurs On Error GoTo ErrorHandler ' Get the SolidWorks application instance Set swApp = Application.SldWorks ' Get the active document (drawing) in SolidWorks Set swDraw = swApp.ActiveDoc ' Check if the current unit system is set to Decimal If swDraw.GetUserPreferenceIntegerValue(swUnitsLinearDecimalDisplay) = swDECIMAL Then ' If Decimal, change the unit system to Fractional boolstatus = swDraw.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e.swUnitsLinearRoundToNearestFraction, 0, True) ' Set linear display to fractional units swDraw.SetUserPreferenceIntegerValue swUnitsLinearDecimalDisplay, swFRACTION ' Set the fractional denominator to 32 (1/32 increments) swDraw.SetUserPreferenceIntegerValue swUnitsLinearFractionDenominator, 32 ' Enable rounding to the nearest fraction swDraw.SetUserPreferenceToggle swUnitsLinearRoundToNearestFraction, True Else ' If the current unit system is not Decimal (i.e., it's Fractional), change it to Decimal boolstatus = swDraw.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swUnitsLinearDecimalDisplay, 0, swFractionDisplay_e.swDECIMAL) ' Set linear display to decimal units swDraw.SetUserPreferenceIntegerValue swUnitsLinearDecimalDisplay, swDECIMAL End If ' End the macro execution End Exit Sub ErrorHandler: ' End the macro execution in case of an error End End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/fract_dec_toggle1.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/fract_dec_toggle1.swp). ## Need help with customization? Reach out to our team of experts! This tool has simplified a common, tedious, repetitive task and offered engineers an efficient means to toggle SOLIDWORKS dimension style for compliance with different drawing standards. The default parameters (like the denominator of 1/32) will work for a lot of cases, but you may require different settings for your particular design environment. If so, reach out to Blue Byte Systems Inc.! Our team of experts specialize in customizing and developing professional [SOLIDWORKS macros](https://bluebyte.biz/macros/solidworks-macro-to-apply-custom-color-and-width-to-drawing-edges/) and add-ins to meet explicit needs. Whether you are searching for a SOLIDWORKS macro to toggle dimension style or need a broader automation, we can help So… need some modifications to the default fractional denominator, or want to add this feature to a larger drawing automation script, contact us today! Our experienced team of experts will ensure that you get a custom solution that meets your needs while maximizing drawing accuracy and overall workflow efficiency. **Categories:** macros --- ### [SOLIDWORKS Macro to Apply Custom Color and Width to Drawing Edges](https://bluebyte.biz/macros/solidworks-macro-to-apply-custom-color-and-width-to-drawing-edges/) **Published:** October 1, 2025 **Author:** Amen Jlili **Content:** ## Description This tool gives SOLIDWORKS engineers detailed visual control of their technical documents. The SolidWorks macro to apply custom color and width to drawing edges applies customized line properties (both color and width) to selected SOLIDWORKS drawing edges. This provides a visual distinction to certain edges, lines, or hidden elements of a view, because the macro immediately is able to adjust its properties based on previously defined properties. [![SOLIDWORKS Macro to Apply Custom Color and Width to Drawing Edges and An image divided into two side-by-side sections labeled "Before" and "After." The "Before" section shows a rectangular frame with five circular targets inside, each with a crosshair, and one target highlighted with a blue outline. The "After" section shows the same rectangular frame with the same five targets, but the highlighted target is now outlined in red, and a yellow cursor icon is positioned near it, indicating a change or selection. Both sections have an orange dashed border around the frame.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Apply-Custom-Color-and-Width-to-Drawing-Edges-1024x344.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-to-Apply-Custom-Color-and-Width-to-Drawing-Edges.png)This is very helpful when referring to certain critical dimensions, selecting particular features that need inspection, or even following unconventional drawing specifications that require emphasis on specific geometry through visual representation. The macro uses checks to ensure the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) is a drawing and that an edge has been selected before executing, to reduce run-time errors. ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - The active document has to be a [SOLIDWORKS drawing file](https://bluebyte.biz/macros/solidworks-macro-to-set-layer-and-draw-line-in-solidworks-drawing/). - The user needs to first select at least one edge (model edge, line, curve) in the drawing view before running the macro. ## Results - The selected edges in SOLIDWORKS drawing will have their line width and color changed according to whatever properties were specified in the macro (e.g. width = 0.7mm, color = Red by default). - The macro will report back to the user with a success message if it runs correctly, or provide a clear error message if the document is not the right type or no items were selected. ### Steps to Implement the Macro - **Choose the Edges:** Open a [SOLIDWORKS drawing](https://bluebyte.biz/macros/how-to-quickly-delete-dangling-dimensions-in-solidworks-drawings/), before selecting the specific edge(s) in a view that you want to modify. - **Load and Run the Macro:** - Load the macro into SOLIDWORKS through the VBA editor **(Alt + F11)** - Run the macro in SOLIDWORKS by clicking **Tools > Macro > Run** and selecting the saved file. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Sub main() ' Declare SolidWorks application object and initialize it Dim swApp As SldWorks.SldWorks Set swApp = Application.SldWorks ' Get the currently active document Dim swModel As SldWorks.ModelDoc2 Set swModel = swApp.ActiveDoc ' Check if there is an active document If Not swModel Is Nothing Then ' Check if the active document is a drawing If swModel.GetType = swDocDRAWING Then ' Declare drawing document object and selection manager object Dim swDraw As SldWorks.DrawingDoc Set swDraw = swModel Dim swSelMgr As SldWorks.SelectionMgr Set swSelMgr = swModel.SelectionManager ' Check if any edge is selected in the drawing If swSelMgr.GetSelectedObjectCount2(-1) > 0 Then ' Specify custom line properties Dim edgeWidth As Double Dim edgeColor As Integer edgeWidth = 0.0007 ' Line width in meters (e.g., 0.0007m = 0.7mm) edgeColor = 255 ' Color in RGB (e.g., 255 = Red) ' Apply custom line width and color to the selected edge(s) swDraw.SetLineWidthCustom (edgeWidth) swDraw.SetLineColor edgeColor ' Notify the user of successful application MsgBox "Line width and color applied successfully to the selected edge(s).", vbInformation, "Success" Else ' Error message if no edge is selected MsgBox "Please select at least one edge in the drawing to apply the properties.", vbExclamation, "No Edge Selected" End If Else ' Error message if the active document is not a drawing MsgBox "The active document is not a drawing. Please open a drawing and select an edge.", vbExclamation, "Invalid Document Type" End If Else ' Error message if no document is open MsgBox "No active document found. Please open a drawing and select an edge.", vbExclamation, "No Active Document" End If End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/FormatLine.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/FormatLine.swp). ### **Need help customizing the macro?** Our team of experts at [Blue Byte Systems Inc](https://bluebyte.biz/contact/). are experienced in the development of custom SOLIDWORKS macros and add-ins. **Categories:** macros --- ### [The Custom Properties and Save As Macro for SOLIDWORKS](https://bluebyte.biz/macros/the-custom-properties-and-save-as-macro-for-solidworks/) **Published:** September 30, 2025 **Author:** Amen Jlili **Content:** ## Description This extremely useful SOLIDWORKS macro helps you manage your design files by automatically updating custom properties and saving models with a new file name to a user-specified folder. With the custom properties and save as macro for SOLIDWORKS, you can keep your custom properties in sync with a project folder, allowing you to maintain organized project data across different phases or iterations of the project while saving time and reducing costly human errors.This utility is useful to any engineering workflow looking to maximize efficiency and maintain integrity within their data. [![Custom Properties and Save As Macro for SOLIDWORKS and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2025/09/Custom-Properties-and-Save-As-Macro-for-SOLIDWORKS-1024x352.png)](https://bluebyte.biz/wp-content/uploads/2025/09/Custom-Properties-and-Save-As-Macro-for-SOLIDWORKS.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-requisites - You must have an [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) open in the software. - The macro will request the user to provide a new file name and select the location for the new file. ## Results - **Automated Property Management:** The macro efficiently removes pre-existing custom properties (such as drawing number, old drawing number, search description, and material) and replaces them with new values you pre-define, creating consistency across your projects. - **Organized File Saving:** The document is saved with a [user-provided new file name](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) in the specified location. The request for a new file name simplifies the **save as macro** and ensures organized files from the start. ## Steps to Implement the Macro - **Run the Macro:** - The macro will then open a box to input the new file name. - After entering the name, the macro will prompt you to select a targeted folder using a [folder browser dialog](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/). - The macro will [save the document with the input file name](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/), and the appropriate custom properties will automatically be added. - **Custom Property Management:** Once you select the targeted folder, the macro will automatically save the file at the new file name and add the predefined custom properties. To amend the list of custom properties, it is an easy task to add or remove the custom properties by updating the relevant lines of code according to your workflow. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare SolidWorks application and model variables Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim retval As String Dim FileName As String Dim Path As String Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Ensure a document is active If swModel Is Nothing Then MsgBox "No active document found. Please open a SolidWorks file and try again.", vbCritical, "Error" Exit Sub End If ' Remove existing custom properties retval = swModel.DeleteCustomInfo2("", "drawing number") retval = swModel.DeleteCustomInfo2("", "old drawing number") retval = swModel.DeleteCustomInfo2("", "search description") retval = swModel.DeleteCustomInfo2("", "material") ' Add new custom properties with default values retval = swModel.AddCustomInfo3("", "drawing number", swCustomInfoText, "") retval = swModel.AddCustomInfo3("", "old drawing number", swCustomInfoText, "") retval = swModel.AddCustomInfo3("", "search description", swCustomInfoText, "") retval = swModel.AddCustomInfo3("", "material", swCustomInfoText, """SW-Material""") ' Prompt user for a new file name FileName = InputBox("Enter the new file name", "Add New File Name", FileName) If FileName = "" Then MsgBox "File name cannot be empty. Please try again.", vbExclamation, "Error" Exit Sub End If ' Prompt user for folder selection Path = BrowseFolder("Select a Folder/Path") If Path = "" Then MsgBox "You must select a valid folder to save the file.", vbExclamation, "Error" Exit Sub End If ' Ensure the folder path ends with a backslash If Right(Path, 1) "\" Then Path = Path & "\" ' Save the file with the new name in the selected folder swModel.Extension.SaveAs Path & FileName & ".prt", swSaveAsVersion_e.swSaveAsCurrentVersion, swSaveAsOptions_e.swSaveAsOptions_Copy, Nothing, 0, 0 ' Notify the user of successful save MsgBox "File saved successfully at: " & Path & FileName & ".prt", vbInformation, "Save Successful" End Sub ' Function to open a folder browser dialog Function BrowseFolder(Optional Title As String) As String Dim SH As Object Dim F As Object ' Create Shell Application object Set SH = CreateObject("Shell.Application") ' Open the folder browser dialog Set F = SH.BrowseForFolder(0, Title, 0) If Not F Is Nothing Then BrowseFolder = F.Items.Item.Path ' Get selected folder path Else BrowseFolder = "" ' Return empty if no folder selected End If End Function ``` ### Folder Browser Module Code ``` Option Explicit Private Const BIF_RETURNONLYFSDIRS As Long = &H1 Private Const MAX_PATH As Long = 260 ' Windows API declarations Declare Function SHGetPathFromIDListA Lib "shell32.dll" ( _ ByVal pidl As Long, _ ByVal pszBuffer As String) As Long Declare Function SHBrowseForFolderA Lib "shell32.dll" ( _ lpBrowseInfo As BrowseInfo) As Long ' Structure for folder browsing dialog Type BrowseInfo hOwner As Long pidlRoot As Long pszDisplayName As String lpszINSTRUCTIONS As String ulFlags As Long lpfn As Long lParam As Long iImage As Long End Type ' Function to display a folder selection dialog Function BrowseFolder(Optional Caption As String = "Select a Folder") As String Dim BrowseInfo As BrowseInfo Dim FolderName As String Dim ID As Long Dim Res As Long ' Initialize the BrowseInfo structure With BrowseInfo .hOwner = 0 .pidlRoot = 0 .pszDisplayName = String$(MAX_PATH, vbNullChar) .lpszINSTRUCTIONS = Caption .ulFlags = BIF_RETURNONLYFSDIRS End With ' Prepare a buffer for the folder path FolderName = String$(MAX_PATH, vbNullChar) ' Display the folder selection dialog ID = SHBrowseForFolderA(BrowseInfo) If ID Then ' Convert the PIDL to a file system path Res = SHGetPathFromIDListA(ID, FolderName) If Res Then BrowseFolder = Left$(FolderName, InStr(FolderName, vbNullChar) - 1) Else BrowseFolder = "" End If Else BrowseFolder = "" End If End Function ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/File%20Copy%20%28with%20blank%20property%20values%29.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/FileCopy.swp). ## **Customization** [Contact us ](https://bluebyte.biz/contact/)today to find out how we can help you have a more efficient and productive work process using our custom solutions. [](https://solidworksvbamacros.bluebyte.biz/src/File%20Copy%20%28with%20blank%20property%20values%29.html#folder-browser-module-code) **Categories:** macros --- ### [The VBA Macro to Automate Sketch Editing in SOLIDWORKS](https://bluebyte.biz/macros/the-vba-macro-to-automate-sketch-editing-in-solidworks/) **Published:** September 30, 2025 **Author:** Amen Jlili **Content:** ## Description This macro for SOLIDWORKS automates a repetitive and frequent task for engineers: changing and exiting sketches. Following the provided code, it is capable of automatically determining and adjusting the view to normal for an active sketch or exiting the sketch if the view is already normal. Also, when to open a sketch, when to normalize a view, and when to exit from the sketch is needed. The macro can also deal with [suppressed subcomponents](https://bluebyte.biz/macros/solidworks-macro-to-efficiently-manage-assembly-by-hiding-all-sketches/) automatically, as well as navigate complex feature trees. This makes a VBA macro to [automate sketch editing in SOLIDWORKS](https://bluebyte.biz/macros/solidworks-macro-for-instant-centered-rectangle-sketching-sketchbox/) a potent addition to your design process and productivity. [![VBA Macro to Automate Sketch Editing in SOLIDWORKS and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2025/09/VBA-Macro-to-Automate-Sketch-Editing-in-SOLIDWORKS.png)](https://bluebyte.biz/wp-content/uploads/2025/09/VBA-Macro-to-Automate-Sketch-Editing-in-SOLIDWORKS.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer - **Operating System:** Windows 7 or later ## Pre-Conditions - **Active Document:** An active part (.sldprt) or assembly (.sldasm) document must be open in SOLIDWORKS. - **Selection:** For the macro to operate correctly, a [feature, face, edge, or sketch](https://bluebyte.biz/macros/solidworks-macro-for-feature-driven-component-pattern/) must be selected. ## Results - **Automated View & Sketch Access:** Edits the driving sketch of the selected feature/geometry, while also orienting the view normal to the sketch plane. - **Efficient Sketch Exits:** Exits from the active sketch if the view is already oriented normal, streamlining the completion of a sketching session. - **Component & Hierarchy Handling:** Automatically resolves the selected subcomponents and navigates into the selected sketch hierarchy of more complex features, ensuring a seamless operation. ## Process to Implement the Macro 1. **Execute the Macro:** Execute the macro in an open SOLIDWORKS document. The associated document must be a valid document type (part or assembly), and the appropriate items must be selected. 2. **Behavior Based on Selection:** ○ If the user has selected a feature or geometry, the macro will open the driving sketch and view the model in a different view. ○ If no entities are selected and the user is in an active sketch, the macro will set the view to normal. ○ If the user is already viewing in a normal view, the macro will exit the sketch and end. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Define a structure for storing view data Type ViewData ViewScale As Double ' Scale of the view Orientation As SldWorks.MathTransform ' Orientation transformation matrix Translation As SldWorks.MathVector ' Translation vector End Type ' Enum for comparison results between two views Enum CompareViewResult_e Same = 0 ' Views are identical DiffOrientation = 2 ^ 0 ' Different orientations difftranslation = 2 ^ 1 ' Different translations diffscale = 2 ^ 2 ' Different scales End Enum ' Debugging constants and tolerance Const Bug As Boolean = False ' Debug output flag Const Tol As Integer = 2 ' Tolerance for comparisons Sub main() On Error Resume Next Dim swApp As SldWorks.SldWorks Dim swDoc As SldWorks.ModelDoc2 Dim SelMgr As SldWorks.SelectionMgr Dim swFeat As SldWorks.Feature Dim swSelType As Long Dim StartView As ViewData Dim CurView As ViewData Dim compRes As CompareViewResult_e ' Initialize SolidWorks objects Set swApp = Application.SldWorks Set swDoc = swApp.ActiveDoc Set SelMgr = swDoc.SelectionManager StartView = GetViewData(swDoc.ActiveView) ' Check if a sketch is active If Not swDoc.GetActiveSketch2 Is Nothing Then ' No selection: Align view "normal to" the sketch If SelMgr.GetSelectedObjectCount2(-1) < 1 Then swDoc.ShowNamedView2 "*Normal To", -1 CurView = GetViewData(swDoc.ActiveView) compRes = CompareViewData(StartView, CurView, Tol) If compRes = Same Then swDoc.SketchManager.InsertSketch True Exit Sub End If Else swDoc.SketchManager.InsertSketch True End If End If ' Resolve selected feature or entity swSelType = SelMgr.GetSelectedObjectType3(1, -1) Select Case swSelType Case swSelFACES, swSelEDGES Set swFeat = SelMgr.GetSelectedObject6(1, -1).GetFeature If swFeat Is Nothing Then Exit Sub Case swSelBODYFEATURES, swSelSKETCHES Set swFeat = SelMgr.GetSelectedObject6(1, -1) Case Else Exit Sub End Select ' Edit sketch or feature If swFeat.GetTypeName = "ProfileFeature" Then swDoc.EditSketchOrSingleSketchFeature Else swDoc.FeatEdit End If ' Align view to "normal to" if a sketch is active If Not swDoc.GetActiveSketch2 Is Nothing Then swDoc.ShowNamedView2 "*Normal To", -1 End If ' Clear selections swDoc.ClearSelection2 True End Sub ' Function to get view data (scale, orientation, translation) Private Function GetViewData(view As SldWorks.ModelView) As ViewData Dim data As ViewData Set data.Orientation = view.Orientation3 ' Get orientation matrix Set data.Translation = view.Translation3 ' Get translation vector data.ViewScale = view.Scale2 ' Get view scale GetViewData = data End Function ' Function to compare two sets of view data Private Function CompareViewData(firstViewData As ViewData, secondViewData As ViewData, Tol As Integer) As CompareViewResult_e Dim res As CompareViewResult_e res = Same ' Compare orientation If Not CompareArrays(firstViewData.Orientation.ArrayData, secondViewData.Orientation.ArrayData, Tol) Then res = res + DiffOrientation End If ' Compare translation If Not CompareArrays(firstViewData.Translation.ArrayData, secondViewData.Translation.ArrayData, Tol) Then res = res + difftranslation End If ' Compare scale If Not TolerantEqual(firstViewData.ViewScale, secondViewData.ViewScale, Tol) Then res = res + diffscale End If CompareViewData = res End Function ' Function to compare arrays with tolerance Private Function CompareArrays(firstArr As Variant, secondArr As Variant, Tol As Integer) As Boolean If UBound(firstArr) = UBound(secondArr) Then Dim i As Integer For i = 0 To UBound(firstArr) If Not TolerantEqual(firstArr(i), secondArr(i), Tol) Then CompareArrays = False Exit Function End If Next CompareArrays = True Else CompareArrays = False End If End Function ' Function to compare two numbers with tolerance Private Function TolerantEqual(a As Variant, b As Variant, Tol As Integer) As Boolean TolerantEqual = Abs(a - b) **Categories:** macros --- ### [How to Open Selected Part Separately from The Assembly in SolidWorks?](https://bluebyte.biz/macros/how-to-open-selected-part-separately-from-the-assembly-in-solidworks/) **Published:** September 24, 2025 **Author:** Amen Jlili **Content:** ## Overview This macro allows you to open a part in an assembly quickly using a single command. To work more efficiently with SOLIDWORKS editing parts, assign this macro a key shortcut on your keyboard (e.g., the ‘O’ key). This will pull up whatever part you have selected in an assembly and open it in its own window to quickly review and modify without having to scroll down through the FeatureManager Design Tree. This is a particularly important feature to have when working with larger [SOLIDWORKS assemblies](https://bluebyte.biz/solidworks/solidworkspdm/batch-export-solidworks-assemblies-to-iges-using-pdmpublisher/) or design projects, especially if you need to open selected part separately from the assembly in SolidWorks. [![Open Selected Part Separately from The Assembly in SolidWorks and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2025/09/Open-Selected-Part-Separately-from-The-Assembly-in-SolidWorks-1024x265.png)](https://bluebyte.biz/wp-content/uploads/2025/09/Open-Selected-Part-Separately-from-The-Assembly-in-SolidWorks.png) ### **System Requirements** - **SOLIDWORKS Version:** SOLIDWORKS 2014 or higher - **Operating System:** Windows 7 or higher ### Pre-Requisites For the successful functioning of the macro, be sure to check the following: - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) is an assembly with at least one part in it. - A specific component is [highlighted in the assembly](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/) prior to running the macro. ### **Results** When the macro is executed, it will perform the following actions: - The selected part will open in an additional SolidWorks window. - The main assembly remains open, allowing you to [switch back to the assembly and the part](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/) quickly. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As Object Dim Part As Object Sub main() Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Attempt to open the selected component part Part.OpenCompFile End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/OpenSelectedPart.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/OpenSelectedPart.swp) ## Need To Modify The Macro? The macro provides a straightforward answer to a frequently encountered workflow problem, making it easy for engineers to [open the chosen part directly from the assembly](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/) to work on in detail. In fact, one of the most useful commands is to open selected part separately from the assembly in SolidWorks, which ensures smooth and efficient part handling. For those engineers and organizations wanting to improve their processes and create powerful, tailored tools, reach out to Blue Byte Systems Inc. Our team of professionals is ready to assist you anytime. We provide custom macro development services to assist you in improving your productivity and gaining a greater competitive advantage. Please contact us today for assistance streamlining or improving your SOLIDWORKS workflow. **Categories:** macros --- ### [SolidWorks Macro for Automated Cylinder Array Generation](https://bluebyte.biz/macros/solidworks-macro-for-automated-cylinder-array-generation/) **Published:** September 23, 2025 **Author:** Amen Jlili **Content:** ## Overview This SolidWorks macro for automated cylinder array generation fully automates the creation of a linear array of cylinders in a SolidWorks part document. To gather user-defined parameters, the macro uses a graphical user interface (GUI), which includes radius, height, and extrusion depth, and then programmatically generates the cylindrical bodies. [![SolidWorks Macro for Automated Cylinder Array Generation and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2025/09/SolidWorks-Macro-for-Automated-Cylinder-Array-Generation-1024x300.png)](https://bluebyte.biz/wp-content/uploads/2025/09/SolidWorks-Macro-for-Automated-Cylinder-Array-Generation.png) ### System Requirements - SolidWorks Version: [SolidWorks 2014 or newer](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) - Operating System: Windows 7 or later ### Prerequisites - SolidWorks must be running, and a [part document](https://bluebyte.biz/macros/solidworks-macro-to-insert-part-into-new-part-document-derived-parts/) must be active. - The macro requires user input to define parameters for the cylinder, including quantity, radius, height, and depth. ### **Results** - The macro performs the following tasks: - The specified number of cylindrical features is created with the defined parameters. - All cylinders are placed in a linear array. Spacing of all cylinders is calculated based on the total cylinder radius and the array count, so they are placed properly. ## How To Set Up & Implement The Macro? Follow these simple steps in order to set up and run the macro: #### **1. Create the UserForm** - Open the VBA editor in SolidWorks by pressing (Alt + F11). - In the Project Explorer pane, right-click on the macro project (e.g., Macro1), then **Insert > UserForm**. - Change the new form name from UserForm to **UserForm1**. - Design the form with the following items: ○ **Labels:** Add labels for Tube O.D., Wall Thickness, Length, and Depth. ○ **Text Boxes:** Place text boxes next to the labels to enter the data. For example, use Txt1 for Tube O.D., Txt2 for Wall Thickness, Txt3 for Length, and Txt4 for Depth. ○ **Button:** Add a command button labeled Create Tube and set its name to Pcmd. - If you want, you can add an image. This would simply be a picture to visually represent the form based on the Tube’s geometry. #### **2. Add the VBA code** - The main [VBA macro code](https://bluebyte.biz/macros/solidworks-macro-for-feature-driven-component-pattern/) should be copied and pasted into a new module. - The code specific to the UserForm should be copied and pasted into the code-behind **UserForm1**. #### **3. Save and Run the Macro** - Save the macro file in .swp format (CreateCylinders.swp, for example). - In SolidWorks, go to **Tools > Macro > Run,** select the macro file created in the previous step. #### **4. Input Parameters** When the macro runs, the **UserForm1** GUI will appear. Enter the required parameters for your cylinders and click the Create Tube button to generate the model. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As Object Dim Part As Object Dim SelMgr As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim Feature As Object Dim ad As String Sub main() UserForm1.Show End Sub ``` ## VBA UserForm Code ``` Option Explicit Dim swApp As SldWorks.SldWorks Dim Part As SldWorks.ModelDoc2 Dim SelMgr As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim Feature As Object Dim ad As String Dim L As Double Dim W As Double Dim R As Double Dim H As Double Dim No As Integer Dim i As Integer Dim D As Double Dim flag As Boolean Private Sub Pcmd_Click() Set swApp = Application.SldWorks ad = swApp.GetUserPreferenceStringValue(swDefaultTemplatePart) swApp.SetUserPreferenceToggle swInputDimValOnCreate, False Set Part = swApp.NewDocument(ad, 0, 0#, 0#) Set Part = swApp.ActiveDoc No = Txt1.Value R = Txt2.Value / 1000 H = Txt3.Value / 1000 L = (10 * (No + 1) + (No / 2) * (4 * 1000 * R + 10 * (No - 1))) / 1000 W = (20 + 2 * 1000 * R + (No - 1) * 10) / 1000 D = Txt4.Value / 1000 ' Create base sketch and extrusion boolstatus = Part.Extension.SelectByID2("Top Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0) Part.SketchManager.InsertSketch True Part.ClearSelection2 True Part.SketchRectangle 0, 0, 0, L, W, 0, 1 Part.ClearSelection2 True ' Set sketch dimensions boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", 0.04195712890625, 0, 0.0004216796875, False, 0, Nothing, 0) Dim Annotation As Object Set Annotation = Part.AddDimension2(0.0411138, 0, 0.0156021) Part.ClearSelection2 True Part.Parameter("D1@Sketch1").SystemValue = L boolstatus = Part.Extension.SelectByID2("Line2", "SKETCHSEGMENT", -0.00021083984375, 0, -0.0303609375, False, 0, Nothing, 0) Set Annotation = Part.AddDimension2(-0.0132829, 0, -0.0303609) Part.ClearSelection2 True boolstatus = Part.Extension.SelectByID2("D1@Sketch1@Part1.SLDPRT", "DIMENSION", 0, 0, 0, False, 0, Nothing, 0) Part.Parameter("D2@Sketch1").SystemValue = W Part.ClearSelection2 True Part.SketchManager.InsertSketch True Part.ShowNamedView2 "*Trimetric", 8 Part.ClearSelection2 True boolstatus = Part.Extension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0) Part.FeatureManager.FeatureExtrusion2 True, False, False, 0, 0, D, 0.01, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 1, 1, 1, 0, 0, False Part.SelectionManager.EnableContourSelection = 0 ' Create cylinders based on input parameters For i = 1 To No boolstatus = Part.Extension.SelectByID2("", "FACE", L, D, -W / 2, False, 0, Nothing, 0) Part.SketchManager.InsertSketch True Part.ClearSelection2 True Part.CreateCircleByRadius2 (10 * i + (i / 2) * (4 * 1000 * R + 10 * (i - 1)) - R * 1000 - (i - 1) * 5) / 1000, W / 2, 0, (1000 * R + (i - 1) * 5) / 1000 Part.ClearSelection2 True Part.SketchManager.InsertSketch True Part.FeatureManager.FeatureExtrusion True, False, False, 0, 0, (1000 * H + 10 * (i - 1)) / 1000, 0.01, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 1, 1, 1 Part.SelectionManager.EnableContourSelection = 0 Next Part.ViewZoomtofit2 End Sub ``` ## Macro[](https://solidworksvbamacros.bluebyte.biz/src/CreateCylinder.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/CreateCylinder.swp). ## Customization & Improvements While this macro is extremely useful, engineering workflows often require specific automation solutions. If you have a requirement that needs you to modify this mapping to encompass other geometries, combine it into another design process, or develop a new [SolidWorks add-in](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/) altogether, we can assist! The SolidWorks macro for automated cylinder array generation is a good example of how targeted automation can simplify repetitive modelling tasks. At Blue Byte System Inc., we focus on developing customized macros and add-ins based on a minimal definition to suit specific business workflow needs; ultimately increasing the productivity of the engineer and/or organization. Why wait then? Contact us to discuss how we can assist you in achieving your peak productivity with our custom solutions. **Categories:** macros --- ### [Automate SOLIDWORKS Bounding Box Creation and Sketch Generation](https://bluebyte.biz/macros/automate-solidworks-bounding-box-creation-and-sketch-generation/) **Published:** September 23, 2025 **Author:** Amen Jlili **Content:** ## Description This SOLIDWORKS VBA macro is a valuable resource for engineers, designers, and manufacturers who need fast, accurate measurements for packaging, material stock, and CNC machining setup. The macro will calculate exact bounding box measurements based on the part geometry. Furthermore, it can also store those values as custom properties in the part file, which can be advantageous in automating downstream processes, such as cut lists or with ERP systems. The macro can also sketch a 3D version of the bounding box measurement, and users can view and verify the bounding box right on the part, which may support those working with complex or multi-body parts.With this tool you can automate SOLIDWORKS bounding box creation and sketch generation. ## System Requirements - SolidWorks Version: SolidWorks 2014 or newer - Operating System: Windows 7 or later ## Pre-Conditions - **Active Document:** The macro must be run with a SOLIDWORKS part file (\*.sldprt) as the active document. ## Results - **Exact Dimensions:** Calculates and displays the bounding box dimensions of the part (length, width, height). - **[custom properties](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/):** Adds the part’s custom properties BoundingBoxWidth, BoundingBoxHeight, and BoundingBoxDepth that can be valuable for data management and automation. - **Visualization:** Creates a [3D sketch](https://bluebyte.biz/macros/solidworks-macro-for-instant-centered-rectangle-sketching-sketchbox/) model of the bounding box, which will be a nice visual reference around the part. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As SldWorks.SldWorks Sub Main() ' Get SOLIDWORKS application Set swApp = Application.SldWorks ' Get active part document Dim swDoc As SldWorks.partDoc Set swDoc = swApp.ActiveDoc If Not swDoc Is Nothing Then ' Get precise bounding box using extreme points Dim boundingBox As Variant boundingBox = GetBoundingBox(swDoc) ' Draw 3D sketch of bounding box CreateBoundingBoxSketch swDoc, boundingBox ' Calculate bounding box dimensions Dim boxWidth As Double Dim boxHeight As Double Dim boxDepth As Double boxWidth = CDbl(boundingBox(3)) - CDbl(boundingBox(0)) boxHeight = CDbl(boundingBox(4)) - CDbl(boundingBox(1)) boxDepth = CDbl(boundingBox(5)) - CDbl(boundingBox(2)) ' Update custom properties UpdateCustomProperties swDoc, boxWidth, boxHeight, boxDepth Else Debug.Print "Error: No active part document." End If End Sub ' Function to Get Bounding Box Using Extreme Points Function GetBoundingBox(partDoc As SldWorks.partDoc) As Variant Dim boundingData(5) As Double Dim solidBodies As Variant solidBodies = partDoc.GetBodies2(swBodyType_e.swSolidBody, True) Dim minX As Double, minY As Double, minZ As Double Dim maxX As Double, maxY As Double, maxZ As Double If Not IsEmpty(solidBodies) Then Dim i As Integer For i = 0 To UBound(solidBodies) Dim bodyObj As SldWorks.Body2 Set bodyObj = solidBodies(i) Dim coordX As Double, coordY As Double, coordZ As Double ' Get extreme points bodyObj.GetExtremePoint 1, 0, 0, coordX, coordY, coordZ: If i = 0 Or coordX > maxX Then maxX = coordX bodyObj.GetExtremePoint -1, 0, 0, coordX, coordY, coordZ: If i = 0 Or coordX < minX Then minX = coordX bodyObj.GetExtremePoint 0, 1, 0, coordX, coordY, coordZ: If i = 0 Or coordY > maxY Then maxY = coordY bodyObj.GetExtremePoint 0, -1, 0, coordX, coordY, coordZ: If i = 0 Or coordY < minY Then minY = coordY bodyObj.GetExtremePoint 0, 0, 1, coordX, coordY, coordZ: If i = 0 Or coordZ > maxZ Then maxZ = coordZ bodyObj.GetExtremePoint 0, 0, -1, coordX, coordY, coordZ: If i = 0 Or coordZ < minZ Then minZ = coordZ Next End If ' Store bounding box coordinates boundingData(0) = minX: boundingData(1) = minY: boundingData(2) = minZ boundingData(3) = maxX: boundingData(4) = maxY: boundingData(5) = maxZ GetBoundingBox = boundingData End Function ' Subroutine to Draw 3D Sketch Bounding Box Sub CreateBoundingBoxSketch(modelDoc As SldWorks.ModelDoc2, boundingBox As Variant) Dim sketchMgr As SldWorks.SketchManager Dim minX As Double, minY As Double, minZ As Double Dim maxX As Double, maxY As Double, maxZ As Double ' Extract bounding box coordinates minX = CDbl(boundingBox(0)): minY = CDbl(boundingBox(1)): minZ = CDbl(boundingBox(2)) maxX = CDbl(boundingBox(3)): maxY = CDbl(boundingBox(4)): maxZ = CDbl(boundingBox(5)) ' Start 3D sketch Set sketchMgr = modelDoc.SketchManager sketchMgr.Insert3DSketch True sketchMgr.AddToDB = True ' Draw bounding box edges Create3DSketchLine sketchMgr, maxX, minY, minZ, maxX, minY, maxZ Create3DSketchLine sketchMgr, maxX, minY, maxZ, minX, minY, maxZ Create3DSketchLine sketchMgr, minX, minY, maxZ, minX, minY, minZ Create3DSketchLine sketchMgr, minX, minY, minZ, maxX, minY, minZ Create3DSketchLine sketchMgr, maxX, maxY, minZ, maxX, maxY, maxZ Create3DSketchLine sketchMgr, maxX, maxY, maxZ, minX, maxY, maxZ Create3DSketchLine sketchMgr, minX, maxY, maxZ, minX, maxY, minZ Create3DSketchLine sketchMgr, minX, maxY, minZ, maxX, maxY, minZ Create3DSketchLine sketchMgr, minX, minY, minZ, minX, maxY, minZ Create3DSketchLine sketchMgr, minX, minY, maxZ, minX, maxY, maxZ Create3DSketchLine sketchMgr, maxX, minY, minZ, maxX, maxY, minZ Create3DSketchLine sketchMgr, maxX, minY, maxZ, maxX, maxY, maxZ ' Finish 3D sketch sketchMgr.AddToDB = False sketchMgr.Insert3DSketch True ' Update Model modelDoc.ForceRebuild3 True modelDoc.GraphicsRedraw2 End Sub ' Helper Function to Create a 3D Sketch Line Sub Create3DSketchLine(sketchMgr As SldWorks.SketchManager, x1 As Double, y1 As Double, z1 As Double, x2 As Double, y2 As Double, z2 As Double) sketchMgr.CreateLine x1, y1, z1, x2, y2, z2 End Sub ' Subroutine to Update Custom Properties Sub UpdateCustomProperties(modelDoc As SldWorks.ModelDoc2, width As Double, height As Double, depth As Double) Dim customPropMgr As SldWorks.CustomPropertyManager Set customPropMgr = modelDoc.Extension.CustomPropertyManager("") ' Convert dimensions to string format for properties Dim widthStr As String Dim heightStr As String Dim depthStr As String widthStr = Format(width * 1000, "0.000") ' Convert to mm heightStr = Format(height * 1000, "0.000") depthStr = Format(depth * 1000, "0.000") ' Set or update custom properties customPropMgr.Add3 "BoundingBoxWidth", swCustomInfoText, widthStr & " mm", swCustomPropertyDeleteAndAdd customPropMgr.Add3 "BoundingBoxHeight", swCustomInfoText, heightStr & " mm", swCustomPropertyDeleteAndAdd customPropMgr.Add3 "BoundingBoxDepth", swCustomInfoText, depthStr & " mm", swCustomPropertyDeleteAndAdd End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/TessBox-EN-MM-INCH.swp). ## Improve Workflow with Custom Solutions Need to modify the macro to fit your workflow needs or to interact with other processes? At [Blue Byte Systems](https://bluebyte.biz/contact/) Inc., our team of experts provides custom macro and add-in development services to serve your specific requirements. Change the code to perform specific workflows like multi-body parts, or work with your existing data management systems. And if stuck, reach out to us to discuss what we can do to improve your solution to fit into your productive workflow methods. **Categories:** macros --- ### [SOLIDWORKS Macro: Toggle Solid Body Visibility](https://bluebyte.biz/macros/solidworks-macro-toggle-solid-body-visibility/) **Published:** September 22, 2025 **Author:** Amen Jlili **Content:** ## Description This macro automates the process of toggle solid body visibility in a SOLIDWORKS model. It works by programmatically selecting the “Solid Bodies” folder (named **“Corps volumiques”** in French) and then using the HideBodies and ShowBodies methods. This macro is an efficient tool for engineers who need to quickly hide and then show all solid bodies within a part document, streamlining their workflow. [![Toggle Solid Body Visibility](https://bluebyte.biz/wp-content/uploads/2025/09/Toggle-Solid-Body-Visibility.jpg)](https://bluebyte.biz/wp-content/uploads/2025/09/Toggle-Solid-Body-Visibility.jpg) ## System Requirements - SolidWorks Version: SolidWorks 2014 or newer - Operating System: Windows 7 or later ## Pre-Conditions **Note** - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) needs to be a part file with solid bodies. - To use the macro as-is, the name of the “Solid Bodies” folder needs to be “Corps volumiques” due to it being in its French localization. If not in French, changes will need to be made in the code. ## Results **Note** - All the solid bodies of the model will be sequentially [hidden and then shown again](https://bluebyte.biz/macros/solidworks-macro-to-efficiently-manage-assembly-by-hiding-all-sketches/). - The macro [handles selections automatically](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/). It clears any selection and, if necessary, it will also re-select the “Solid Bodies” folder. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Main subroutine to toggle visibility of solid bodies Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Sub main() ' Initialize the SolidWorks application object Set swApp = Application.SldWorks ' Get the active document (must be a part) Set Part = swApp.ActiveDoc ' Select the "Solid Bodies" folder (localized as "Corps volumiques") boolstatus = Part.Extension.SelectByID2("Corps volumiques", "BDYFOLDER", 0, 0, 0, False, 0, Nothing, 0) boolstatus = Part.Extension.SelectByID2("Corps volumiques", "BDYFOLDER", 0, 0, 0, False, 0, Nothing, 0) ' Hide all solid bodies in the folder Part.FeatureManager.HideBodies ' Clear selection to reset Part.ClearSelection2 True ' Re-select the "Solid Bodies" folder to toggle visibility back boolstatus = Part.Extension.SelectByID2("Corps volumiques", "BDYFOLDER", 0, 0, 0, False, 0, Nothing, 0) boolstatus = Part.Extension.SelectByID2("Corps volumiques", "BDYFOLDER", 0, 0, 0, False, 0, Nothing, 0) ' Show all solid bodies in the folder Part.FeatureManager.ShowBodies End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/ShowHideBodies.swp). ## Customization Does your project have special needs that are not addressed by this macro, such as advanced operations like toggle solid body visibility? We can help! If you need to customize the macro to work with a non-standard file structure, are working with a different language version of SOLIDWORKS, or are working on a solution that requires a fairly complex multi-step process, we are here to assist. We work with you directly to understand your unique needs and develop a custom solution that fits in your SOLIDWORKS environment. Contact us today to discuss your project and make full use of the power of automation to achieve utmost efficiency. **Categories:** macros --- ### [SOLIDWORKS Macro: Export Part and Assembly to IGES File](https://bluebyte.biz/macros/solidworks-macro-export-part-and-assembly-to-iges-file/) **Published:** September 21, 2025 **Author:** Amen Jlili **Content:** ## Description This SOLIDWORKS macro provides a fast and efficient way to export active documents to the IGES file format (.igs). Designed for SOLIDWORKS parts and assemblies, this macro automatically saves the exported IGES file to the same directory as the original document, using the same filename. With the ability to export part and assembly to IGES file, this is an ideal solution for you if you are someone who frequently needs to save their CAD files in a universal format for compatibility with other CAD software. ## System Requirements - SolidWorks Version: SolidWorks 2014 or newer - Operating System: Windows 7 or later ## Pre-Requisites **Note** - The active document you’ll be working on must be a [part or assembly](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/). - This macro will not operate correctly with [drawing files](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/). - Make sure to save the document changes before running the macro, since the file will be saved in the same directory as the original file. ## Results **Note** - The macro will save the [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) to an .igs file in the same directory. - Once complete, a message box will pop up indicating the [saved file location](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/). ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Dim swApp As SldWorks.SldWorks Dim Part As ModelDoc2 Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Exit if no document is active If Part Is Nothing Then Exit Sub ' Get the path of the active document Dim Path As String Path = Part.GetPathName ' Exit if the active document is a drawing (since IGES export is not supported for drawings) If Part.GetType = swDocDRAWING Then Exit Sub End If ' Prepare the path for the IGES file by replacing the extension Dim Extension As String Extension = Mid(Path, InStrRev(Path, ".")) Path = Replace(Path, Extension, ".igs") Extension = ".igs" ' Export the file as IGES longstatus = Part.SaveAs3(Path, 0, 0) ' Notify the user about the saved file location MsgBox "Saved " & Path, vbInformation End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_as_IGES.swp). ## Custom Modification Need to customize the macro? Or do you wish to incorporate it with another workflow process? At [Blue Byte Systems](https://bluebyte.biz/) Inc., we specialize in doing just that, whether you need to export part and assembly to IGES file or adapt the macro for other tasks. Please reach out to us, and we will develop a custom macro designed to meet your specific needs! Ready to be more productive with a custom macro? Click here to [contact us](https://bluebyte.biz/contact/)! **Categories:** macros --- ### [How to Measure Sketch Length and Add Custom Property Using VBA Macro?](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/) **Published:** September 17, 2025 **Author:** Amen Jlili **Content:** This guide will give you an in-depth idea of a powerful VBA macro for SOLIDWORKS that automates the process to measure sketch length and add custom property using VBA macro. [![How to Measure Sketch Length and Add Custom Property Using VBA Macro and An illustration showing two side-by-side screenshots of a "Summary Information" window from a software, labeled "BEFORE" on the left and "AFTER" on the right. Each window has a table with columns for "Property Name," "Type," "Value / Text Expression," and "Evaluated Value," with an "Edit List" button and options for "OK," "Cancel," and "Help." The "BEFORE" table lists properties like MDL_EngAppId, Revision, Description, and a new property, with values such as dates and numbers. The "AFTER" table includes the same properties plus two new ones, "Number" and "Total Length," with updated values, including 10.751 for Total Length, indicating changes or additions to the data.](https://bluebyte.biz/wp-content/uploads/2025/09/How-to-Measure-Sketch-Length-and-Add-Custom-Property-Using-VBA-Macro.png)](https://bluebyte.biz/wp-content/uploads/2025/09/How-to-Measure-Sketch-Length-and-Add-Custom-Property-Using-VBA-Macro.png) ## System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2014 or newer. - **Operating System:** Windows 7 or later. ## Prerequisites Before you run the macro, ensure you have the correct file and selection active. The macro will display an error message if these conditions aren’t met. - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be a **part (.SLDPRT)** or an **assembly (.SLDASM)** file. - The sketch you’d like to utilize must be **selected within the FeatureManager Design Tree** before running the macro. - The macro has been designed specifically to ignore construction geometry and text, so your total length calculation is only taken from utilizable geometry. ## What to Expect? After completing the macro, look out for these few things: - There will be a new [custom property](https://bluebyte.biz/macros/the-custom-properties-and-save-as-macro-for-solidworks/), “Total Length,” in your part or assembly file. - Its value will be the total length of your chosen sketch segments, displayed in either inches or millimeters, depending on your [document unit settings](https://bluebyte.biz/macros/enforce-consistent-units-solidworks-macro-to-match-component-unit-system/). - If something is wrong—for example, you didn’t select a sketch or you’re in the incorrect type of file—a message box will pop up to tell you what you need to change. By adding this important metadata, the overall length value can be queried and populated automatically downstream in applications like Bills of Materials (BOMs), drawing title blocks, and Product Data Management (PDM) systems. This keeps the data consistent through the entire project lifecycle, minimizing discrepancies. ### **Running the Macro** To execute, here’s what you need to do— 1. Open your SOLIDWORKS part or assembly file. 2. Locate the sketch you want to measure in the FeatureManager Design Tree. 3. Click on the sketch to select it. Make sure it is highlighted. 4. Run the macro. You can do this from the SOLIDWORKS macro toolbar or by going to Tools > Macro > Run… and selecting the macro file. That’s it! The macro will execute in a split second. won’t see any visual updates in your model, but if you open the **[Custom Properties](https://bluebyte.biz/macros/automate-solidworks-bounding-box-creation-and-sketch-generation/)** of your file, you’ll notice a new property titled **“Total Length”** with the calculated value. ### **VBA Macro Code** ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Public Enum swSkchSegments_e swSketchLINE = 0 swSketchARC = 1 swSketchELLIPSE = 2 swSketchSPLINE = 3 swSketchTEXT = 4 swSketchPARABOLA = 5 End Enum Sub main() ' Declare and initialize necessary SolidWorks objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object (part or assembly) Dim swSelMgr As SldWorks.SelectionMgr ' Selection manager object Dim swFeat As SldWorks.Feature ' Feature object for the selected sketch Dim swSketch As SldWorks.sketch ' Sketch object to store the selected sketch Dim swCustProp As CustomPropertyManager ' Custom property manager for adding properties to the model Dim swSkchSeg As SldWorks.SketchSegment ' Sketch segment object for each segment in the sketch Dim UserUnit As UserUnit ' User unit object to determine the document's unit system Dim i As Long ' Loop counter for iterating through sketch segments Dim bRet As Boolean ' Return status of custom property addition Dim vSkchSeg As Variant ' Array to hold the sketch segments in the selected sketch Dim nLength As Double ' Total length of the sketch segments ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if a document is currently active If swModel Is Nothing Then MsgBox "No active document found. Please open a part or assembly and try again.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is a part or assembly (skip if it's a drawing) If swModel.GetType = 3 Then MsgBox "This macro only works on parts or assemblies. Please open a part or assembly and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Get the user unit system (e.g., metric or imperial) Set UserUnit = swModel.GetUserUnit(swUserUnitsType_e.swLengthUnit) ' Get the selection manager object Set swSelMgr = swModel.SelectionManager ' Check if a sketch is selected in the feature manager If swSelMgr.GetSelectedObjectCount2(-1) > 0 And swSelMgr.GetSelectedObjectType3(1, -1) = swSelSKETCHES Then ' Get the selected sketch feature Set swFeat = swSelMgr.GetSelectedObject5(1) Set swSketch = swFeat.GetSpecificFeature2 ' Get all the sketch segments in the selected sketch vSkchSeg = swSketch.GetSketchSegments ' Loop through each segment in the sketch For i = 0 To UBound(vSkchSeg) Set swSkchSeg = vSkchSeg(i) ' Ignore construction lines and text segments If swSkchSeg.ConstructionGeometry = False Then If swSketchTEXT swSkchSeg.GetType Then ' Accumulate the length of valid sketch segments nLength = nLength + swSkchSeg.GetLength End If End If Next i ' Clear any selections in the document swModel.ClearSelection2 True ' Get the custom property manager object for the active document Set swCustProp = swModel.Extension.CustomPropertyManager("") ' Add the total length as a custom property in inches or mm based on the unit system If UserUnit.IsMetric = False Then bRet = swCustProp.Add3("Total Length", 30, Round(nLength * 39.3701, 2) & " in", 1) ' Add total length in inches ElseIf UserUnit.IsMetric Then bRet = swCustProp.Add3("Total Length", 30, Round(nLength * 1000, 2) & " mm", 1) ' Add total length in mm End If Else ' Show error message if no sketch is selected MsgBox "Please select a sketch from the feature manager and try again.", vbExclamation, "No Sketch Selected" Exit Sub End If End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/MeasureSketchAndAddLengthProperty.swp). ## Need a Customized SOLIDWORKS Solution? If you need a customized version of the measure sketch length and add custom property using VBA macro or more advanced automation solutions, make sure to[ reach out](https://bluebyte.biz/contact/)! Our experts at Blue Byte System Inc. will provide you with a custom macro that is best suited to your specific needs. Contact us today to learn how we can help you streamline your engineering processes and maximize your productivity. **Categories:** macros --- ### [How Do I Automate the Convert Entities Tool for Inner Loops Only](https://bluebyte.biz/macros/how-do-i-automate-the-convert-entities-tool-for-inner-loops-only/) **Published:** September 15, 2025 **Author:** Amen Jlili **Content:** This article is going to show you how to use a simple VBA macro to automate the convert entities tool for inner loops only. This makes the whole sketching process faster and easier. [![Automate the Convert Entities Tool for Inner Loops Only and A screenshot of a SolidWorks CAD software interface displaying a 3D model of a mechanical assembly named "Bracket_Assembly." The central viewport shows an isometric view of a gray L-shaped bracket with a circular hole, mounted on a purple base plate, with a yellow "COM" (Center of Mass) marker at the hole's center. The left sidebar, the FeatureManager Design Tree, lists components and features including "Origin," "Front Plane," "Top Plane," "Right Plane," "Extrude1," "Fillet1," and "Mate1." The top menu bar includes tabs like File, Edit, View, Insert, and Tools, with a status bar at the bottom showing "Edit Assembly" and green X, Y, Z axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/09/Automate-the-Convert-Entities-Tool-for-Inner-Loops-Only.png)](https://bluebyte.biz/wp-content/uploads/2025/09/Automate-the-Convert-Entities-Tool-for-Inner-Loops-Only.png) ## The VBA Macro: One-Click Access to Inner Loops As mentioned earlier, this macro gives you a direct shortcut to the Convert Entities feature of your SolidWorks. It helps you target specifically the inner loops of the sketch you’re working on. Also, it allows you to automate the selection of the inner loops process. As a result, you’ll be able to quickly and easily convert inner contour edges in a sketch. ### How Does This Macro Function? Basically, the macro calls up the swSketchManager.SketchUseEdge3 method, a convenient SolidWorks API utility. By calling up the **SelectInnerLoops** parameter to **True**, the macro gets SolidWorks to automatically tag and select all inner loops of the active sketch. That one line of code shortens what would be an otherwise laborious multi-step operation. ### System Requirements - SolidWorks Version: [2014 or newer](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/). - Operating System: Windows 7 or newer. ### Pre-Requisites - Active Document: Either a Part (.sldprt) or an Assembly (.sldasm) document. - Sketch Status: Make sure you’re in an [active sketch](https://bluebyte.biz/macros/solidworks-macro-to-efficiently-manage-assembly-by-hiding-all-sketches/). That’s a must before running the macro. ## The VBA Macro Code The following is your VBA code, which can also be interpreted as the engine behind this macro. Go through each section and refer to the breakdown later in this content to understand its functionality at a deeper level of clarity. ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Sub main() ' Declare and initialize necessary SolidWorks objects Dim swApp As SldWorks.SldWorks ' SolidWorks application object Dim swModel As SldWorks.ModelDoc2 ' Active document object Dim swSketchManager As SldWorks.SketchManager ' Sketch manager object to manage sketch-related functions Dim boolstatus As Boolean ' Status variable to check the success of the operation ' Initialize SolidWorks application and get the active document Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc ' Check if there is an active document in SolidWorks If swModel Is Nothing Then MsgBox "No active document found. Please open a part or assembly and activate a sketch.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is either a part or an assembly If swModel.GetType swDocPART And swModel.GetType swDocASSEMBLY Then MsgBox "This macro only works with part or assembly documents. Please open a part or assembly and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Get the Sketch Manager object from the active document Set swSketchManager = swModel.SketchManager ' Use the SketchUseEdge3 method to select only inner loops ' Syntax: SketchUseEdge3(ConvertAllEntities As Boolean, SelectInnerLoops As Boolean) As Boolean ' ConvertAllEntities: Set to False to avoid converting all entities in the sketch. ' SelectInnerLoops: Set to True to select only inner loops for conversion. boolstatus = swSketchManager.SketchUseEdge3(False, True) ' Check if the operation was successful and notify the user If boolstatus Then MsgBox "Inner loops have been successfully selected for conversion.", vbInformation, "Operation Successful" Else MsgBox "Failed to select inner loops for conversion. Please ensure you are in an active sketch.", vbExclamation, "Operation Failed" End If End Sub ``` ## Getting Started: Download & Installation 1. Download Macro: Download the ConvertInnerLoop.swp macro file from [here](http://https;//soldidworksvbamacros.bluebyte.biz/images/convertInnerLoop.swp). 2. Save File: Save the file in your preferred easy-to-find location. If you wanna follow best practice, a directory dedicated to [SolidWorks macros](https://bluebyte.biz/macros/solidworks-macro-for-creating-a-center-of-gravity-cog-point/) would be perfect. 3. [Add the Macro to your SolidWorks](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/): - Open Tools > Macro > Run… in SolidWorks. - Open your saved file and select to choose it. - Or, you can save to a shortcut key, alternatively, insert into a user-defined CommandManager toolbar, so it is readily available for your convenience. ## Need a Custom Macro? Do you have a specific, repeated task in mind for SolidWorks that you’d like to automate? For modeling, drawing, or PDM, at [Blue Byte Systems](https://bluebyte.biz/) Inc., we can help you better meet your specific needs and work more efficiently. Contact us for custom macro development that is designed for your specific workflow. **Categories:** macros --- ### [How to Use VBA Macros for SOLIDWORKS Automation](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) **Published:** September 10, 2025 **Author:** Amen Jlili **Content:** A VBA (Visual Basic for Applications) Macro is a simple program that has been developed to automate repetitive tasks in software like SOLIDWORKS. For designers and engineers, this is a useful tool for error minimization and time saving. Instead of doing the same thing over and over again manually, like generating a BOM or changing properties across hundreds of files, a macro can accomplish it for you in seconds. Using these macros, you are able to save valuable time and address complex, creative design issues. This article presents a comprehensive tutorial on how to use VBA macros for SolidWorks automation. ## Why Every SOLIDWORKS Engineer Must Learn to Use VBA Macros? The advantage of using VBA macros in SOLIDWORKS extends far beyond just saving time. Especially since it’s such a powerful CAD software that’s being widely used by designers and engineers alike for creating complex 3D models as well as assemblies. It’s all about simplifying your overall workflow and reaching new levels of efficiency. Some of the key benefits are as follows: - Automation of Tasks: Macros can automate almost any repetitive task, from basic property modifications to complex feature creation and manipulation. This is especially useful in large projects with [many parts](https://bluebyte.biz/macros/solidworks-macro-to-export-assembly-components-as-parasolid/) or standardized components. - Improved Productivity: By automating routine tasks, you can greatly cut down on time spent on mundane activities so that you can complete projects faster and perform more work. - Fewer Errors: Repetitive tasks and manual data entry are prone to human error. A macro, on the other hand, performs the same task the same way each time, so consistency and reliability are assured. - Customization and Specialization: While SOLIDWORKS has a plethora of features right out of the box, macros allow you to create custom tools specific to your requirements and design processes. You can create [specialized functions](https://bluebyte.biz/macros/solidworks-macro-for-feature-driven-component-pattern/) that aren’t found in the standard application. - [Batch Processing](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/): Need to apply the same modification to hundreds of files? A macro can do this with a single click, opening up hours or even days of work. This is especially a life-changer when dealing with large assemblies and multi-component projects. ## Getting Started: Creating and Running a VBA Macro You don’t [need to be a programmer](https://bluebyte.biz/solidworks/solidworks-programming-language-a-beginners-guide-to-c-vba-and-vb-net/) to start using macros in SOLIDWORKS. You can start by executing macros that someone else has written or by writing your own simple macros using recording. It’s an easy process and one that is highly integrated into the SOLIDWORKS program. ### How to Record or Run a VBA Macro - Open the VBA Editor: Go to the Tools menu in SOLIDWORKS, to Macro, and then New to create a new macro or Run to execute a saved macro. - Write or Record a Macro: - When opening a new macro, the VBA Editor will be displayed. - Macros consist of VBA code that allows communication with SOLIDWORKS’ API (Application Programming Interface) for controlling elements in the application. - If you are a beginner, the easiest method for you to begin would be to use the Macro Recorder. - Go to Tools > Macro > Record, execute a sequence of actions (such as [saving a file as a PDF](https://bluebyte.biz/macros/solidworks-macro-to-save-drawings-as-pdf-toolbar-button-integration/)), and then click Stop Recording. - SOLIDWORKS will create the code for you to utilize or modify in the future. - Run the Macro: You can run the macro you’ve created or selected directly in SOLIDWORKS. The macro will perform whatever task it is designed to do on the active part, assembly, or [drawing](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/). Test and Debug: All macros must be tested on a sample file to ensure they perform as expected. If anything fails, you can enable the VBA Editor for debugging and make any necessary code adjustments. ### Make The Most Out of Free VBA Macro Library by Blue Byte Systems While making your own macros is rewarding, it has a steep learning curve. For the majority of the engineers, there is a faster and more effective way to leverage an already available library of pre-written macros. Such libraries are typically created by professionals in SOLIDWORKS automation and typically contain solutions to common, repetitive tasks on a daily basis. Blue Byte Systems provides a large and free [VBA macro library for SOLIDWORKS](https://bluebyte.biz/solidworks-vba-macros-library/) users. The macros are designed to help users automate their work in various aspects of their workflow. The library is organized for your convenience: - Part Automation: Macros for creating or editing parts. - Assembly Automation: Macros for automating assembly management. - Drawing Automation: Macros for automating drawing creation and export. - Sketch Automation: Macros to interact more efficiently with sketches. Using an existing library like this is an excellent way of getting a return on investment right away. You don’t have to spend time coding and debugging, but can simply download and run the macro that you need. This makes high-level automation available to all SOLIDWORKS users, regardless of any programming background. ## Frequently Asked Questions (FAQ) ### Do I Need To Be A Programmer To Use SolidWorks VBA Macros? Not at all! You can start by simply using the built-in [Macro Recorder](https://en.wikipedia.org/wiki/Macro_recorder) to automate simple tasks. You can also take advantage of free pre-written macros from online libraries, where no programming experience is required to use. ### Are VBA Macros Safe To Use? Will They Corrupt My Files? When properly used, VBA macros are safe. They access your files using the official SOLIDWORKS API. Nevertheless, as with any new macro, it is always a good idea to run it on a backup or non-critical file first to confirm that it works as intended. ### Can Both Assemblies And Parts Be Programmed With VBA Macros? Yes, the SOLIDWORKS API contains objects that interface with every type of document, including parts, assemblies, and drawings. You can write macros to automate tasks in any of these environments. ## Embracing Automation for the Future of Engineering In today’s competitive world, it’s imperative to work smarter, not harder. VBA macros in SOLIDWORKS are an excellent way of doing that. Automating routine tasks takes you out of drudgery and allows your imagination to flourish. At [Blue Byte Systems](https://bluebyte.biz/) Inc., we believe the automation capability should be accessible to everyone in this new era of technology. That’s why our comprehensive and free macro libraries are always at your service. So you can start being more productive immediately. Whether you use a free macro from our library or make one yourself, embracing automation is the secret to unleashing your peak productivity. This article has properly explained how to use VBA macros for SolidWorks automation. So, you are able to recapture your SOLIDWORKS experience and achieve access to a whole new level of efficiency. **Categories:** macros --- ### [5-Step Guide to Using the Auto-Mate Addition Macro in SolidWorks](https://bluebyte.biz/macros/5-step-guide-to-using-the-auto-mate-addition-macro-in-solidworks/) **Published:** September 9, 2025 **Author:** Amen Jlili **Content:** Auto-Mate Addition Macro is a SolidWorks VBA code script applied to automatically add mates to your assemblies. The macro is an efficient solution for engineers and designers to save time on repetitive manual work and prevent human error. Unlike manually creating mates, which is time-consuming and laborious, this macro makes it easier. With the macro, you can use a defined mate in an instant with one operation. Leaning on the SolidWorks VBA API, the macro ensures consistency and accuracy in your designs and liberates you from manual repetitive tasks. This article provides full instructions for installing, using, and customizing the Auto-Mate Addition Macro. With the addition of this tool to your process, you can significantly boost your productivity and work on more complex design problems. In order to use the macro, have the parts to be mated pre-selected, open the [SolidWorks VBA editor](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) (Alt + F11), copy and paste the code, and run the macro. ## Understanding the Auto-Mate Addition Macro Auto-Mate Addition Macro is a simple and effective tool to assist in making your [assembly process](https://bluebyte.biz/macros/solidworks-macro-to-automate-parent-assembly-selection/) using SolidWorks as smooth as possible. It makes it easy to add a specific mate relationship between [selected entities](https://bluebyte.biz/macros/solidworks-macro-to-save-assembly-as-part-all-components/), which saves you time and effort from performing repetitive manual labor. This macro is useful in workflows where you’re constantly needing to create the same type of mate, for example, a coincident or [concentric mate](https://bluebyte.biz/macros/solidworks-macro-for-automated-mate-toggling-and-assembly-constraint-testing/), between parts. By automating it, you’re avoiding the hassle of possible errors and inconsistencies in your designs. ### Key Features and Benefits This macro is not just about automation, though; it’s about streamlining your design process. Here are some of the ways it makes your life easier: - **Boosts Productivity:** Installs mates immediately with one click without accessing menus and dialog boxes. - **Ensures Accuracy:** Automatically applies an accurate, pre-defined mate type that preserves design integrity and consistency. - **Easy for Challenging Assemblies:** Ideal for complex assemblies with many components, where manually adding mates can be time-consuming and prone to errors. **Automatically Cleans Up:** Macro gets rid of the chosen entities after being executed, so that you will not inadvertently change your model or contain unnecessary unwanted objects in your workspace. ### System Requirements To execute this macro, keep your environment as noted below: - **SolidWorks Version:** SolidWorks 2014 and later. The macro utilizes APIs compatible with this version. - **Operating System:** Windows 7 and later. The SolidWorks software application itself relies on a Windows platform. ### Prerequisites In order to execute the macro successfully, the following preconditions are necessary: - **Active Document:** A running and active SolidWorks document (assembly or part) must be open in the application window. Without an open document, the macro will not execute. - **Proper Selection Order:** The components that you want to mate need to be [pre-selected inside the graphics window](https://bluebyte.biz/macros/solidworks-macro-to-instantly-isolate-selected-components-in-an-assembly/) in the correct sequence prior to executing the macro. The specific sequence required depends on the mate that you are using. A concentric mate requires two round edges or faces to be selected. ## How to Set Up and Use the Macro? The following are the simple steps to get the macro functioning on your SolidWorks computer: - **Open SolidWorks:** Open the SolidWorks and the assembly or the part file you intend to work on. - **Select Entities:** In the graphics window, choose the two entities you intend to mate. - **Access the VBA Editor:** Use **Alt + F11** on your keyboard to open the [SolidWorks VBA](https://bluebyte.biz/solidworks-vba-macros-library/) editor. - **Insert the Code:** Open up your VBA editor, **right-click** your assembly file in the project tree, choose **Insert**, and then **Module**. Paste the provided macro code into the new module window. - **Run the Macro:** In order to run the macro, either hit **F5** while within the VBA editor or choose **Tools > Macro > Run** and select your macro from the list. ### Understanding the Results After you’ve run the macro, you should notice the following results: - **Mate Creation:** You now have a new mate generated in the entities you selected and shown in the FeatureManager design tree under Mates. - **Clean Workspace:** The previously selected entities will be automatically cleared, and your graphics area will now be empty and ready for your next action. ### VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare variables for SolidWorks application and document Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object Dim Gtol As Object ' Placeholder for potential future use (e.g., geometric tolerances) ' Main subroutine Sub main() ' Initialize SolidWorks application Set swApp = CreateObject("SldWorks.Application") ' Get the active document from SolidWorks Set Part = swApp.ActiveDoc ' Ensure an active document exists If Part Is Nothing Then MsgBox "No active document found. Please open a part or assembly." Exit Sub End If ' Add a mate with specified parameters ' Parameters: ' - Type: 1 (Concentric) ' - Alignment: 2 (Aligned) ' - Distance/Angle: 0 (No offset) ' - Minimum distance: 0.01 meters ' - Angle: 0.5235987755983 radians (~30 degrees) Part.AddMate 1, 2, 0, 0.01, 0.5235987755983 ' Example parameters for a concentric mate ' Clear any active selections to tidy up Part.ClearSelection ' Notify the user about the operation MsgBox "Mate added successfully." End Sub ``` You can also download the macro file directly from [here](https://solidworksvbamacros.bluebyte.biz/images/concentric_mate.swp). ## **Customization and Advanced Usage** This macro is a great starting point, but the strength of it lies in how you can modify it. For example, based on your personalized requirement, you might need to change the mate type, adjust the parameters, run batch operations, etc. And the good news? We, at [Blue Byte Systems](https://bluebyte.biz/) Inc., specialize in creating customized macros to meet specific requirements. We can provide you with custom macro development tailored to meet your needs and help integrate it with other processes, too. So, should you require any special needs or wish to integrate this macro into a more sophisticated automation process, why the wait? Get in touch with us today! **Categories:** macros --- ### [What’s New in PDM2Excel 2025](https://bluebyte.biz/solidworks/solidworkspdm/add-ins/whats-new-in-pdm2excel-2025/) **Published:** August 19, 2025 **Author:** Amen Jlili **Content:** [**PDM2Excel** ](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")has become the go-to tool for companies looking to automate the export of **Bills of Materials (BOMs)** from SOLIDWORKS PDM into Excel spreadsheets. It streamlines workflows by reducing manual work, ensuring consistency across teams, and giving businesses a reliable way to format and distribute engineering data. With the **2025 release**, and especially with the focus on what’s new in PDM2Excel 2025, the tool introduces several highly-requested improvements, simplifying setup, expanding export capabilities, and improving output customization. ## Key Features in 2025 ### 1. No Need for a Document Manager API Key In earlier versions, administrators had to configure the **Document Manager API license key** before using PDM2Excel. - This step has now been **eliminated**. - Setup is faster, with fewer dependencies to manage. - IT and administrators no longer need to track or renew the API license key, reducing overhead. ### 2. Create New Display States and Export in One Spreadsheet Engineers often need BOMs with [different views or display states](https://bluebyte.biz/solidworks/solidworkspdm/how-to-configure-the-solidworks-pdm-bill-of-materials-for-pdm2excel/) in one place. - [**PDM2Excel** ](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")2025 can now **generate new display states automatically**. - These can be exported into a [single spreadsheet](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/), consolidating information that previously required multiple exports. - This is especially useful for companies that manage multiple configurations or need reports for different stakeholders. ### 3. Background Color Customization Presentation and readability matter when sharing BOMs with management or suppliers. - A new option allows users to define **background colors** for BOM exports. - This ensures key data stands out and reports align with company branding. - Combined with [Excel templates](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/), this gives teams even more control over how BOMs are delivered. ### 4. Weldment Quantity Aggregation For companies using [weldments](https://bluebyte.biz/pdm2excel/pdm2excel-v7-new-support-for-structural-members-in-bill-of-materials-exports/), handling quantities in BOMs has always been a challenge. - [**PDM2Excel** ](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")2025 now **aggregates quantities of identical weldment bodies**. - This ensures BOM exports reflect accurate totals, avoiding duplication or miscounts. - The result: a cleaner, more reliable BOM that matches how weldments are manufactured. ## Why These Updates Matter These changes aren’t just incremental — they reflect feedback from real-world engineering teams: - **Simplified setup** → No more Document Manager API dependency. - **Better data visibility** → Consolidated spreadsheets with multiple display states. - **Improved communication** → More polished Excel exports with background color control. - **Accuracy for weldments** → Correct roll-ups and totals where they matter most. [**PDM2Excel** ](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")continues to evolve as the standard for PDM-to-Excel BOM automation, ensuring teams can spend less time exporting data and more time building products. **Categories:** add-ins, SOLIDWORKS, SOLIDWORKSPDM **Tags:** bill of materials, solidworks pdm --- ### [SOLIDWORKS PDM Notifications Troubleshooting](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-notifications-troubleshooting/) **Published:** May 22, 2025 **Author:** Amen Jlili **Content:** ![SOLIDWORKS PDM Notifications Troubleshooting](https://bluebyte.biz/wp-content/uploads/2025/05/image-10-1024x381.png) If you’re missing notifications in SOLIDWORKS PDM, especially those typically delivered to your internal inbox in the PDM client, there’s a good chance the **SOLIDWORKS PDM Database Service** is not running on the server. This service is critical for processing and delivering notifications such as workflow state changes, transitions, and user actions, and it’s often the core issue behind SOLIDWORKS PDM notifications troubleshooting. If it’s not running, users may not receive notifications as expected. ## How to Resolve the Issue Follow these steps on the PDM server to restore notification functionality: ### 1. Open the Database Server Configuration - On the server, launch **SOLIDWORKS PDM Database Server Configuration**. ### 2. Verify SQL Connection - Ensure the SQL connection is properly configured using the **`sa` username and password**. *You may have to request this from IT*. ![Screenshot of a small section of a SOLIDWORKS PDM task configuration dialog focusing on the "Output" settings. The collapsible "Output" panel is expanded, showing a field labeled "Export Location" with the value "C:\Export\DXF". Below it, the evaluated (resolved) value is displayed in gray text as "C:\Export\DXF". To the right are three buttons: a folder icon ("...") for browsing, a question mark for help, and a "Browse..." button. At the bottom right is a checkbox labeled "Customize Location..." alongside a small folder icon. This section defines where exported DXF files will be saved when the task runs.](https://bluebyte.biz/wp-content/uploads/2025/05/image-11-1024x423.png) ### 3. Check Windows Services - Open the **[Windows Services Console](https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/)**: Press `Win + R`, type `services.msc`, and press Enter. - Locate the service named **[SOLIDWORKS PDM Database Service](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/)**. ![](https://bluebyte.biz/wp-content/uploads/2025/05/image-12.png) ### 4. Start the Service - If the service is **stopped**, right-click on it and select **Start**. - Make sure its **startup type** is set to **Automatic** to prevent this issue in the future. ### 5. Open your Inbox ![Screenshot of the SOLIDWORKS PDM Inbox window for the vault "Bluebyte". The left pane shows the folder structure with "Task Notifications" selected. The main list displays several task notifications, all sent on 2025-05-16 between 10:20 and 10:22 AM, with the subject "AMEN-HOME" and the sender listed as "SOLIDWORKS PDM N...". One notification is selected (highlighted in blue), and its preview pane at the bottom shows a bold blue header titled "SOLIDWORKS PDM notification". The interface indicates that multiple automated task execution alerts addressed to user AMEN-HOME have been received in the PDM inbox.](https://bluebyte.biz/wp-content/uploads/2025/05/image-14-1024x381.png)## Still not working? [Contact Blue Byte Systems](https://bluebyte.biz/contact/ "Contact") for expert PDM support **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm notifications --- ### [SOLIDWORKS PDM 2024 / 2025: Datacard Preview Not Working? Quick Guide to Reset eDrawings](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-2024-2025-datacard-preview-not-working-quick-guide-to-reset-edrawings/) **Published:** May 21, 2025 **Author:** Amen Jlili **Content:** After a PDM upgrade, users ***may*** report that the preview pane never loads—just a spinning wheel where the model should appear after clicking on the Preview button (**highlighted in red**). In many cases, this issue shows up alongside datacard preview not working, making it look like PDM has suddenly lost its ability to display file previews at all. ![Datacard Preview Not Working](https://bluebyte.biz/wp-content/uploads/2025/05/image-5.png) The files themselves open fine in eDrawings, but PDM’s embedded viewer can’t instantiate the eDrawings COM objects it relies on. The upgrade installed a new eDrawings build, but Windows kept pointing to the old [registration entries](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/), so PDM keeps making calls that land nowhere and the wheel spins forever. The fix is to re-register the viewer and its automation server: Open Command Prompt with **Administrator rights** and run these commands: ``` cd "C:\Program Files\SOLIDWORKS Corp\eDrawings" regsvr32 emodelview.dll eDrawingOfficeAutomator /regserver taskkill /f /im explorer.exe start explorer.exe ``` **This assumes that eDrawings is installed in the location `"C:\Program Files\SOLIDWORKS Corp\eDrawings"`.** - The first line moves to the default eDrawings directory (adjust if your installation sits elsewhere or in `Program Files (x86)`). - The second line, `regsvr32 emodelview.dll`, rewrites the registry entries for the core viewer DLL, mapping its CLSID and ProgID to the current path. - The third line, `eDrawingOfficeAutomator /regserver`, registers the headless automation server that PDM launches to generate previews and task-based PDFs. - The fourth line kills the [explorer.exe process](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/). - The last line restarts explorer. To open the command prompt as an admin, look for it in the search bar and click **Run as administrator** ![](https://bluebyte.biz/wp-content/uploads/2025/05/cmd-run-as-admin.png) Reopen the vault, select a part, assembly, or drawing, and the spinning wheel should give way to a fully rendered preview within a second or two. Run the same script on any workstation or task host that still shows the spinner to bring every machine back in line after the upgrade. For repeatability, paste those lines into a text file named, for example, `RepairPDMPreview.bat`. Right-click the batch file and choose **Run as administrator** to execute it locally. If you manage multiple [SOLIDWORKS PDM](https://bluebyte.biz/service/solidworks-pdm-data-migration/) machines, distribute the same `.bat` through Quibld so every workstation or task host fixes its preview registration in a single push. **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [Automatically Refresh Drawing Sheet Formats in SOLIDWORKS with VBA](https://bluebyte.biz/macros/automatically-refresh-drawing-sheet-formats-in-solidworks-with-vba/) **Published:** May 14, 2025 **Author:** Amen Jlili **Content:** Managing large drawing sets in SOLIDWORKS often means working with inconsistent or outdated sheet formats. Whether due to legacy templates, changes in company standards, or imported files, it’s not uncommon to find drawing sheets that don’t match the expected formatting. This macro solves that by automatically refresh drawing sheet formats in SOLIDWORKS with VBA, ensuring every sheet stays aligned with the latest standards. ## What This Macro Does - Loops through all sheets in an open drawing. - Detects each sheet’s paper size. - Clears any elements from the sheet format. - Replaces the current sheet format with a new one (in this case, a **C-size format**). - [Saves the drawing](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/) once all sheets are processed. ## When Should You Use It? - You’re transitioning to a [new title block or format](https://bluebyte.biz/macros/solidworks-macro-for-reloading-sheet-formats-in-drawing-documents/) standard. - You need to [batch-convert drawings](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) with inconsistent **sheet sizes**. - You want a consistent **template across multiple sheets**. - You’re preparing legacy drawings for [release or PDF batch export](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-and-save-all-drawings-in-a-directory-as-pdf/). ``` Dim swApp As SldWorks.SldWorks Dim swModel As ModelDoc2 Sub Main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc swModel.Visible = True RefreshSheetFormats swModel swModel.Save End Sub Sub RefreshSheetFormats(ByRef swModel As ModelDoc2) Dim swDrawingDoc As DrawingDoc Set swDrawingDoc = swModel Dim vSheetNames As Variant vSheetNames = swDrawingDoc.GetSheetNames For Each SheetName In vSheetNames Dim swSheet As Sheet Set swSheet = swDrawingDoc.Sheet(SheetName) swDrawingDoc.ActivateSheet SheetName Dim width As Double Dim height As Double Dim paperSize As swDwgPaperSizes_e paperSize = swSheet.GetSize(width, height) Select Case Size Case swDwgPaperSizes_e.swDwgPaperAsize swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperAsize, swDwgTemplates_e.swDwgTemplateAsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet Case swDwgPaperSizes_e.swDwgPaperBsize swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperBsize, swDwgTemplates_e.swDwgTemplateBsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet Case swDwgPaperSizes_e.swDwgPaperCsize swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperCsize, swDwgTemplates_e.swDwgTemplateCsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet Case swDwgPaperSizes_e.swDwgPaperDsize swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperDsize, swDwgTemplates_e.swDwgTemplateDsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet Case swDwgPaperSizes_e.swDwgPaperEsize swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperEsize, swDwgTemplates_e.swDwgTemplateEsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet Case Else swDrawingDoc.EditTemplate swModel.Extension.SelectAll swModel.DeleteSelection False 'change the sheet format swDrawingDoc.SetupSheet5 SheetName, swDwgPaperSizes_e.swDwgPaperAsize, swDwgTemplates_e.swDwgTemplateAsize, 1, 1, False, Empty, 0, 0, "Default", False swDrawingDoc.EditSheet End Select Next SheetName End Sub Public Function EndsWith(str As String, ending As String) As Boolean Dim endingLen As Integer endingLen = Len(ending) EndsWith = (Right(Trim(UCase(str)), endingLen) = UCase(ending)) End Function ``` **Categories:** macros **Tags:** sheet format, solidworks api, vba macro --- ### [Reporting Progress for Long Operations in the SOLIDWORKS API](https://bluebyte.biz/solidworks/reporting-progress-for-long-operations-in-the-solidworks-api/) **Published:** April 2, 2025 **Author:** Amen Jlili **Content:** ![Reporting Progress for Long Operations in the SOLIDWORKS API and An image showing a SOLIDWORKS software interface displaying a 3D model of a cylindrical tank with a cutout and a protruding section, viewed in an isometric motion study. The feature tree on the left lists "tank_20lb_propane" with items like "History," "Sensors," "Annotations," and "Solid Bodies" including "PW20-29Sec0." A pop-up dialog box in the center asks, "Would you like to cancel this time consuming operation?" with "Yes" and "No" buttons. The interface includes toolbars at the top with options like "Sketch," "Sheet Metal," and "Mesh Modeling," and a status bar at the bottom counting "900s.](https://bluebyte.biz/wp-content/uploads/2025/04/ReportProgress-1.png) > **💡 Complete Code Example Available on GitHub:**[https://github.com/BlueByteSystemsInc/SW\_API\_Tips\_Tricks/tree/master/ReportProgress]( > https://github.com/BlueByteSystemsInc/SW_API_Tips_Tricks/tree/master/ReportProgress) When working with the SOLIDWORKS API, it’s common to encounter operations that take significant time—such as traversing large assemblies, analyzing complex parts, or batch processing files. Unlike some applications that allow multithreading for responsiveness, SOLIDWORKS operates primarily on a single-threaded model. This means traditional threading approaches aren’t ideal for providing user feedback on lengthy operations. However, reporting progress for long operations is still possible through SOLODWORKS’ built-in API features, which allow developers to display progress and offer cancellation options, ensuring your application remains responsive. ## Why Not Use Threads? While you might instinctively think about using separate threads to keep your user interface responsive, SOLIDWORKS is inherently [single-threaded](https://bluebyte.biz/solidworks/most-useful-api-calls-to-optimize-solidworks-performance/). Interacting with the SOLIDWORKS API from multiple threads can lead to instability and unpredictable behavior, including [crashes](https://bluebyte.biz/solidworks/solidworks-api-memory-access-violations-caused-by-gdi-object-count-and-unreleased-com-objects/). Hence, relying on SOLIDWORKS’ native progress reporting tools is strongly recommended. ## SOLIDWORKS’ Built-in Progress Reporting: `UserProgressBar` SOLIDWORKS provides a straightforward mechanism for reporting progress to users via the `UserProgressBar` interface. This built-in progress bar not only shows progress visually but also allows users to cancel ongoing tasks. The user can **cancel an operation by pressing the *Escape* key**. Here’s how you can implement it effectively in your [SOLIDWORKS API](https://bluebyte.biz/solidworks/the-solidworks-apis/) programs. ## Example Implementation in C# Let’s illustrate with a practical example. The following snippet demonstrates a typical scenario: performing repetitive, [time-consuming operations](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) (like face analysis) and reporting progress clearly to users: ``` using BlueByte.SOLIDWORKS.Extensions; using SolidWorks.Interop.sldworks; using SolidWorks.Interop.swconst; using System; using System.IO; using System.Linq; namespace ReportProgress { public class Example { public static void Run() { // Launch a new instance of SOLIDWORKS var solidworksManager = new SOLIDWORKSInstanceManager(); var swApp = solidworksManager.GetNewInstance("/m", SOLIDWORKSInstanceManager.Year_e.Year2023, 160); swApp.Visible = true; // Locate and open the test file var currentLocation = new FileInfo(typeof(Example).Assembly.Location).Directory; var testFile = currentLocation.GetFiles() .FirstOrDefault(x => x.Name.Equals("tank_20lb_propane_&.SLDPRT", StringComparison.OrdinalIgnoreCase)); if (testFile == null) throw new FileNotFoundException("Could not find the specified part in the current directory."); int errors = 0, warnings = 0; var swModel = swApp.OpenDoc6(testFile.FullName, (int)swDocumentTypes_e.swDocPART, (int)swOpenDocOptions_e.swOpenDocOptions_Silent, "", ref errors, ref warnings); if (swModel == null) throw new InvalidOperationException("Failed to open the document."); bool repeat = true; while (repeat) { PerformOperationWithProgress(swApp, swModel); swApp.CloseDoc(swModel.GetTitle()); Console.WriteLine("nOperation completed."); Console.Write("Do you want to repeat the process? (Y/N): "); repeat = Console.ReadLine()?.Trim().Equals("Y", StringComparison.OrdinalIgnoreCase) == true; if (repeat) { swModel = swApp.ActiveDoc as ModelDoc2; } } swApp.ExitApp(); Console.WriteLine("nExiting. Press any key to close..."); Console.ReadKey(); } private static void PerformOperationWithProgress(SldWorks swApp, ModelDoc2 swModel) { swApp.GetUserProgressBar(out UserProgressBar swPrgBar); int maxProgress = 100000; // Example: set according to your actual workload swPrgBar.Start(0, maxProgress, "Performing face operations..."); for (int progressCounter = 1; progressCounter **Categories:** SOLIDWORKS --- ### [Best Practices for SOLIDWORKS PDM Batch Plot and File Renaming: A Complete Guide!](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-batch-plot-and-file-remaining/) **Published:** April 1, 2025 **Author:** Amen Jlili **Content:** ![SOLIDWORKS PDM Batch Plot and File Renaming and A comparison chart showing file name changes from "From" to "To" in a design software context. The chart has five rows, each with an original file name on the left and its updated name on the right, connected by an arrow. Row 1: "A.sldprt" (a yellow 3D block shape) changes to "Part1.sldprt" (a similar yellow 3D block). Row 2: "B.sldprt" (another yellow 3D block) changes to "Part2.sldprt" (a similar yellow 3D block). Row 3: "Assembly.sldasm" (a yellow 3D block with a blue cube) changes to "Product.sldasm" (a yellow 3D block with a blue cube). Row 4: "drawing1.slddrw" (a layout with yellow and gray shapes) changes to "Product_A.slddrw" (a similar layout with yellow and gray shapes). Row 5: "Product_A.slddrw" (another layout with yellow and gray shapes) changes to "Product.slddrw" (a similar layout with yellow and gray shapes).](https://bluebyte.biz/wp-content/uploads/2025/04/renaming-soldiworks-files.png) Handling the realm of data management can be perplexing, especially when dealing with massive datasets in a solid system like SOLIDWORKS PDM. Renaming files is one of the most common, yet necessary, tasks. While SOLIDWORKS PDM does these operations admirably with its robust reference-tracking mechanism, a large-scale renaming project… hundreds or thousands of files… requires a methodical and concerted approach. By embracing these PDM best practices, you can avoid the pitfalls of corrupted references, data loss, or system crashes and make the process an error-free and smooth one from start to finish. This guidebook is meant for CAD engineers and [PDM administrators](https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/) who have to deal with executing a mass-renaming operation in their day-to-day lives. We’ll take you from the first validation of your data through to final procedure cleanup and reporting, so you’ll have everything you need to accomplish the task. ## 1. The Critical First Step: Data Validation and Verification Data validation is totally important before you ever think about scripting or acquiring a file. Skipping it is the primary reason for errors with any batch process. If you are scripting from a spreadsheet of filenames, take a few moments to clean up your spreadsheet carefully. Your spreadsheet will have columns for: - **File ID (if used):** The specific identifier for your vault, a valuable search tool for identifying the correct file. - **Current Filename:** The file name actually shown in the vault. - **File Extension:** The type of file (e.g., .sldprt, .sldasm, .dwg). - **Full File Path:** The full path where the file resides in the PDM vault. This anticipation ensures that all of the files you are attempting to rename actually [exist in your vault](https://bluebyte.biz/solidworks/solidworkspdm/powershell-pdmshell-search-command-complete-guide-for-solidworks-pdm-administrators/). It may seem like a tiny thing, but when you’ve got gigantic vaults with hundreds of thousands or even millions of files, it’s easy for a child to have old or outdated entries in your source list. After you’ve made sure that the source files are present, you will also need to confirm that the target filenames do not yet exist. This is especially true if your vault is configured to disallow duplicate filenames. If some or all of your proposed new names already occupy, you will be forced to edit those entries in order to prevent conflicts. ## 2. Strategic File Prioritization and Sorting Not all files are created equal when renaming. To minimize complications and potential mistakes in your SOLIDWORKS PDM batch plot or rename operation, sort your files in a strategic order. This is a key step in the SOLIDWORKS batch processor task, especially when using assemblies with heavy complexity. A sound sorting strategy is as follows: - **Start with unreferenced files.** They are the simplest to rename and pose the least threat. - **Then move on to process the referenced files that are not yet referenced** by other files. These are typically parts used in a sub-assembly; they are not an assembly themselves. - **Lastly, process files with data on the “Contains” or “Where Used” pages.** These are the most complex files, like sub-assemblies or top-level assemblies, and should be processed last so their referenced parts have already been renamed successfully. Also consider sorting your files by name length (longest first). This avoids issues when there is a longer new name that might overwrite a shorter file name if you’re not scripting this. Power users will love the SOLIDWORKS PDM API. You can create your own batch script that does everything for you, sorting it out, checking it, and running it with precision. > 🔄 [**PDM DATA MIGRATION SERVICES**: > Need to move your SOLIDWORKS PDM data to a new system or reorganize your vault structure? Blue Byte Systems offers expert **PDM data migration services** tailored to your unique environment. Whether you’re upgrading, consolidating, or migrating from another system, we ensure your files, metadata, history, and references are preserved with precision. Trust our proven tools and deep knowledge of the PDM API to make your migration smooth, accurate, and fully validated.](https://bluebyte.biz/contact/ "Contact") ## 3. Required Pre-Rename Vault Preparation Before proceeding with the renaming process, a few extremely critical steps must be performed in order to avoid interference and make sure that this process is clean. This is your foundational element of PDM best practices. - **Check all files on all machines.** This is not an option, but rather required. Anything that has been checked out will not be available to the rename process and will result in an error. - **Have all users clear out their local cache.** The same goes for the PDM Administrator account, too. This action prevents local, stale file copies from causing problems. **[Temporarily shut down all user logins.](https://bluebyte.biz/solidworks/solidworkspdm/virtual-machine-checklist-for-your-solidworks-pdm-large-data-transformation-migration/)** This is the dramatic part. Locking logins prevents anyone from checking a file in or out, or accessing the vault while renaming is underway, and causes the entire process to become corrupt. ### 4. Reporting after Rename and SOLIDWORKS PDM Reference Clean Up After completing the rename process, your job is not finished. The last, and just as crucial, step is to compile a comprehensive report to share the findings and work out any issues that are left. Your report is your audit trail and is worth its weight in gold to debug. Columns to include in your report: - **File ID:** The file’s unique identifier. - **Original Name:** The file’s original name before the rename. - **New Name:** The new file name. - **Status:** Did it succeed or fail? - **Error Code or Message:** If it failed, what was the reason? Having this report makes it easy to visually notice any renames that have not succeeded and correct them manually. It is also a crucial part of SOLIDWORKS PDM reference clean up since it enables you to find any other broken references or not yet updated files. ## Conclusion Performing a successful [batch-renaming process](https://bluebyte.biz/data-migration/) in SOLIDWORKS PDM requires preparation, strict carefulness with data, and foresight. But don’t you worry. Apply the PDM best practices… from verifying your data to all the way up to structuring your files and composing a post-operation report. If you’ve done so, now you can be confident that your operation will proceed smoothly, precisely, and without any of the usual errors that can plague such massive operations. Success is less about tools, really, but how you operate them in a systemic and smart way. ## Frequently Asked Questions (FAQs) ### What Is The SOLIDWORKS PDM API? The [SOLIDWORKS PDM API](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) is an application programming interface by which you can automate tasks in your PDM vault. This powerful tool gives you programmatic access to file and folder properties, workflows, and user permissions, significantly improving the functionality of your PDM system beyond its standard interface. ### Why Should I Use SOLIDWORKS PDM API To Do Batch Renaming? As far as batch renaming is concerned, our PDM API offers an option to write a script that can rename hundreds or even thousands of files at once, with smarts to scan and sort, and process them without your intervention. It is much more efficient and less error-prone than doing it manually. ### Can The PDM Batch Processor Be Used To Rename Files? “Batch processor” is an umbrella term. While there are a few built-in utilities within SOLIDWORKS PDM for renaming in batch, a script utilizing the PDM API is typically the best way to go. Utilities like the [SOLIDWORKS PDM batch plot](https://bluebyte.biz/solidworks/solidworkspdm/configuring-any-solidworks-pdm-task-pdmpublisher/) are great at batching documents to plot, but for more heavy-duty data manipulation like renaming, a script tailored specifically is recommended. ### What Happens If I Don’t Check In A File Before The Rename? The file will not be renamed and must be reported as an error on your post-operation report. That’s why pre-rename preparation is mandatory. The system cannot write to a file that is not checked into the vault. **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [SOLIDWORKS PDM API: Optimizing Large Scale Operations with Batch Interfaces in SOLIDWORKS PDM](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-optimizing-large-scale-operations-with-batch-interfaces-in-solidworks-pdm/) **Published:** March 24, 2025 **Author:** Amen Jlili **Content:** When making numerous calls to the same operation in SOLIDWORKS PDM, the batch interfaces (e.g., IEdmBatchAdd2, IEdmBatchChangeState5) are designed to maximize efficiency and performance. Optimizing large scale operations with batch interfaces in SOLIDWORKS PDM becomes essential when handling high file volumes, helping reduce processing time and system strain while maintaining reliable automation. Here’s a list of all the batch interfaces in PDM and their intended uses. **Interface****Description****IEdmBatchAdd2**Allows adding multiple files or folders to the vault with improved support for additional options.**IEdmBatchChangeState5**Enables [batch transitioning of files](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) to a different workflow state with the most advanced features.**IEdmBatchDelete3**Provides functionality for deleting multiple files from the vault with enhanced validation.**IEdmBatchItemGeneration2**Facilitates batch generation of items, ensuring efficient handling of linked item creation.**IEdmBatchListing4**Retrieves detailed lists of files, folders, or items in the vault with [extended filtering options](https://bluebyte.biz/solidworks/solidworkspdm/powershell-pdmshell-search-command-complete-guide-for-solidworks-pdm-administrators/).**IEdmBatchUnlock2**Check-in operation for multiple files in a batch, including support for conditional operations and error handling.**IEdmBatchUpdate2**Updates properties or variables for multiple files in the vault with better performance and reliability.You may also read: [SolidWorks Macro to Batch Rebuild and Export Drawings to PDF](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) **Categories:** PDM API Tips --- ### [Most Useful API Calls to Optimize SOLIDWORKS Performance](https://bluebyte.biz/solidworks/most-useful-api-calls-to-optimize-solidworks-performance/) **Published:** March 6, 2025 **Author:** Amen Jlili **Content:** ![Useful API Calls to Optimize SOLIDWORKS Performance and A screenshot of a SolidWorks CAD software interface displaying a 3D model of a mechanical assembly named "Bracket_Assembly." The central viewport shows an isometric view of a gray L-shaped bracket with a circular hole, mounted on a purple base plate, with a yellow "COM" (Center of Mass) marker at the hole's center. The left sidebar, the FeatureManager Design Tree, lists components and features including "Origin," "Front Plane," "Top Plane," "Right Plane," "Extrude1," "Fillet1," and "Mate1." The top menu bar includes tabs like File, Edit, View, Insert, and Tools, with a status bar at the bottom showing "Edit Assembly" and green X, Y, Z axes indicators. A digital clock in the top right corner displays "12:51 PM +06," indicating the current time on Monday, September 15, 2025.](https://bluebyte.biz/wp-content/uploads/2025/03/image.png)Writing SOLIDWORKS macros and add-ins is a wonderful thing to do in order to save repetitive work. But nothing spoils the experience more quickly than sluggish performance. A performance-intensive macro can negate any productivity gain and drive users bughouse. So, how do we make our SOLIDWORKS API macros and add-ins soar? This is where understanding [useful API calls](https://bluebyte.biz/solidworks/the-solidworks-apis/) to optimize SOLIDWORKS performance becomes essential, helping you write faster and more efficient automation. The answer is in some special API calls and best practices that keep SOLIDWORKS from wasting time doing unnecessary work behind our backs. Let’s dive into the most precious SOLIDWORKS API optimization techniques and take your code flying! ## How to Speed Up and Optimize the SOLIDWORKS API When your attempts at optimizing SOLIDWORKS performance stop in their tracks, it is usually because your code is causing SOLIDWORKS to do things that are not necessarily required in order for the task to be executed. UI updates, feature tree updates, and screen redraws take even the most mundane macro forever to do. The below API calls are your weapon to combat this issue. ### 1. What is `CommandInProgress`? Think of CommandInProgress as telling SOLIDWORKS, “Hey, I’m busy doing something important, so don’t bother with UI updates or other background processes until I’m done.” Setting this property to True is one of the most effective ways to significantly improve macro execution speed, especially when performing complex tasks. Use it: - When executing long-running API tasks. - When making multiple changes to a model in one go. - When performing bulk operations like inserting **components**, suppressing **features**, or modifying multiple sketches. > **Remember to set CommandInProgress to False once your operation is done. If you don’t, part of the SOLIDWORKS UI will be unusable, and you’ll need to manually restart SOLIDWORKS in order to fix it.** ### 2. DoEvents This is an old [VBA and VB.NET](https://bluebyte.biz/solidworks/solidworks-programming-language-a-beginners-guide-to-c-vba-and-vb-net/) call that releases control to the operating system so it can respond to other events while your macro is executing. It’s great for making the UI responsive during lengthy operations so the user has a chance to click a cancel button or observe an [updating progress bar](https://bluebyte.biz/solidworks/reporting-progress-for-long-operations-in-the-solidworks-api/). Use it with caution, though! Multiple calls to DoEvents will really slow down your macro. For optimum performance, in the majority of situations, don’t call [DoEvents](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) at all. #### **Example:** ``` For i = 1 To 10000 ' Perform some operation DoEvents ' Allows UI updates, but slows performance if overused Next i ``` ### 3. AddToDB Manual creation of new sketch entities, SOLIDWORKS will usually try to snap them to nearby geometry or grid points to assist the user. Useful for manual sketching, but wasteful when creating programmatically. AddToDB allows you to avoid this snapping process and add entities directly into the database, which can result in a performance gain. #### **Example:** ``` Dim swSketchManager as SketchManager swSketchManager.AddToDB = True ' Enable AddToDB for performance boost ' Create sketch entities here... swSketchManager.AddToDB = False ' Restore default behavior ``` ### 4. DisplayWhenAdded Similar to AddToDB, this API call is a great way to speed up the generation of sketches. If you call DisplayWhenAdded with False, you prevent SOLIDWORKS from adding new sketch entities to the screen until you’ve specifically requested it to. This is a real time-saver when macros are creating a lot of sketch entities. #### **Example:** ``` Dim swSketchMgr As SketchManager Set swSketchMgr = swModel.SketchManager swSketchMgr.DisplayWhenAdded = False ' Disable real-time drawing ' Create sketch entities... swSketchMgr.DisplayWhenAdded = True ' Restore default behavior ``` ### 5. EnableFeatureTree The FeatureManager Design Tree of SOLIDWORKS is a wonderful piece of work, but constant updating during the middle of a macro is a performance and efficiency killer. You can avoid the tree from being updated until you are done with your activities by using EnableFeatureTree = False. #### **Example:** ``` Dim swFeatureMgr As FeatureManager Set swFeatureMgr = swModel.FeatureManager swFeatureMgr.EnableFeatureTree = False ' Disable feature tree updates ' Perform operations... swFeatureMgr.EnableFeatureTree = True ' Enable updates again ``` ### 6. EnableConfigurationTree If the macro is manipulating configurations, you might be able to gain some speed by disabling the config tree updates using EnableConfigurationTree. #### **Example:** ``` Dim swConfigMgr As ConfigurationManager Set swConfigMgr = swModel.ConfigurationManager swConfigMgr.EnableConfigurationTree = False ' Disable updates ' Modify configurations... swConfigMgr.EnableConfigurationTree = True ' Enable updates again ``` ### 7. EnableGraphicsUpdate This is a mandatory use for any macro that performs geometry-intensive actions. Setting EnableGraphicsUpdate to False stops the SOLIDWORKS graphics window from updating while your code makes its changes, resulting in an incredible performance gain. Make sure to set it back to True afterward, however, so the user can see the results! #### **Example:** ``` Dim swModelView As ModelView Set swModelView = swModel.ActiveView swModelView.EnableGraphicsUpdate = False ' Disable graphics updates ' Perform intensive operations... swModelView.EnableGraphicsUpdate = True ' Restore updates ``` ### 8. UserControlBackground To obtain the optimum speed boost, you can hide the full SOLIDWORKS application window through UserControlBackground. This is useful when you have a stand-alone application that is doing a very complex, non-visual task. #### **Example:** ``` swApp.UserControlBackground = True ' Hide SOLIDWORKS window swApp.Visible = False ' Perform operations... swApp.Visible = True swApp.UserControlBackground = False ' Restore visibility ``` ### 9. Lock/Unlock Model The Lock API call will exclude the user from seeing the UI while your macro is running. This can be useful to get the user out of your hair so that user activity won’t interrupt your code. Be aware, however, that certain API calls, like InsertNote, will not function if the model is locked. #### Example: ``` swModel.Lock ' Lock the model to prevent UI updates' Perform complex operations...swModel.Unlock ' Unlock the model ``` ### 10. Do not use Excel Interop dll If you’re writing a .NET add-in or desktop application and you’re reading from or writing to Excel, it is recommended that you use the services of a library called EPPlus instead of the Excel interop DLL. You will notice a far better performance outcome when you make the switch. By using these API calls wisely, the performance of [SOLIDWORKS macros](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/) and add-ins can be significantly optimized. The conclusions in summary are: - Use CommandInProgress to avoid inefficient UI updates. - Utilize AddToDB, EnableFeatureTree, and EnableGraphicsUpdate for performance benefits. - Turn off UI updates and background operations where feasible (e.g., UserControlBackground, EnableGraphicsUpdate). - Do not overuse DoEvents, as it can be slow. **Categories:** SOLIDWORKS --- ### [SOLIDWORKS PDM API TIP: Writing Add-ins with Version-Specific APIs](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-writing-add-ins-with-version-specific-apis/) **Published:** March 6, 2025 **Author:** Amen Jlili **Content:** When writing an add-in for SOLIDWORKS PDM, it is essential to consider compatibility across different versions of the software. Some API calls introduced in newer versions may not be available in older versions, potentially causing runtime errors for clients using older systems, which is why writing add-ins with version-specific APIs becomes so important. [![Writing Add-ins with Version-Specific APIs](https://bluebyte.biz/wp-content/uploads/2025/01/cover-page.png)](https://bluebyte.biz/wp-content/uploads/2025/01/cover-page.png) ## Scenario Suppose your add-in uses an API feature introduced in SOLIDWORKS PDM 2022, but some clients are still using [SOLIDWORKS PDM 2018](https://help.solidworks.com/2018/english/WhatsNew/c_SOLIDWORKS_PDM.htm?id=cde1eb427da14be6b0b73f40380fa2ce). To ensure compatibility, you can programmatically check the PDM version installed on the client’s machine before calling the new API. ## Solution: Use the GetVersion Method The GetVersion method allows you to retrieve the major and minor version numbers of the installed [SOLIDWORKS PDM](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-ideal-number-of-add-ins-per-solidworks-pdm-vault/) Professional. Based on the version, your code can decide whether to execute the [new API call](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-things-you-can-do/) or fall back to an alternative logic for older versions. ## Implementation Here is an example in Visual Basic: ``` Sub CheckPDMVersionAndCallAPI() Dim vault As IEdmVault5 = New EdmVault5() Dim majorVersion As Integer = 0 Dim minorVersion As Integer = 0 ' Get the installed PDM version vault.GetVersion(majorVersion, minorVersion) If majorVersion >= 2022 Then ' Call the new API method CallNewAPIFeature() Else ' Fallback logic for older versions MsgBox("The new API is not supported on this version of SOLIDWORKS PDM. Please upgrade to 2022 or later.") End If End Sub Sub CallNewAPIFeature() ' Implement the new API feature here MsgBox("Calling the new API feature available in SOLIDWORKS PDM 2022.") End Sub ``` This approach ensures your [add-in remains robust and user-friendly](https://bluebyte.biz/pdm-api-tips/common-must-know-solidworks-epdm-add-ins-errors-for-api-enthusiasts/), even in environments with mixed PDM versions, highlighting the importance of writing add-ins with version-specific APIs. **Categories:** PDM API Tips --- ### [SOLIDWORKS PDM API Tip: Using IEdmDictionary5 for Secure and Flexible Settings Storage in SOLIDWORKS PDM](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-using-iedmdictionary5-for-secure-and-flexible-settings-storage-in-solidworks-pdm/) **Published:** February 13, 2025 **Author:** Amen Jlili **Content:** Using IEdmDictionary5 for Secure and Flexible Settings Storage in SOLIDWORKS PDM gives developers a reliable and safe way to store and retrieve configuration data inside the vault. The IEdmDictionary interface in the SOLIDWORKS PDM API allows you to manage settings that can be specific to an add-in or a user, while keeping everything protected through the vault’s login system. This approach removes the need for external files and ensures your data stays both organized and secure. [![Using IEdmDictionary5 for Secure and Flexible Settings Storage in SOLIDWORKS PDM and A promotional image with a blue background featuring a light bulb and a graduation cap at the top, symbolizing learning. The text "TIPS & TRICKS TO MASTER THE SOLIDWORKS PDM API" is prominently displayed, with "SOLIDWORKS" and "PDM API" in large white letters. A circular arrow icon is centered below the title. On the left, a red megaphone highlights a list of benefits: "50 TIPS & TRICKS," "PDM API CODE EXAMPLES IN C# / VB.NET," "SAVE HOURS OF RESEARCH & DEBUGGING," and "BECOME A BETTER API DEVELOPER.](https://bluebyte.biz/wp-content/uploads/2025/01/cover-page.png)](https://bluebyte.biz/wp-content/uploads/2025/01/cover-page.png) ## Advantages - **Secure Storage**: Data is tied to the PDM vault and secured by the user’s login credentials. - **Add-In-Specific Settings**: Use a unique key to isolate settings for your add-in. - **User-Specific Settings**: Make [settings unique to each user](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-things-you-can-do/) by appending the username to the key. ``` /// Get the vault object and dictionary IEdmVault5 vault = /* Get your vault object */; IEdmDictionary5 dictionary = vault.GetDictionary("MyAddInDictionary", true); // Serialize your settings to a JSON string string jsonSettings = JsonConvert.SerializeObject(new { Theme = "Dark", AutoSaveInterval = 10 }); // Use a key to identify the setting string addInKey = "MyAddIn_Settings"; // Store the serialized JSON string in the dictionary dictionary.StringSetAt(addInKey, jsonSettings); ``` ## Retrieving Settings [To retrieve the stored settings](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/), use the `StringGetAt `method: ``` // Retrieve the JSON string from the dictionary string retrievedJsonSettings; dictionary.StringGetAt(addInKey, out retrievedJsonSettings) // Deserialize the JSON string back into an object var settings = JsonConvert.DeserializeObject(retrievedJsonSettings); ``` ## User-Specific Settings You can create user-specific settings by appending the username to the dictionary key: ``` string userSpecificKey = $"MyAddIn_Settings_{vault.CurrentUser.Name}"; dictionary.StringSetAt(userSpecificKey, jsonSettings); ``` ## Best Practices - **Use Descriptive Keys**: Clearly define your dictionary keys to avoid conflicts. - **Validate Data**: Ensure your JSON strings are valid before storing them. - **Avoid Excessive Use**: Reserve the dictionary store for data that needs to be secure or specific to the PDM environment. - **Secure Storage**: Data is tied to the [PDM vault](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-ideal-number-of-add-ins-per-solidworks-pdm-vault/) and secured by the user’s login credentials. - **Add-In-Specific Settings**: Use a unique key to isolate settings for your add-in. - **User-Specific Settings**: Make settings unique to each user by appending the username to the key. **Categories:** PDM API Tips --- ### [SOLIDWORKS PDM API TIP: Cancel certain events in PDM](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-cancel-certain-events-in-pdm/) **Published:** February 6, 2025 **Author:** Amen Jlili **Content:** By registering to the correct hooks in the GetAddInInfo method and by using poCmd.Cancel = 1 in the OnCmd method, your add-in can cancel certain events in PDM to prevent users from performing operations like deleting a critical file, checking in a document with incomplete metadata, or renaming an inappropriate part. This is the primary tenet for best practice data management and enforcement. ## PDM Event Hooks: Your Control Panel You can also cancel tasks during the EdmCmd\_TaskLaunch hook. The following table provides an overview of the cancellable events that are available in your local [SOLIDWORKS PDM vault](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-ideal-number-of-add-ins-per-solidworks-pdm-vault/). The use of these hooks is crucial to develop an add-in that will validieren mit PDM (validate with PDM) and maintain data integrity.**Command Type****Description**EdmCmd\_PreExploreInitExecuted before a new instance of File Explorer is created. Used to personalize vault view tabs before display.EdmCmd\_PreAddRaised when a file is on the verge of being included in the vault. Utilized to provide naming conventions or verify file types.EdmCmd\_PreAddFolderRaised when a new folder is on the verge of being added. Utilized for pre-creation verification or logic.EdmCmd\_PreCopyRaised before copying a file. Provides an opportunity for custom processing or verification.EdmCmd\_PreCopyFolderRaised prior to copying a folder. Utilized for pre-copy logic.EdmCmd\_PreDeleteRaised before deleting a file. A critical precaution against mistaken or unauthorized deletions.EdmCmd\_PreDeleteFolderTriggers before a folder is deleted. Allows pre-deletion checking.EdmCmd\_PreGetTriggers before getting a file from the vault (e.g., Get Latest/Get Version). Offers control over get.EdmCmd\_PreLabelTriggers before creating a label. Useful in checking the creation of our content in the label.EdmCmd\_PreLabelDeleteTriggers before deleting a label. Allows checks before deletion.EdmCmd\_PreLabelModifyTriggers before changing a label. Allows checking or pre-modification processing.EdmCmd\_PreLabelAddItemOccurs before putting an item in a label. Suits validation or custom processing.EdmCmd\_PreLockOccurs before check-out of a file. Suitable for pre-check-out validation.EdmCmd\_PreMoveOccurs before moving a file. Supports pre-move validation or processing.EdmCmd\_PreMoveFolderOccurs before moving a folder. Supports folder move validation.EdmCmd\_PreRenameOccurs before renaming a file. Suitable for pre-rename checks or custom processing.EdmCmd\_PreRenameFolderOccurs before renaming a folder. Suits pre-rename validation.EdmCmd\_PreShareOccurs before a file is shared between two folders. Implements pre-share logic.EdmCmd\_PreStateTriggered before setting the state of a file in a workflow. A strong hook for implementing challenging business rules.EdmCmd\_PreUndoLockTriggered before undoing a check-out (equivalent to check-in of an unmodified file).EdmCmd\_PreUnlockTriggered before the check-in of an updated file. Employs significant pre-check-in validation.### A Practical Approach to API-Based PDM Customization Here’s how you would do this using the SOLIDWORKS PDM API Tip: - **Subscribe to the Hook**: For Example, in your add-in’s GetAddInInfo method, subscribe to the EdmCmd\_PreUnlock hook. This tells PDM to [call your add-in](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/) before a file check-in. - **Intercept the Command**: When a user attempts to check in a file, your OnCmd method is invoked. - **Check for the Comment**: In OnCmd, you get the properties of the command to determine if a user comment has been input. - **Cancel if Needed**: If no comment is provided, you set poCmd.Cancel = 1. That will [cancel the check-in operation](https://bluebyte.biz/pdm-api-tips/common-must-know-solidworks-epdm-add-ins-errors-for-api-enthusiasts/) immediately. You can then return an empty, short message to the user, like “A check-in comment is needed to finish this action.” As an example, you could use the EdmCmd\_PreState hook to cancel certain events in PDM and prevent a file from moving into a “Released” state if all required data card variables are not filled out. This method of validation with PDM Blue guarantees that all files in your environment are complete and correct, protecting your [data integrity](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) right from the beginning. ## Our Experts Are Here to Help You For expert add-in development and professional [SOLIDWORKS support](https://www.solidworks.com/support/home), visit Blue Byte System Inc. We specialize in offering services to improve productivity and streamline your workflows. **Categories:** PDM API Tips --- ### [Essential Guide for PDM Administrators: Configuring Security Software with SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/) **Published:** January 28, 2025 **Author:** Amen Jlili **Content:** When implementing security software that monitors or controls computer processes, it’s critical for PDM administrators to ensure that all essential SOLIDWORKS® PDM processes are added to the trust list. Configuring security software with SolidWorks PDM properly prevents blocked services and keeps the system stable. Failing to do so could result in interrupted operations, degraded performance, or complete service outages. This guide outlines the key processes and steps to include in your trust list for a secure and smoothly operating SOLIDWORKS PDM environment. [![Configuring Security Software with SOLIDWORKS PDM](https://bluebyte.biz/wp-content/uploads/2024/10/logo.png)](https://bluebyte.biz/wp-content/uploads/2024/10/logo.png) ## Key SOLIDWORKS PDM Processes to Trust ### On You Server The following processes are fundamental for SOLIDWORKS PDM functionality on the server: - **ArchiveServerService.exe**: Manages the Archive Server service. - **ConisioDbServer.exe**: Manages the Database Server service. ### Microsoft SQL Processes SOLIDWORKS PDM relies on [Microsoft® SQL Server](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-notifications-troubleshooting/) for its database management. Add these SQL Server processes to the trust list: - **sqlservr.exe**: SQL Server Database Engine. - **sqlagent.exe**: SQL Server Agent. - **sqlbrowser.exe**: SQL Server Browser service. ### SolidNetwork License (SNL) Server Processes For environments using SNL, ensure these licensing processes are included: - **lmgrd.exe**: SNL server service. - **sw\_d.exe**: SNL vendor daemon service. ### SOLIDWORKS PDM Web2 Server Processes If your organization uses the SOLIDWORKS PDM Web2 server, consult the Microsoft Internet Information Service (IIS) documentation to identify and trust relevant IIS processes. ## On Your Client machines (PDM users) To avoid client-side disruptions, include the following SOLIDWORKS PDM processes from the Task Manager Wait Chain: - **ViewServer.exe** - **EdmServer.exe** - **ConisioAdmin.exe** - **FileViewer.exe** - **Search.exe** - **Report.exe** - **Inbox.exe** - **TaskLaunch.exe** - **TaskExecutor.exe** ## Additional Files to Trust In addition to the primary processes listed above, ensure these files are also trusted: - Executable files from the SOLIDWORKS PDM application folder. - Executable files from the SOLIDWORKS PDM installation files. For example, the **upgrade.exe** component, which is part of the installation process. - The Explorer Preview Tab, which relies on SOLIDWORKS eDrawings® for previewing files. ## Generating a Comprehensive List of Executables If we missed any executable files related to SOLIDWORKS PDM, run the following command in the PDM installation folder: ``` dir *.exe > EPDM_list.txt /b /s ``` This command creates a file named `EPDM_list.txt`, listing all executables in the SOLIDWORKS PDM folder and its subfolders. The contents of this list may vary based on the installed add-ins and applications, such as [SOLIDWORKS add-ins](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/) or the File Upgrade Utility. ## Important Notes - Verify system requirements for your version of [SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/): [System Requirements](https://www.solidworks.com/support/system-requirements). - When configuring security software with SolidWorks PDM, regularly update your trust list as new features or updates may introduce additional executables. - Collaborate with your IT security team to ensure that the trust list is consistently applied across your organization’s systems. By following this guide, PDM administrators can effectively configure their security software to maintain a secure and reliable environment for all SOLIDWORKS PDM users. **Categories:** SOLIDWORKSPDM --- ### [SolidWorks Programming Language: A Beginner's Guide to C#, VBA & VB.NET](https://bluebyte.biz/solidworks/solidworks-programming-language-a-beginners-guide-to-c-vba-and-vb-net/) **Published:** October 21, 2024 **Author:** Amen Jlili **Excerpt:** SOLIDWORKS API programming languages comparison - VBA, VB.NET and C# **Content:** The SOLIDWORKS API (Application Programming Interface) is a robust software tool that enables you to automate tasks, customize your environment, and build tools to make your work easier. No matter what you do, a designer who wishes to automate repetitive tasks or an engineer who needs to build complex add-ins, learning the SolidWorks programming language is the answer. However, because they’re all out there, from VBA to C#, it’s hard to know which one you’re supposed to use. Don’t worry, we’re here to assist. Here in this tutorial, we are going to go through all the different programming languages supported by the SOLIDWORKS API, like C # vs VBA. We are going to cover the pros and cons of each so you have the information to make a well-informed decision on your learning path. We will start with the most appropriate language to start and then move on to see how we can move forward with more powerful languages as your skill set increases. You will have a road map at the end and will be well prepared to use the full power of SOLIDWORKS. ## I’m A Beginner. Which Language Should I Start With? For a beginner to learn the SolidWorks API, the best practice is to start from [VBA (Visual Basic for Applications)](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/). Since it comes pre-installed with SOLIDWORKS, you can just open the IDE (Integrated Development Environment) by navigating to **Tools > Macro > New**… In fact, you can record macros, as code is generated automatically following your action. This makes it an easy learning curve, and you are automating repetitive tasks in no time. ## What Are the Limitations of VBA? Although VBA is the best option for beginners, it [has limitations](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) when you want to handle more complex logic- - With VBA, your program will be harder to update because it does not allow you to carry out maintenance and modification of different parts of your code. - With newer languages, it is far easier to deal with lists of data than it is with VBA. - Accessing databases is not as easy as it is with other languages. For example, see how different the code is for retrieving a filename without an extension: **VBA:** ``` Dim fileName As String fileName = "C:\path\to\your\file.sldprt" Dim fileNameWithoutExtension As String fileNameWithoutExtension = Left(Dir(fileName), Len(Dir(fileName)) - Len(Right(Dir(fileName), Len(Dir(fileName)) - InStrRev(Dir(fileName), ".")))) ``` **C#:** ``` string filePath = @"C:\path\to\your\file.sldprt"; string fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(filePath); ``` As you can see… putting C# vs VBA side by side the Path.GetFileNameWithoutExtension method is far more readable and effective. ## What Are the Next Steps After VBA? After getting a grasp of the fundamentals of [SolidWorks macro](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/) language, most developers then look at what language SolidWorks is written in and end up migrating to more robust languages like C# or VB.NET. This way, you can leverage the advanced capabilities like object-oriented development, data manipulation with LINQ, and seamless integration with databases and web services. Therefore, you’ll be able to create more complex and simplified applications with more complex logic and better management afterwards. Moreover, C# and VB.NET provide more flexibility for your future applications, so they are good skills to learn in the programming field. In case you’re reading through the [SOLIDWORKS API documentation](https://bluebyte.biz/solidworks/the-solidworks-apis/), you’ll see plenty of examples in these languages. ## VB.NET vs. C#: Who Is the Winner? [VB.NET vs C#](https://www.geeksforgeeks.org/c-sharp/difference-between-vb-net-and-c-sharp/) for the [SOLIDWORKS API](https://bluebyte.biz/solidworks/optimizing-solidworks-api-performance-best-practices-and-key-api-calls/) is a bit like comparing two hammers for driving the same nail. To many, VB.NET is more accessible to newcomers to the solidworks macro language since it has a much easier syntax. However, C# is the way to go in a production environment since it offers [performance better, stability](https://bluebyte.biz/solidworks/most-useful-api-calls-to-optimize-solidworks-performance/), and a huge community base. When it comes to vba and C# vs VB.NET, it generally depends on what you’re trying to do. If you’re a beginner, VB.NET might be more straightforward to start with, but as you go along, it’s a good practice to switch to C#. Take a look at this comparison table between C#, VBA, and VB.NET that highlights the advantages of VB.NET: ![](https://bluebyte.biz/wp-content/uploads/2024/10/image-1-1024x267.png)Which language do you utilize for your SOLIDWORKS projects? Share with us in the comments! **Categories:** SOLIDWORKS --- ### [How To Edit PDM Datacard Using VBA Macro](https://bluebyte.biz/solidworks/solidworkspdm/edit-pdm-datacard-using-vba/) **Published:** September 5, 2024 **Author:** Amen Jlili **Content:** Working within a SOLIDWORKS PDM workgroup, updating information on a PDM datacard for multiple files manually can quickly become tedious and prone to mistakes. Whether you’re a new designer, a project manager revising data, or an administrator entering details, doing this task by hand often slows down workflows and introduces inconsistencies. The good news is you can automate this entire process with a simple VBA macro. In this guide, you’ll learn how to use a VBA macro to interact with and update a PDM datacard, helping streamline your work and reduce repetitive data entry in SOLIDWORKS and SOLIDWORKS PDM. For this tutorial, we’ll use SOLIDWORKS 2023 and SOLIDWORKS PDM Professional 2023. You’ll see how to build a macro that can read and update datacard variables inside a PDM vault. ## Step 1: Creating a New Macro Start by opening SOLIDWORKS and following these steps alongside me– 1. Navigate to **Tools > Macro > New.** 2. Name the new macro “**DataCard”**. 3. This will open a [Visual Basic for Applications (VBA) editor](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/). There, you can start writing your code. This guide is an extended version of work previously done for automating PDM with VBA. If needed, you can always catch up on our previous tutorial guides about checking files into another vault at our [***Blue Byte YouTube channel***](https://www.youtube.com/watch?v=xWJWwVt5-_c). ## Step 2: Setting References and Connecting to the Vault Before you can start editing the [PDM files](https://bluebyte.biz/transition-pdm-file-as-administrator/), we need to make sure that the references are correctly connected to the PDM vault. Let’s do that– 1. In the VBA editor, navigate to **Tools > References.** 2. Look for **PDMWorks Enterprise** in the list of references (this is the PDM library) and select it. 3. Then simply click “**OK**” to save the reference. Now, let’s define the essential variables: ``` Dim edmVault As IEdmVault5Dim filePath As StringDim swFile As IEdmFile5Dim swFolder As IEdmFolder5Dim variableName As StringDim varEnum As IEdmEnumeratorVariable5 ``` ## Step 3: Connecting to the Vault We’ll now establish a [connection to the PDM vault](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) and log in automatically. This is a critical step that authenticates your macro and authorizes it to retrieve your files and data cards in your vault. The code logs in automatically using your current Windows credentials, so it’s simple to accomplish and allows your automation to run smoothly. ``` Set edmVault = New EdmVault5edmVault.LoginAuto "YourVaultName", 0 ' Replace "YourVaultName" with your actual vault name ``` ## Step 4: Getting the File and Folder Once you are logged in to the vault, you need to identify and retrieve the file that you want to modify. The best practice to do so is to use the complete file path. Simply right-click on the file in your File Explorer and select “Copy as Path”. Note: This is just one of the methods you’d want to follow for SolidWorks PDM data card examples. Other methods typically include searching for files that exist within the API. However, I’d say the file path method I’m using is the simplest. ``` vbaCopy code``` filePath = "C:\PDM_Vault\YourFile.SLDPRT" ' Replace with your actual file path Set swFile = edmVault.GetFileFromPath(filePath, swFolder) ``` ``` ## Step 5: Checking Out the File Before making any sort of changes to a SolidWorks PDM data card, you must check out the file. This is part of PDM’s version control process. The check-out process places the file in your exclusive control, so others can’t change it at the same time, and thus prevent data corruption. You’ll receive an error if you attempt to edit a variable on an unchecked-out file. ``` If Not swFile.IsLocked Then swFile.LockFile swFolder.ID, 0End If ``` ## Step 6: Accessing Datacard Variables Now that the checking is done, we can go ahead and access, view, and modify the datacard variables. We’ll use the enumerator to modify the variables. It’s an easy way of updating these variable fields. The following example sets the “Description” field on the data card of the selected file to “New Description”. You can do the same to make changes for any other data card variables, such as part number, revision, or material. ``` Set varEnum = swFile.GetEnumeratorVariablevariableName = "Description" ' Example variablevarEnum.SetVar variableName, "@", "New Description" ``` This example sets the “Description” field on the data card of the selected file to “New Description”. ## Step 7: Testing and Finalizing If you run the macro now, you should be able to see that the data card now shows the new value. By now… you’ve successfully integrated this powerful automation technique that’ll now significantly improve your process by removing manual data input and ensuring data consistency for all your documents. ## Summary Following along with me, now you know- - How to set up a VBA macro in SOLIDWORKS. - How to connect to a SOLIDWORKS PDM vault using the API. - How to check out files and modify data card variables. Was the guide helpful so far? If so, don’t forget to check out our YouTube channel and subscribe to make sure you don’t miss out on any future updates. Follow us on LinkedIn for more tips and tricks on automating SOLIDWORKS and PDM processes. **Categories:** SOLIDWORKSPDM --- ### [Export SLDPRT and SLDASM to HTML with PDMPublisher](https://bluebyte.biz/solidworks/solidworks2022/export-sldprt-and-sldasm-to-html-with-pdmpublisher-convert-task-extended/) **Published:** October 18, 2022 **Author:** Amen Jlili **Content:** Ever found yourself in a bind needing to send a SOLIDWORKS file to someone without the program? No fun at all, is it? You’ve just spent some time getting a design ready, but getting that massive .SLDPRT or .SLDASM file to a customer, salesperson, or your marketing team just won’t fly. **PDMPublisher comes with support for exporting SOLIDWORKS parts and assemblies to HTML:** Luckily, you’re no longer stuck. [PDMPublisher is an industrial-strength utility](https://bluebyte.biz/solidworks/pdmpublisher-for-solidworks-automate-your-drawing-exports-like-never-before/) specifically created to deal with this problem. It makes the entire process of converting your SOLIDWORKS parts and assemblies into interactive HTML easy. Essentially, it’s your own SLDASM converter and SLDPRT converter built right inside SOLIDWORKS PDM. It does the conversion for you, meaning anyone with a standard web browser can open and view your designs—no plug-ins or cost-is-too-much software required. It’s the perfect way of bridging the gap between engineers and the rest of the business, providing instant, easy access to your product data for all. ## How to Convert Your SOLIDWORKS Files to HTML With PDMPublisher? It’s refreshingly simple to convert your SOLIDWORKS files to HTML. The process is entirely constructed with the capability to become a part of your daily workflow. Here’s a quick summary on how: - Choose Your Files: Right in your SOLIDWORKS PDM, you simply select the .SLDPRT or .SLDASM files to convert. - Start the Conversion: With a click inside the PDMPublisher software, you’re off. The software extracts all the [information you require from your PDM](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) to build a perfect, interactive 3D model. - Instant Creation: PDMPublisher does the work, processing your files automatically and building a compact HTML file with all the information from the 3D model at your fingertips. - Share Away: Your finished HTML file can be shared with a single simple link, hosted on the web server, or embedded on your site, and your viewers can view the model directly in their browser. ## The Old Way vs. The PDMPublisher Way Before PDMPublisher, publishing your .SLDPRT and .SLDASM files on a web page was a headache. It involved wrestling with long winded export procedures and wading through an entire gamut of potential issues just to get your design on the web. PDMPublisher does everything in reverse. ### Manual Exports: The Old Way - **Slow Process**: Preparing a SOLIDWORKS part or assembly for web viewing and exporting is a gradual, step-by-step process. It is commonly achieved through the use of over one computer program. - **Compatibility Headaches:** You might spend hours of debugging to make your exported files viewable on different web browsers, resulting in frustration and lateness. - **Plugins and Code**: To have an interactive 3D model on a website, you typically require specialist plugins or some knowledge of coding, which not all engineers have. - **Updating is a Nightmare**: If you modify your design in your .SLDPRT or, .SLDASM file, you will have to redo the entire convoluted export process and manually update the web content as well. ### Automated Exports: The PDMPublisher Way - **One-Click Ease**: PDMPublisher does all the work for you, converting your .SLDPRT and .SLDASM files to web-friendly HTML with a single click. - **Fully Compatible**: It removes the guesswork of web compatibility, so your designs will look as they should on any up-to-date web browser without taking any additional effort on your part. - **Integrated Process**: It integrates natively within your SOLIDWORKS PDM, so the whole export process will feel like second nature. - **Seamless Updates**: Because PDMPublisher is integrated with your PDM, updating your web-based models is as simple as re-running the tool against the latest revision of your file. ## Bottom Line When you need Export SLDPRT and SLDASM to HTML with PDMPublisher, you’re not just choosing a powerful SLDASM converter and reliable SLDPRT converter. You’re choosing a complete solution that streamlines your whole process, making sharing your designs and getting them out to so many more people insanely easy. Unlike an open source PDM SolidWorks solution, PDMPublisher is a complete, integrated, and trustworthy workflow that leaves you with the confidence to know that your information is secure and your process is seamless. The definitive solution for sharing your designs with the masses. **Categories:** SOLIDWORKS, SOLIDWORKS2022, SOLIDWORKSPDM --- ### [PDM2Excel V7: New support for structural members in Bill Of Materials exports](https://bluebyte.biz/pdm2excel/pdm2excel-v7-new-support-for-structural-members-in-bill-of-materials-exports/) **Published:** August 22, 2022 **Author:** Amen Jlili **Content:** With PDM2Excel V7, the new support for structural members in bill of materials exports finally closes a long standing gap for weldment heavy teams. If you rely on cut lists or structural profiles in your daily workflow, this update makes your BOM export far more complete, accurate, and ready for downstream use. In version 7 of PDM2Excel, we have added support for the following features: - Ability to process PDM [Bill of Materials](https://bluebyte.biz/solidworks/solidworkspdm/how-to-configure-the-solidworks-pdm-bill-of-materials-for-pdm2excel/) that contains structural members. - Structural members’ [thumbnails](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/) will be a generic weldment icon. - Fixed a few small bugs. ![PDM2Excel](https://bluebyte.biz/wp-content/uploads/2022/03/pdm2excel.png)## PDM2Excel [PDM2Excel](https://docs.bluebyte.biz/src/pdm2excel.html) is a powerful tool that exports data from SOLIDWORKS PDM (Product Data Management) systems into Excel spreadsheets. [It is super easy to install](https://docs.bluebyte.biz/src/installingpdmaddins.html). It also streamlines the data extraction process, allowing users to easily manage, analyze, and share PDM data in a familiar and flexible Excel format. US$999.00 for 1 year [Shop now](https://bluebyte.biz/product/pdm2excel/) **Categories:** PDM2Excel --- ### [Export SOLIDWORKS PDM BOMs to XLSX with thumbnails - PDM2Excel](https://bluebyte.biz/solidworks/solidworkspdm/export-solidworks-pdm-boms-to-xlsx-with-thumbnails-pdm2excel/) **Published:** April 16, 2022 **Author:** Amen Jlili **Content:** Fed up with having to manually create bills of materials (BOMs) from your SOLIDWORKS PDM vault? You’re not the only one. Manually exporting BOM data into Excel is tedious and prone to errors, especially if you want to include visual context like thumbnails. This is where PDM2Excel helps. Our heavy-duty utility will export your SOLIDWORKS PDM BOMs to XLSX with quick and easy effort. Please keep reading this article to know how to export SolidWorks PDM BOMs to XLSX with thumbnails. ![Export SolidWorks PDM BOMs to XLSX with thumbnails and A screenshot of a software interface titled "Export BOM with Thumbnails [Task] - Properties." The left side shows a menu with options like Add-in, Execution Method, Scheduling, Settings, BOM, Thumbnails (highlighted), Permissions, Success Notification, and Error Notification. The right side displays a settings panel under "Document Manager" with fields for "Document Manager API Key" (with a note to request it from your SolidWorks Reseller), "Enable thumbnails" set to "True," and "Thumbnails folder" (empty). Buttons at the bottom include "Back," "Next," "OK" (highlighted), "Cancel," and "Help," with "Export..." and "Import..." options above them](https://bluebyte.biz/wp-content/uploads/2022/04/image.png) ## The Automation Power of PDM PDM automation isn’t merely about time savings; it’s also about improving accuracy and process simplification. Here’s the picture: your BOMs populated automatically with the right information, such as configuration, quantity, state, and even high-definition thumbnails. It’s an engineer’s, procurement individual’s, and anyone who ever must review and OK a BOM in a hurry’s utopia. With our [latest version of PDM2Excel 6](https://bluebyte.biz/solidworks/solidworkspdm/add-ins/whats-new-in-pdm2excel-2025/), we incorporated an extremely useful feature that exports your PDM BOM with thumbnails to an XLSX file directly. Bye-bye to the pain of screenshotting or copy-and-pasting. ## How to Export Your PDM BOMs with Thumbnails? [To export your PDM BOMs with thumbnails](https://bluebyte.biz/macros/solidworks-export-bom-to-excel/)… it can be done directly from the PDM2Excel task setup page, where you have full control of the output. The following are the key settings that have been explained: ![A screenshot of an Excel spreadsheet titled "Engineering Release," created by Amen Jili, displaying a Bill of Materials (BOM) with thumbnails. The spreadsheet has columns labeled Thumbnail, Qty, Config, Number, State, Descriptio, Revision, Reference, Count, and BOM Quantity. Rows 2 to 9 list items with thumbnails of 3D models on the left, including: 1 unit of 108185 (Engineeribase_she1a), 1 unit of 108182 (Engineerienter_sha), 1 unit of 108157 (EngineerValve_Mix_a), 2 units of 108180 (EngineerControl_Sfa), 6 units of 108174 (EngineerLofted_Co1a), 1 unit of 108179 (Engineercontrol_p1a), 1 unit of 108165 (Engineeriregulator_a), and 1 unit of 108159 (Engineeritank_20lb_a). The Config column contains the "@" symbol, and green checkmarks indicate completed fields. The interface includes standard Excel menus and tools at the top, with an "Accessibility: Investigate" option active.](https://bluebyte.biz/wp-content/uploads/2022/04/image-1.png) - Enable Thumbnails: Switch (true/false) on or off to indicate if and whether the task can save thumbnails. - Document Manager API Key: This is a key security setting. You will require a specific [Document Manager API key](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) in order to generate the thumbnails. It is available from your SOLIDWORKS reseller or directly from us. - Thumbnails Folder: You can choose where you’d like to have the thumbnail images (.png files) saved. It can be a relative path to the vault root, an absolute path, or a path in or out of the vault. This feature is particularly useful to teams that wish to have a centralized repository of their thumbnails. ## What’s with This “Save Thumbnail in Excel?” You might be asking yourself, “What is save thumbnail in Excel, and why do I even need it?”. Well… to answer, it’s the process of placing a small graphical preview of a file in your spreadsheet. For a BOM, that equates to having a picture of each part next to its data. That provides you with precious context. Besides, with these thumbnails, identifying parts and detecting possible errors becomes much easier on the eye. ## An Overview of Open Source PDM Solutions Even though open source PDM SOLIDWORKS solutions are available, they usually require a lot of development and upkeep. On the other hand, PDM2Excel is a solidly developed purpose solution that integrates well into your own SOLIDWORKS PDM infrastructure, with less time and resources remaining for you. [Automatically exporting your SOLIDWORKS PDM BOMs to XLSX with thumbnails](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/) is the smart move to boost your productivity by a notch and improve data quality. PDM2Excel provides you with the unique, high-powered PDM automation tool necessary to do just that and provide you with clean, readable BOMs every time. Interested in finding out more? Get in touch with us today to organize your API key and see how PDM2Excel can revolutionize your BOM generation process and productivity. **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [Top 5 reasons to start using PDM2Excel to start exporting PDM BOMs to Excel](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/) **Published:** March 27, 2022 **Author:** Amen Jlili **Content:** Are you using SOLIDWORKS PDM Professional to manage your product’s CAD data, but still missing an essential part of your release process? While your vault tracks changes and updates the Bill of Materials (BOM) for every part, automating the export of that BOM to an Excel (.xlsx) file might still be a challenge. And of you are finally ready to start exporting PDM BOMs to Excel in a reliable, automated way, this approach can streamline the task and make it heppen automatically, without any extra steps. [![Start exporting PDM BOMs to Excel](https://bluebyte.biz/wp-content/uploads/2022/03/ExportPrevie-1024x540.png)](https://bluebyte.biz/wp-content/uploads/2022/03/ExportPrevie.png) ## Automating SOLIDWORKS BOM to Excel Export with PDM Imagine being able to automatically export a customized Bill of Materials for a top-level assembly directly to a network drive—ready for your purchasing department or anyone else who needs it—right when you release that assembly. No manual exports, no extra clicks, just a seamless process from design to procurement. With the right tool, like **PDM2Excel**, you can automate the [export of BOM data in a clean, professional Excel format](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/) that fits your workflow. ### Key Features - **Custom BOM Exports**: Easily [configure which BOM columns are included in the export](https://bluebyte.biz/solidworks/solidworkspdm/how-to-configure-the-solidworks-pdm-bill-of-materials-for-pdm2excel/). Whether you want to show only part numbers and quantities, or more detailed information like file names, you can tailor the export specifically to your needs. - **File Naming Automation**: Ensure every exported Excel file has the right details in its filename. Include the configuration name, revision, date, and even custom variables like project numbers to keep everything organized. - **Target-Specific Configurations**: If you’re managing complex assemblies, PDM2Excel allows you to export BOMs for specific configurations—like the default configuration—without hassle. ## Why Excel Exports Matter for Your SOLIDWORKS PDM Workflow Automatically exporting the BOM to an Excel format helps streamline communication between departments. For example, your purchasing team will always have access to the latest parts-only BOM, ensuring smooth procurement processes without the risk of outdated information. Additionally, automating this task means fewer manual steps in your release process, reducing errors and speeding up workflow. This level of automation is essential for teams that manage large product data sets and want to stay agile in their operations. ## Optimize Your Workflow with Thumbnails Another feature to consider in your workflow optimization is the use of **thumbnails** within your exported BOM. Including part [thumbnails in your BOM files](https://bluebyte.biz/solidworks/solidworkspdm/export-solidworks-pdm-boms-to-xlsx-with-thumbnails-pdm2excel/) can help visualize components, improving clarity for teams unfamiliar with the design. This is especially beneficial for non-engineering departments, like procurement, that may need a quick reference for visual identification of parts. ## Supercharge Your SOLIDWORKS PDM Experience Whether you’re looking to automate the export of SOLIDWORKS BOMs, customize your Excel files, or integrate thumbnails for better clarity, **PDM2Excel** is the solution that makes it all happen. With PDM2Excel, you can: - [Automatically generate Excel BOM files](https://bluebyte.biz/solidworks/solidworkspdm/add-ins/whats-new-in-pdm2excel-2025/) - Target specific configurations - Include key details in the filename - Optimize communication between engineering and purchasing teams [**Take control of your SOLIDWORKS PDM process, reduce manual tasks, and ensure your Bill of Materials is always accurate, complete, and accessible. Optimize your workflow today with PDM2Excel**](/product/pdm2excel). **Categories:** BOM --- ### [Crack The CSWP-API Exam & Earn SolidWorks API Certification Like A Boss!](https://bluebyte.biz/solidworks/crack-the-cswp-api-exam-and-earn-solidworks-api-certification-like-a-boss/) **Published:** February 21, 2022 **Author:** Amen Jlili **Excerpt:** Resources on how to prepare for the CSWP-API Exam like a BOSS **Content:** The SolidWorks API Certification, also known as Certified SOLIDWORKS Professional – API (CSWP-API), is the newest addition to the SOLIDWORKS family of professional certifications. This exam is designed to test your knowledge of the SOLIDWORKS API using VBA. About VBA? It’s a powerful tool that allows you to use [automation and customization](https://bluebyte.biz/solidworks/the-solidworks-apis/) within the SOLIDWORKS environment. Some of you are totally new to programming and have probably been working with the [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) recorder only so far. If so, you must invest time in getting a better understanding of the basics of SOLIDWORKS API. This foundational knowledge is crucial for both your CSWP-API exam and becoming an expert in [automating tasks within SOLIDWORKS](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) with utmost proficiency. To help you kickstart your learning journey, here are some valuable resources. Follow along, and they will get you started in no time with good effort. ## Your Success Roadmap: Key Resources Learning the SOLIDWORKS API is a mix of [structured learning](https://bluebyte.biz/solidworks/solidworks-programming-language-a-beginners-guide-to-c-vba-and-vb-net/), direct experience, and networking. You cannot pass the CSWP exam with a tutorial alone; you require a well-thought-out plan. What follows are the top resources to direct you on your learning journey. ## For Structured Learning: Websites That Guide You Through - **CADoverflow.com:** It’s a web-based dedicated platform for SOLIDWORKS API questions and answers. In this community, developers and users ask and answer questions alike. Here, you can learn from others and even contribute your own experience. An excellent complement to your formal CSWP training, don’t you think? - **SolidProfessor:** This one is a great resource if you prefer a structured learning style. They don’t offer just one, but two, highly effective courses. You’ll find their learning material to be quite condensed and easy to read. - **My SOLIDWORKS Training:** SOLIDWORKS put out its own official online API training materials in 2019. These are a must for any serious SolidWorks API Certification exam candidate. Provided by subscription, these provide an authoritative, in-depth review of the API from the folks who create the software. This is as close to an official SolidWorks CSWP preparation course from the horse’s mouth as you are likely to find. ## For Real-Time Support and Networking: Forums That Get You Connected - **3DSwym SOLIDWORKS User Forum:** Also known as the API/Macros forum, this is your treasure trove of information. It’s where you’ll get to connect with a community full of experienced SOLIDWORKS users and developers. Whenever you’re stuck, here you can ask away any questions you may have and learn from the field veterans. I must say, this is one highly valuable aspect of any serious [SolidWorks API training](https://bluebyte.biz/become-a-solidworks-api-developer/). ## For Deeper Insight: Books and Blogs Prepared by The Pros ### Blogs - **Codestack:** Artem Taturevych’s blog is a must-read for any of you who are looking to better comprehend the SOLIDWORKS API. Thanks to the insightful style of his article, his blogs are well-regarded among developers. - **CADBooster:** Peter Brinkhuis occasionally writes articles about APIs. And you’d find them to be quite content-rich and full of helpful tips to take advantage of. His experience can teach you to think differently about API programming and approach difficult tasks with confidence. ### Books - **Mike Spens’s Book:** Nothing beats a good book to solidify your foundation. This book is a good starting point if you want to start strong with the SOLIDWORKS API. - **Luke Malpass’s Book:** Yet another good read if you want to get on a more in-depth learning route. The book will impart to you comprehensive knowledge about this SOLIDWORKS API. ## **Why This Certification Matters?** The benefits go beyond the exam and encompass leveraging the full potential of SOLIDWORKS itself. By making full use of the resources provided in this guide, you won’t just pass the exam. You’ll also gain the skills needed to [automate tedious repetitive tasks](https://bluebyte.biz/solidworks/most-useful-api-calls-to-optimize-solidworks-performance/) and create custom tools designed to meet your needs. It’ll boost your productivity exponentially, making you more effective in your design process. A designer, engineer, or automation enthusiast, regardless of role, mastering this API skill is a must. So keep learning and become a better and more versatile SOLIDWORKS user like a boss. **Categories:** Certification, SOLIDWORKS --- ### [New for 2022! SOLIDWORKS PDM API Things You Can Do...They're pretty cool.](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-things-you-can-do/) **Published:** January 23, 2022 **Author:** Amen Jlili **Content:** The 2022 release of the SOLIDWORKS PDM profession API did not introduce major changes to the API itself, aside from updates to the PDM web API docs. Even so, these improvements add more flexibility and expand the list of SOLIDWORKS PDM API things you can do, making everyday data management tasks more efficient. ## 1. You can rename BOM Views You can rename BOM views with PDM Professional 22 SP0.0. The new method is called Rename and is part of the [IEdmBomView4 interface](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/). The API help has a [straightforward example](https://help.solidworks.com/2022/english/api/epdmapi/EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmBomView4~Rename.html) on how to use it. ## 2. You can destroy deleted items from a folder You can now [destroy files](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-cancel-certain-events-in-pdm/) that you have deleted in a folder. Previously, this was not possible with the [IEdmFolder12 interface](https://bluebyte.biz/solidworks/solidworkspdm/how-to-configure-the-solidworks-pdm-bill-of-materials-for-pdm2excel/). The interface has been extended by the [IEdmFolder13](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-writing-add-ins-with-version-specific-apis/). You can access the docs example [here](https://help.solidworks.com/2022/english/api/epdmapi/Destroy_Deleted_Files_in_Vault_Example_CSharp.htm). ![SOLIDWORKS PDM API Things You Can Do](https://bluebyte.biz/wp-content/uploads/2022/01/image-9.png)Deleted Items in a folder in PDM ## 3. Serial number counter This is probably the most consequential update. You can now specify the next available counter for a particular serial number [using this method.](https://help.solidworks.com/2022/english/api/epdmapi/EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmSerNoGen8.html) This is particularly useful if you were used to storing your counter in a SQL database. Now, you have control over the [next available value](https://bluebyte.biz/solidworks/solidworkspdm/building-a-connector-between-solidworks-pdm-and-plm-systems/). ## 4. Access to more user settings You can specify some killer user settings from a new interface . The settings are: EdmUSv\_AutoDelete9 = Whether to automatically delete local read-only files that are not part of the vault; 1 = true, 0 = false; this setting corresponds to the “Automatically delete local read-only files that are not part of the file vault” checkbox on the Explorer tab on the Settings dialog that appears when you click “Settings” on the Properties dialog of a user in the Admin Tool**EdmUSv\_AutoGetLatest**11 = Whether to always work with the latest version of files; 1 = true, 0 = false; this setting corresponds to the “Always work with the latest version of files” checkbox on the Reference Dialog tab on the Settings dialog that appears when you click “Settings” on the Properties dialog of a user in the Admin Tool**EdmUSv\_AutoGetLatestRefs**43 = Whether to auto-select reference files to get latest when checking out; 1 = true, 0 = false; this setting corresponds to the “Auto select reference files to get latest when checking out” checkbox on the Reference Dialog tab on the Settings dialog that appears when you click “Settings” on the Properties dialog of a user in the Admin Tool **Categories:** PDM API Tips, SOLIDWORKSPDM, SOLIDWORKSPDM2022 --- ### [A Quickstart Guide with the SOLIDWORKS PDM Web API](https://bluebyte.biz/pdm-api-tips/a-quickstart-guide-with-the-solidworks-pdm-web-api/) **Published:** January 20, 2022 **Author:** Amen Jlili **Content:** **Disclaimer:** - This post is not about the PDM Web2 viewer. - This feature is not available with SOLIDWORKS PDM Standard. In 2022, [SOLIDWORKS Corp](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-things-you-can-do/). quietly released documentation for its SOLIDWORKS PDM web API. This feature of PDM Professional installs an IIS web application (Web API) that exposes certain elements of your vault to the web. Any web application can now [access your PDM vault](https://bluebyte.biz/solidworks/solidworkspdm/building-a-connector-between-solidworks-pdm-and-plm-systems/), provided IIS and your firewall are configured correctly. As usual, this feature is only available with PDM Professional. At first glance, the documentation is quite dry, if not unreadable. After a couple of back-and-forths with API support, SOLIDWORKS confirmed that the docs were auto-generated and that they plan to create proper documentation in the future. The API support team was able to walk through some of the most common endpoints and showcase how to make the proper calls. In this article, I’d like to go over the authentication endpoint and the file information endpoint. Before we do that, you need to install the Web API component. For further SOLIDWORKS PDM API help, you can always contact our team. ![SOLIDWORKS PDM Web API](https://bluebyte.biz/wp-content/uploads/2022/01/271903058_622317168882128_1902176435173864589_n.png)Once you have the web API installed, you need to make sure to: - Add a firewall rule to allow communication via the 65453 port. - Edit the basic settings of the web application in IIS and enable the authorization for the Windows user profile that is running the application: ![Add a Firewall Rule to Allow Communication Via the 65453 Port](https://bluebyte.biz/wp-content/uploads/2022/01/image-6.png) Once done, you can use Postman to hit the authentication endpoint like this: - The request is of type POST - **Url:** - **Headers:** Add a Content-Type with a parameter of application/json - **Finally,** a raw body with the following value: ``` {"Password":"this is my super hard admin password","Username":"admin"} ``` ![You Can use Postman to Hit the Authentication Endpoint Like This](https://bluebyte.biz/wp-content/uploads/2022/01/image-1024x590.png) Your response should look like this: ![The Response of API Automation](https://bluebyte.biz/wp-content/uploads/2022/01/image-5-1024x609.png) You will need to use the **JwtString** (Access token) in subsequent calls. In Postman, just make sure you add the **JwtString** as a bearer token. This can be done from the Authorization tab. ![You will Need to USe the JwtString](https://bluebyte.biz/wp-content/uploads/2022/01/image-8.png) Unfortunately, there is no way to determine when the access token expires. It seems that in this version of the SolidWorks PDM Web API, you need to continue using the token until you receive an unauthorized exception. API support has indicated that they are aware of this and will likely include this as an improvement in the future. ## What’s Next? - If you are interested in connecting [SolidWorks PDM API ](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-using-iedmdictionary5-for-secure-and-flexible-settings-storage-in-solidworks-pdm/)with your web application, please reach out to us. We’d love to help you understand the PDM Web API JSON object model and provide a [comprehensive SolidWorks PDM implementation guide](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/). - Our PDM Web API client can save a lot of time, allowing you to focus on what’s more important. Contact us for sales information. **Categories:** PDM API Tips, SOLIDWORKSPDM, SOLIDWORKSPDM2022 --- ### [SOLIDWORKS PDM Professional: You have chosen to load a .Net Add-in? Well, what do you do next ?](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/) **Published:** August 2, 2021 **Author:** Amen Jlili **Content:** SOLIDWORKS PDM Professional employs a server-client architecture. Your files and metadata is stored on the server (Archive server is where your files and stored and everything else go in the SQL db). You push all of your changes to the server from your local PDM client and you also pull any updates from the server. This applies to PDM add-ins. When you update an existing version with a new version, that version is not automatically updated on each connected client machine. All users who want to use the latest version have to log out of PDM and log back in. PDM will actually warn you of this effect when you update an add-in from the administration tool. ![](https://bluebyte.biz/wp-content/uploads/2021/07/image.png)You have chosen to load a .Net add-in. SOLIDWORKS PDM cannot force a reload of .Net add-ins. This means that if the add-in is an updated version of an already installed addin, all clients machines will have to be restarted to ensure that the [new version of the add-in](https://bluebyte.biz/pdm-api-tips/common-must-know-solidworks-epdm-add-ins-errors-for-api-enthusiasts/) is used. To ensure a proper restart of your PDM session, you can use this nice little script that will kill both [Explorer.exe and EdmServer.exe](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-2024-2025-datacard-preview-not-working-quick-guide-to-reset-edrawings/) and restart them again. > taskkill /f /im edmserver.exe > taskkill /f /im explorer.exe > start explorer.exe > start “Path\_To\_Vault” You can save these lines as a bas script by opening Notepad.exe, copy pasting the code above (make sure to replace the last line with the vault) and then saving it as a bas file. ![](https://bluebyte.biz/wp-content/uploads/2021/07/image-1-1024x537.png) The bas file works very well for a single user environment. If your add-in has a large audience, a good idea for a PDM admin is to do the following: - Change the path of the vault to “.” without the double quotes. - Save the script above as a bas file in the vault. - Make sure the file is accessible by all users. You only need the read-content permission. - Whenever you upgrade the add-in, send a message to all users like follow: ![](https://bluebyte.biz/wp-content/uploads/2021/07/image-2.png)- Where : - **blubyte** is replaced by your vault name. - **projectid** is replaced by the folder id where the bas file resides - **documentid** is the SQL db id of the file. Having issues with your [SOLIDWORKS PDM add-ins](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/)? [Blue Byte Systems, Inc](https://bluebyte.biz/contact/) is here to help with your PDM customization needs. Reach out to us via [contact ](https://bluebyte.biz/contact/)page for a free 30-min consultation. **Categories:** macros --- ### [Traverse Assembly Tree Recursively - SOLIDWORKS API](https://bluebyte.biz/macros/traverse-assembly-tree-recursively-solidworks-api/) **Published:** January 23, 2021 **Author:** Amen Jlili **Content:** This topic is most definitely a recurring one. I often find myself revisiting old pieces of code I wrote a while ago and having to copy-paste. So I thought it would be a good idea to congregate all that in one useful post for future reference. In this article, we are going to explain traverse assembly tree recursively. Unfortunately, the code samples we have from the SOLIDWORKS Corp fall behind in terms of proper recursion, which is essential for navigating complex assembly structures. Below in this documentation, you will find an example that uses [VBA recursion](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) to drill down into an assembly tree effectively. The code examples provided here go beyond the basics often found in the standard [SOLIDWORKS API](https://bluebyte.biz/solidworks/solidworks-api-programming-languages-comparison-vba-vb-net-and-c/) SDK documentation, offering a more robust and reusable solution. I’ve prepared the code in C#, VB.NET, and VBA, demonstrating the easy yet effective technique to [traverse assembly completely](https://bluebyte.biz/macros/solidworks-macro-for-efficient-assembly-navigation-open-and-activate-top-level-assembly/). ***Note:*** While the logic respects the assembly order, it will not traverse the FeatureManager display tree as it appears in SOLIDWORKS (i.e., it ignores components organized into folders). To traverse the FeatureManager design tree exactly as it appears, use this object. ***Note:*** The highlighted green line in the C# and VB.NET samples needs to be updated by the user with a proper assembly path. The VBA code sample assumes that an assembly [document is open and active in SOLIDWORKS](https://help.solidworks.com/2021/english/SolidWorks/sldworks/t_opening_existing_documents.htm). --- ## VBA --- ``` Dim swApp As SldWorks.SldWorks Dim swRootAssemblyModelDoc As ModelDoc2 Sub main() Set swApp = Application.SldWorks swApp.CommandInProgress = True Set swRootAssemblyModelDoc = swApp.ActiveDoc Dim swFeature As Feature Set swFeature = swRootAssemblyModelDoc.FirstFeature While Not swFeature Is Nothing TraverseFeatureForComponents swFeature Set swFeature = swFeature.GetNextFeature Wend swApp.CommandInProgress = False End Sub Private Sub TraverseFeatureForComponents(ByVal swFeature As Feature) Dim swSubFeature As Feature Dim swComponent As Component2 Dim typeName As String typeName = swFeature.GetTypeName2 If typeName = "Reference" Then Set swComponent = swFeature.GetSpecificFeature2 If Not swComponent Is Nothing Then LogComponentName swComponent Set swSubFeature = swComponent.FirstFeature() While Not swSubFeature Is Nothing TraverseFeatureForComponents swSubFeature Set swSubFeature = swSubFeature.GetNextFeature() Wend End If End If End Sub Private Sub LogComponentName(ByVal swComponent As Component2) Dim parentCount As Long Dim swParentComponent As Component2 Set swParentComponent = swComponent.GetParent() While Not swParentComponent Is Nothing parentCount = parentCount + 1 Set swParentComponent = swParentComponent.GetParent() Wend Dim indentation As String indentation = Replicate(" ", parentCount) Debug.Print indentation & swComponent.Name2 End Sub Public Function Replicate(RepeatString As String, ByVal NumOfTimes As Long) Dim s As String Dim c As Long Dim l As Long Dim i As Long l = Len(RepeatString) c = l * NumOfTimes s = Space$(c) For i = 1 To c Step l Mid(s, i, l) = RepeatString Next Replicate = s End Function ``` --- ## C# --- ``` using SolidWorks.Interop.sldworks; using SolidWorks.Interop.swconst; using System; using System.Linq; namespace AssemblyTreeTraversal { class Program { static void Main(string[] args) { SldWorks swApp = default(SldWorks); ModelDoc2 swModel = default(ModelDoc2); string assemblyFileName = @"C:\PDM2020\example\Full_Grill_Assembly.SLDASM"; swApp = System.Activator.CreateInstance(Type.GetTypeFromProgID("SldWorks.Application")) as SldWorks; if (swApp == null) throw new Exception("Failed to open SOLIDWORKS"); swApp.Visible = true; // increase performance swApp.CommandInProgress = true; swModel = swApp.OpenDoc(assemblyFileName, (int)swDocumentTypes_e.swDocASSEMBLY) as ModelDoc2; Console.WriteLine("Document opened. Tree:"); var swRootAssemblyModelDoc = swApp.ActiveDoc as ModelDoc2; Action action = LogComponentName; var swFeature = swRootAssemblyModelDoc.FirstFeature() as Feature; while (swFeature != null) { TraverseFeatureForComponents(swFeature, action); swFeature = swFeature.GetNextFeature() as Feature; } swApp.CommandInProgress = false; Console.ReadLine(); swApp.QuitDoc(swModel.GetTitle()); swApp.ExitApp(); } static void TraverseFeatureForComponents(Feature swFeature, Action performAction) { var swSubFeature = default(Feature); var swComponent = swFeature.GetSpecificFeature2() as Component2; if (swComponent != null) { performAction(swComponent); swSubFeature = swComponent.FirstFeature(); while (swSubFeature != null) { TraverseFeatureForComponents(swSubFeature, performAction); swSubFeature = swSubFeature.GetNextFeature() as Feature; } } } static void LogComponentName(Component2 swComponent) { // this code is not performant int parentCount = 0; Component2 swParentComponent; swParentComponent = swComponent.GetParent(); while (swParentComponent != null) { parentCount++; swParentComponent = swParentComponent.GetParent(); } string indentation = string.Join(string.Empty, Enumerable.Repeat(" ", parentCount)); Console.WriteLine($"{indentation}{swComponent.Name}"); } } } ``` --- ## VB.NET --- ``` Imports SolidWorks.Interop.sldworks Imports SolidWorks.Interop.swconst Namespace AssemblyTreeTraversal Class Program Private Shared Sub Main(ByVal args As String()) Dim swApp As SldWorks = Nothing Dim swModel As ModelDoc2 = Nothing Dim assemblyFileName As String = "C:\PDM2020\example\Full_Grill_Assembly.SLDASM" swApp = System.Activator.CreateInstance(Type.GetTypeFromProgID("SldWorks.Application")) If swApp Is Nothing Then Throw New Exception("Failed to open SOLIDWORKS") swApp.Visible = True swApp.CommandInProgress = True swModel = swApp.OpenDoc(assemblyFileName, swDocumentTypes_e.swDocASSEMBLY) Console.WriteLine("Document opened. Tree:") Dim swRootAssemblyModelDoc As ModelDoc2 = swApp.ActiveDoc Dim action As Action(Of Component2) = AddressOf LogComponentName Dim swFeature As Feature = swRootAssemblyModelDoc.FirstFeature() While swFeature IsNot Nothing TraverseFeatureForComponents(swFeature, action) swFeature = swFeature.GetNextFeature() End While swApp.CommandInProgress = False Console.ReadLine() swApp.QuitDoc(swModel.GetTitle()) swApp.ExitApp() End Sub Private Shared Sub TraverseFeatureForComponents(ByVal swFeature As Feature, ByVal performAction As Action(Of Component2)) Dim swSubFeature = Nothing Dim swComponent = TryCast(swFeature.GetSpecificFeature2(), Component2) If swComponent IsNot Nothing Then performAction(swComponent) swSubFeature = swComponent.FirstFeature() While swSubFeature IsNot Nothing TraverseFeatureForComponents(swSubFeature, performAction) swSubFeature = swSubFeature.GetNextFeature() End While End If End Sub Private Shared Sub LogComponentName(ByVal swComponent As Component2) Dim parentCount As Integer = 0 Dim swParentComponent As Component2 swParentComponent = swComponent.GetParent() While swParentComponent IsNot Nothing parentCount += 1 swParentComponent = swParentComponent.GetParent() End While Dim indentation As String = String.Join(String.Empty, Enumerable.Repeat(" ", parentCount)) Console.WriteLine($"{indentation}{swComponent.Name}") End Sub End Class End Namespace ``` Using these recursive functions, you have at your fingertips a powerful and effective tool for working with your [SOLIDWORKS assembly](https://bluebyte.biz/solidworks/solidworkspdm/batch-export-solidworks-assemblies-to-iges-using-pdmpublisher/) data. If all you wish to do is examine the structure or SOLIDWORKS sort assembly tree alphabetically, the code presented here is a good place to begin. If you are still finding that you’re stuck or have specific questions about tailoring this code, don’t hesitate to reach out! **Categories:** macros --- ### [How To Automate Solidworks Export Bom To Excel Workflow with Thumbnails](https://bluebyte.biz/macros/solidworks-export-bom-to-excel/) **Published:** January 20, 2021 **Author:** Amen Jlili **Content:** ![SolidWorks Export Bom to Excel](https://bluebyte.biz/wp-content/uploads/2018/04/Untitled-1.png)SolidWorks Export Bom to Excel If you are using SOLIDWORKS 2018 or lower, exporting Bill of Materials (BOM) manually to Excel and then adding pictures would be quite a tedious and time-consuming process. But the good news is, you can achieve this process with a speedy macro, saving you heaps of time and accelerating your workflow. In this tutorial, we are going to guide you through how to export Bill of Materials SolidWorks to Excel with thumbnails using a parts-only BOM macro. Not only is this faster, but it also provides you with a visual representation of each part, which is invaluable for design reviews and communications within the team. Note that this macro is optimal for smaller assemblies only; larger ones have alternatives like [*xlBOM with thumbnails*](https://bluebyte.biz/product/xlbom-with-thumbnails-premium/) or [*PDM2Excel*](https://bluebyte.biz/product/pdm2excel/), which handle complex assemblies more efficiently. ## Why Use a Macro for BOM Export in SOLIDWORKS? Having your process automated through a macro is a great way to eliminate the drudgery of repetitive tasks. And that’s where the importance of knowing how to export SolidWorks BOM to Excel comes into play. This is why a macro is the best thing to do for it: - **Saves Time:** Export BOMs with thumbnails quickly without any hands-on efforts. - **Improves Clarity:** The Excel preview thumbnails that are included provide a visual representation of each part, making the BOM easier to understand. - **Improves Communication:** Sharing visual components in BOMs with your team means everyone is working from the same page. ### Requirements You’ll want the following before you begin: - SOLIDWORKS software of 2018 or older versions. - Microsoft Excel must be installed to run the macro successfully. - This macro works only for parts-only BOMs. ## **Step-by-Step SolidWorks Bill of Materials Tutorial** To install and run the macro in your SOLIDWORKS software, follow these simple steps as explained- - **Insert the VBA Code:** After saving the macro, the Visual Basic for Applications (VBE) window will open. Here, clear the default text and copy-paste the VBA code provided below- - **Open SOLIDWORKS and load the Drawing:** First of all, you’ll need to open your SolidWorks software and make sure your drawing with a BOM is open and active. - **Create a New Macro:** Go to **Tools > Macro > New…** and store the macro in a location of your choice. - **Choose the Bill of Materials:** When you are inside the [SOLIDWORKS drawing](https://bluebyte.biz/macros/how-to-automatically-insert-a-solidworks-drawing-watermark-using-a-macro/), check and make sure that only the BOM feature is chosen and not anything else. - **Run the Macro:** - Click the green play button in the macro toolbar. - If you see a dialog box popping up on the screen asking which subroutine to run, select “main” and click “Run”. The macro will now start running and export the BOM to Excel, complete with thumbnail previews for each visible component. ## How the Macro Works The macro performs two key functions to help you export a SolidWorks BOM with images: - **Exports Data to Excel:** It simply copies the BOM data from SOLIDWORKS to a new Excel session. - **Generates Thumbnails:** It generates a new Excel thumbnail preview sheet for each visible component. This visual guide makes it much easier to identify parts without needing to click on each component in turn. - **Parts-Only BOM:** This macro only works for parts-only BOMs and will not work with assemblies or sub-assemblies. ### Limitations of the Macro There’s no doubt that this macro is absolutely capable of speeding up your workflow significantly. However, you must also be on the lookout for some of its limitations, such as– - **Cannot Handle Large Assemblies:** If you are to use it for very large or complex assemblies, it may not be the best choice and may fall behind in terms of handling the workload efficiency. - **Version Compatibility:** Since this macro is specifically designed for use with [SOLIDWORKS 2018](https://www.solidworks.com/media/solidworks-cam-2018) and older versions, you’ll not be able to make use of it with the newer once. For that scenario, consider other tools or solutions that allow better functionality. As mentioned at the start, for more complex assemblies or additional features, consider using advanced tools like xlBOM. [This tool can handle larger assemblies and provides more robust export capabilities](https://bluebyte.biz/solidworks/solidworkspdm/export-solidworks-pdm-boms-to-xlsx-with-thumbnails-pdm2excel/). ## Why Choose Automation for BOM Export? [Automating the BOM export process](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/) in **SOLIDWORKS VBA** saves you time and effort, especially when dealing with repetitive tasks. By integrating thumbnail previews in Excel, you make it easier for stakeholders to visualize the components, which is critical in **manufacturing** and **design reviews**. --- ## Need Help with SOLIDWORKS Automation? Automating these kinds of repetitive tasks, like [SolidWorks Export Bom To Excel](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/), can spare plenty of your time and effort, which you can utilize for something more significant. In case you need assistance in this or any other custom solutions, feel free to get in touch with us. At Blue Byte Systems, we specialize in automating SOLIDWORKS and PDM workflows. Contact us today and let us show you how we can help you simplify your design process and boost productivity. **Categories:** macros --- ### [How To Crack Any SolidWorks Password Protected VBA Macro (With Screenshots)](https://bluebyte.biz/macros/crack-any-solidworks-password-protected-vba-macro-with-screenshots/) **Published:** December 24, 2020 **Author:** Amen Jlili **Excerpt:** Unlock any VBA macro **Content:** **Disclaimer:** *The information shared in this article is intended to show how easy it is to unlock the password protection of any SOLIDWORKS VBA macro. Please do not use this for any other reason.* [![Crack Any SolidWorks Password Protected VBA Macro](https://bluebyte.biz/wp-content/uploads/2020/12/image-3-1024x555.png)](https://bluebyte.biz/wp-content/uploads/2020/12/image-3.png) ## Unlock Any VBA Macro In 5 Minutes - Well, to unlock a password-protected macro, we need to start by downloading a tool like HxD, a hexadecimal binary editor. This will help us patch one or two entries in the .swp file — a common approach often used when attempting to crack any SolidWorks password protected VBA macro. - You probably have a password-protected VBA Macro while reading this article. If you don’t have a guinea pig, you can download [***this SOLIDWORKS VBA macro***](https://u.pcloud.link/publink/show?code=XZpD68XZaneCXe41Q2hDuVcPE842ip0mrfK7). - Make sure the macro is not being used by any application (i.e., SOLIDWORKS). This will prevent HxD from making changes to it. - Launch HxD: ![HEX editor](https://bluebyte.biz/wp-content/uploads/2020/12/image.png) - In HxD, go to File > Open and then browse to the password-protected macro’s file and click on it to open it. ![HEX editor](https://bluebyte.biz/wp-content/uploads/2020/12/image-1.png) - Now, press Ctrl + F, and look for “DPB“. Usually, there is more than one occurrence. - For each occurrence of “DPB,” select the letter B and change it to x. ![HEX editor](https://bluebyte.biz/wp-content/uploads/2020/12/image-2.png) - After replacing all occurrences of B with x in DPB, go to File and click on Save As. - Save the macro using a different name *so you do not override the original one*. - Open the macro in SOLIDWORKS by going to Tools > Macro > Edit… - You will get a message stating that the project file contains an invalid key “DPx” and asking you if you want to continue loading the project. There, click on Yes. ![Password protection error when opening VBA macro](https://bluebyte.biz/wp-content/uploads/2020/12/image-3-1024x555.png) - For each module in the main project, the VBE will show the following dialog. Click on OK to confirm each time. ![VBE - Unexpected error 40230](https://bluebyte.biz/wp-content/uploads/2020/12/image-4.png) - When the [VBE editor](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/) opens, go to **Tools > Properties.** ![How to get Tools > Properties in VBE ](https://bluebyte.biz/wp-content/uploads/2020/12/image-5.png) - Go to the [Protection tab](https://bluebyte.biz/macros/protect-macros-with-a-password/) and change the password, then you may click OK. This effectively allows you to remove password from VBA. ![VBA project properties](https://bluebyte.biz/wp-content/uploads/2020/12/image-6.png) - Make sure to save the macro. - Close and then reopen the SolidWorks software. - Edit the macro again, and you should be able to view the source code with your new password. This technique can be considered a type of SolidWorks crack for accessing password-protected content. ## **What Do I Need To Do To Protect My Code?** Unfortunately, not much. Macros are pretty awesome. *Their security is not*. It doesn’t take a lot of skill for someone to crack any SolidWorks password protected [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/), which is why relying on a simple password isn’t enough. Here at [*Blue Byte Systems****,*** ](https://bluebyte.biz/)Inc., we encourage all of our customers to consider the option of upgrading their VBA macros to add-ins. We employ the latest code obfuscation tools to make it extremely hard for anyone to reverse engineer your code. *[Contact us ](https://bluebyte.biz/contact/)for a quote on how to protect your SOLIDWORKS VBA macro****.*** **Categories:** macros --- ### [Top 5 SOLIDWORKS PDM Errors When Loading Add-ins](https://bluebyte.biz/pdm-api-tips/common-must-know-solidworks-epdm-add-ins-errors-for-api-enthusiasts/) **Published:** August 11, 2020 **Author:** Amen Jlili **Excerpt:** Below is a compiled list of the most notoriously common errors that you may encounter while deploying add-ins to a SOLIDWORKS PDM Professional vault. Proposed solutions are also listed under each error. **Content:** ![Top 5 SOLIDWORKS PDM Errors When Loading Add-ins](https://bluebyte.biz/wp-content/uploads/2020/08/pdm-administration-adding-new-addin1.png)PDM administration tool If you’re deploying a SolidWorks add-in to a **PDM** Professional vault, it’d be natural to run into some common errors. Solution? You’re at the right spot! This is a compiled list of the most common SolidWorks PDM errors you may encounter while deploying add-ins to a SolidWorks PDM Professional vault. And, you’ll also find proposed solutions for each of these errors. ## Error 1: The DLL is not a COM module This error is quite straightforward. The class that implements the **IEdmAddIn5** interface must be [COM visible](https://bluebyte.biz/solidworks/solidworkspdm/why-class-not-registered-happens-when-loading-solidworks-pdm-add-ins/). The best way to expose a .NET class as COM visible is as follows: ![The DLL is not a COM module](https://bluebyte.biz/wp-content/uploads/2020/08/image-1-1024x560.png)Making a .NET class com visible in Visual Studio ****Making a .NET Class COM Visible in Visual Studio**** You can achieve the same result without using the **ComVisible** attribute and instead right-clicking on the **active project > Properties > Application > Assembly Information…** and then checking the box to make the assembly COM-Visible. However, this approach has the unintended consequence of making all public classes COM-Visible, which is not recommended for larger projects. ![This dialog allows you to check an assembly to be COM-Visible. Ensure you understand the implications of making your entire assembly COM visible.](https://bluebyte.biz/wp-content/uploads/2020/08/image-2.png) This dialog allows you to check an assembly to be COM-Visible. Ensure you understand the implications of making your entire assembly COM visible. ## Error 2: Please select at least one DLL implementing the IEdmAddIn5 Interface Every add-in must have a class that implements the IEdmAddIn5 interface. When your vault fails to [find a class that implements IEdmAddIn5](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/), this error message is displayed to the user. Since the **IEdmAddIn5::GetAddInInfo** method gets invoked when you add the [SolidWorks add-in](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/) to the vault, this error is unfortunately an umbrella for any unhandled exceptions thrown within the scope of IEdmAddIn5::GetAddInInfo. **Best Practice:** As a rule of thumb, always wrap the implementation of **IEdmAddIn5::GetAddInInfo** in a try-catch block. Handle thrown exceptions properly by logging them and/or showing a message box to the user installing the add-in. When logging exceptions, use Exception.InnerException to log all inner exceptions. The innermost exception can sometimes provide a more meaningful explanation of the root cause of the outermost exception. ![Please select at least one DLL implementing the IEdmAddIn5 Interface](https://www.cadsharp.com/wp-content/uploads/2018/04/please-select-one-dll-that-implements-IEDMAddin5.png)Please Select at least one DLL implementing the IEdmAddIn5 Interface message box. --- #### As a rule of thumb, always wrap ***IEdmAddIn5::GetAddInInfo****‘s* implementation in a ***try-catch block*** and handle thrown exceptions properly by logging them and/or showing a message box to the user installing the add-in. --- ## Error 3: The add-in ‘’ cannot be installed since it returned an invalid required version SOLIDWORKS PDM version from its GetAddInInfo Method This error is already a self-explanatory one. The specified version in the **EdmAddInInfo** parameter of the **IEdmAddInInfo::GetAddInInfo** method has a major and/or minor version that is lower than the hosting SOLIDWORKS PDM Professional vault’s version. The only way to fix this is to make sure that the [minimum version specified in your code](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-writing-add-ins-with-version-specific-apis/) is either equal to or higher than that of the target PDM vault. This is a crucial step to remember in any SOLIDWORKS PDM upgrade guide. ## Error 4: The archive server could not open the Windows Registry ![The archive server could not open the Windows Registry](https://www.cadsharp.com/wp-content/uploads/2018/04/the-archivage-server-could-open-the-windows-registery.png)The archive server could not open the Windows Registry message box You might encounter this error if you’ve copied or downloaded the API add-in DLL files from another computer. The Windows security policy might “block” the DLLs for security purposes on some systems. In that scenario, you’ll find- **Error Message:** “The archive server could not open the Windows Registry” **Solution:** To add these add-in DLLs to the vault, you must first unblock them. Follow these steps accordingly: - In **Windows Explorer**, right-click the DLL file and select **Properties**. - Select the **General** tab. - If the file is blocked, you’ll encounter a warning message stating: **“The [file came from another computer and might be blocked to help protect this computer.](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/)”** - Confirm that the file originates from a trusted source, and then click **Unblock**. - Click **OK** to close the properties dialog box. - Repeat these steps for any additional DLL files that were copied or downloaded from the same source. Be on the lookout, since this error is common for SOLIDWORKS EPDM migrations too. For an in-depth walkthrough of this process, you can refer to the SOLIDWORKS PDM upgrade guide, as you might face similar issues during updates. ## Error 5: You do not have permission to use this tool. Please ask the system administrator to grant you permission if you feel that you should be able to use the tool. ![You do not have permission to use this tool. Please ask the system administrator to grant you permission if you feel that you should be able to use the tool.](https://bluebyte.biz/wp-content/uploads/2020/08/image-3.png)Lack of permission error when attempting to add add-ins **Message:** “You do not have permission to use this tool. Please ask the system administrator to grant you permission if you feel that you should be able to use this tool.” This error indicates that you lack the necessary permissions to administrate (install, update, debug, or remove) add-ins from this vault. The system administrator is the only one who can grant you that permission. **Solution:** The screenshot below shows the setting that the administrator must enable to grant the user the necessary permissions.**Permission Settings:** Make sure that the administrator reviews and modifies the user permissions accordingly to allow access to add-in administration tools. ![Permission to install and remove add-ins](https://bluebyte.biz/wp-content/uploads/2020/08/image-5.png)Permission to install and remove add-ins [***If you’re still facing challenges or errors while using our PDM administration tool, we’re here to help! Our team of experts is ready to assist you in troubleshooting and resolving any issues you may encounter. To provide you with the best support, we encourage you to schedule a call with us. Please reply to this message with your availability, and we will arrange a convenient time to discuss your concerns in detail.***](https://calendly.com/bluebyte/solidworks-api-codereview) Don’t hesitate to reach out—together, we can achieve a smooth and efficient experience with our tools in no time! **Categories:** PDM API Tips --- ### [How to Quickly Delete Dangling Dimensions in SOLIDWORKS Drawings?](https://bluebyte.biz/macros/how-to-quickly-delete-dangling-dimensions-in-solidworks-drawings/) **Published:** August 5, 2020 **Author:** Amen Jlili **Content:** When you’re drafting using SOLIDWORKS, you’ve most likely encountered those pesky red dimensions, a very typical sign of a dangling dimensions SOLIDWORKS drawing. This is most often a result of a deleted, modified, or suppressed sketch entity or feature to which a dimension was being anchored in the model. Though they do not affect the model, these dimensions can confuse your drawing, make it illegible, and create ambiguity. The tedious and repetitive exercise of manually figuring out how to quickly delete dangling dimensions in solidworks drawings by reviewing every sheet and view is necessary in case of drawings that are more complex. Instead of individually selecting each dimension, a good and convenient choice is to use a [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/). This macro itself is purpose-built to help you solidworks [delete dangling dimensions](https://bluebyte.biz/macros/a-simple-macro-for-all-solidworks-delete-dangling-dimensions-automated/) by making the cleanup process more efficient. It accomplishes this by iteratively searching through every annotation on every sheet and view in the [active drawing document](https://bluebyte.biz/macros/solidworks-macro-to-rebuild-referenced-models-in-all-drawing-sheets/). Once an annotation, like a dimension, is determined to be “dangling,” the macro will select it for deletion. This will save your time and energy to check and select each erroneous dimension manually, a very time-wasting and labor-intensive activity. It is the perfect way to understand how to delete dimensions in [SolidWorks drawing](https://bluebyte.biz/macros/how-to-automatically-insert-a-solidworks-drawing-watermark-using-a-macro/) with only one click. ``` ' Delete all dangling dimensions ' Conditions = Active document must be drawing ' Results = Dangling dimensions deleted ' www.bluebyte.biz Dim swApp As Object Dim swModel As Object Dim swDraw As Object Dim swSheet As Object Dim swView As Object Dim boolstatus As Boolean Dim swAnn As Object Dim swDispDim As Object Dim vSheetNames As Variant Public Enum swDocumentTypes_e swDocNONE = 0 ' Used to be TYPE_NONE swDocPART = 1 ' Used to be TYPE_PART swDocASSEMBLY = 2 ' Used to be TYPE_ASSEMBLY swDocDRAWING = 3 ' Used to be TYPE_DRAWING End Enum Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel Is Nothing Then swApp.SendMsgToUser ("Macro failed because there is no active drawing document.") ElseIf swModel.GetType swDocumentTypes_e.swDocDRAWING Then swApp.SendMsgToUser ("Macro failed because active document is not a drawing.") Else Set swDraw = swModel swModel.ClearSelection2 (True) vSheetNames = swDraw.GetSheetNames For i = 0 To UBound(vSheetNames) swDraw.ActivateSheet vSheetNames(i) Set swSheet = swDraw.Sheet(vSheetNames(i)) Set swView = swDraw.GetFirstView Do While Not swView Is Nothing Set swAnn = swView.GetFirstAnnotation3 Do While Not swAnn Is Nothing If swAnn.IsDangling Then swAnn.Select2 True, -1 End If Set swAnn = swAnn.GetNext3 Loop Set swView = swView.GetNextView Loop boolstatus = swModel.DeleteSelection(True) If boolstatus Then swModel.ClearSelection2 (True) End If Next i End If End Sub ``` **Categories:** macros --- ### [How to Automatically Insert a SolidWorks Drawing Watermark Using A Macro?](https://bluebyte.biz/macros/how-to-automatically-insert-a-solidworks-drawing-watermark-using-a-macro/) **Published:** June 15, 2020 **Author:** Amen Jlili **Content:** ![](https://bluebyte.biz/wp-content/uploads/2020/06/add-watermark.gif)Engineering drawings often force you to insert vital notes in the document, such as “DRAFT,” “FOR REVIEW,” or “CONFIDENTIAL.” Even though it’s possible to manually insert a note on every sheet, it’s time-consuming and prone to human mistakes. This is where you can use a simple VBA macro. This strong macro adds a watermark to your drawings automatically, which will conserve your time as well as ensure consistency in all of your design documents. Click a few times and be able to insert a readable, centered watermark on the active sheet of your drawing document. This article is going to show you how you can automatically insert a SolidWorks drawing watermark using a macro.## What Does This Macro Do? This macro is a fast, easy tool for any SOLIDWORKS user. It performs the following essential tasks: - Adds a watermark to the active drawing sheet: Because the macro is acting upon the sheet that you have opened, it is easy to process [multi-sheet drawings](https://bluebyte.biz/macros/solidworks-macro-to-batch-rebuild-and-export-drawings-to-pdf/) one by one. - Positions the watermark in the center: It automatically figures out the center of the sheet and positions the watermark there for a professional look. - Avoids redundancy: The macro is smart enough to find and delete any existing watermark at the same spot before inserting a new one. This keeps your drawings from becoming cluttered. - Allows customization: It is simple to change the watermark text inside the code itself, thereby you may utilize words like “OBSOLETE,” “AS BUILT,” or any other marking that you need. ### Why Should I Use This Macro? Using a watermark drawing macro is the best way to control quality and communicate effectively on your projects. Instead of wasting precious time inserting and formatting notes manually, the macro is a simple, trusted answer. - Work smarter: Avoid the unnecessary clicks and laborious formatting that come with inserting watermarks on all sheets of a big package of drawings. - Make uniform: A macro makes all watermarks have the same position, font, and size, avoiding inconsistency from drawing to drawing, or project to project. - Enhance clarity: Make non-final drawings visually distinguishable in order to avoid confusion and to make it visually obvious to stakeholders that a drawing is not an approved, final document. ### How to Add a Watermark in a SolidWorks Drawing? To add a watermark to your SolidWorks drawing, you don’t need any particular programming knowledge. Just follow these simple steps to get started: - Download the Code: Download the complete VBA code of the watermark macro below. - Open the VBA Editor: Click on Alt + F11 in SOLIDWORKS to open the VBA Editor. - Add a New Module: Go to Insert > Module within the VBA Editor. This will open a new window where you will add the code. - Insert the Code: Copy and paste the complete VBA script from the box below into the new module window. - Change Your Watermark: Locate the line of code that says watermarkText = “DRAFT”. Simply type inside the quotes whatever you want your watermark to say. For example: watermarkText = “CONFIDENTIAL”. - [Run the Macro](https://bluebyte.biz/macros/solidworks-macro-to-save-drawing-as-pdf-instant-export/): Go back to SOLIDWORKS, open the drawing you want to alter, then go to Tools > Macro > Run. Select the new macro file you saved and click on “Open.” The macro will execute instantly, and your watermark will be aligned centrally on the current [drawing sheet](https://bluebyte.biz/macros/automatically-refresh-drawing-sheet-formats-in-solidworks-with-vba/). ## The VBA Macro Code ``` 'www.bluebyte.biz Public Enum swVerticalJustification_e swVerticalJustificationNone = 0 swVerticalJustificationBottom = 3 swVerticalJustificationMiddle = 2 swVerticalJustificationTop = 1 End Enum Public Enum swTextJustification_e swTextJustificationCenter = 2 swTextJustificationLeft = 1 swTextJustificationNone = 0 swTextJustificationRight = 3 End Enum Public Enum swDocumentTypes_e swDocASSEMBLY = 2 swDocDRAWING = 3 swDocIMPORTED_ASSEMBLY = 7 swDocIMPORTED_PART = 6 swDocLAYOUT = 5 swDocNONE = 0 swDocPART = 1 swDocSDM = 4 End Enum Public Enum swLeaderStyle_e swNO_LEADER = 0 End Enum Option Explicit Sub main() '''''''''''''''''''' Dim watermarkText As String 'set watermark text here watermarkText = "DRAFT" '''''''''''''''''''' Dim swApp As Object Dim swModel As Object Dim swDraw As Object Dim swSheet As Object Set swApp = Application.SldWorks If swApp Is Nothing Then MsgBox ("Failed to get the solidworks application.") Exit Sub End If Set swModel = swApp.ActiveDoc If swModel Is Nothing Then swApp.SendMsgToUser "No document open." Exit Sub End If If swModel.GetType() swDocumentTypes_e.swDocDRAWING Then swApp.SendMsgToUser "Macro only runs on drawing documents." Exit Sub End If Set swDraw = swModel Dim addRet As Boolean addRet = AddWatermark(swDraw, watermarkText) If addRet = False Then swApp.SendMsgToUser "Failed to get add watermark" End If End Sub Private Function AddWatermark(ByVal swModel As Object, ByVal watermarkText As String) As Boolean On Error GoTo handler: Dim swWidth As Double Dim swHeight As Double Dim swDrawingDoc As Object Dim selectionMgr As Object Dim swSheet As Object Dim swAnn As Object Dim swNote As Object Dim swTextFormat As Object Set swDrawingDoc = swModel Set swSheet = swDrawingDoc.GetCurrentSheet() Dim props As Variant props = swSheet.GetProperties2() swWidth = props(5) swHeight = props(6) swDrawingDoc.EditTemplate swModel.ClearSelection2 (True) 'attempt to get existing note and delete if it exists in the same position Dim selectionRet As Boolean selectionRet = swModel.Extension.SelectByID2("", "NOTE", swWidth * 0.5, swHeight * 0.5, False, -1, 0, Nothing, 0) If (selectionRet) Then swModel.DeleteSelection False End If Set swNote = swModel.InsertNote("" + watermarkText) swNote.BehindSheet = True If Not swNote Is Nothing Then swNote.SetBalloon 0, 0 Set swAnn = swNote.GetAnnotation() swAnn.SetLeader3 swLeaderStyle_e.swNO_LEADER, 0, True, False, False, False Set swTextFormat = swModel.GetUserPreferenceTextFormat(0) swTextFormat.Escapement = 0.4 swTextFormat.CharHeight = 0.04 swAnn.SetTextFormat 0, False, swTextFormat swAnn.SetPosition swWidth * 0.5, swHeight * 0.5, 0 swNote.SetTextJustification (swTextJustification_e.swTextJustificationCenter) swNote.SetTextVerticalJustification (swVerticalJustification_e.swVerticalJustificationMiddle) End If swModel.ClearSelection2 (True) swDrawingDoc.EditTemplate swDrawingDoc.EditSheet AddWatermark = True swModel.ForceRebuild3 False Exit Function handler: AddWatermark = False End Function ``` ## Need a Custom Modification? This free macro is a quick solution to solidworks drawing add watermark, but we know that every [engineering workflow](https://teamhood.com/engineering/engineering-workflow-examples/) is unique. So, if you need a more advanced version tailored to your needs, or one based on a [custom property](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/) to define the text, we’re here to help. At Blue Byte Systems Inc., we excel at creating bespoke VBA macros and add-ins that are ideally suited to your individual requirements. So if you have a concept for a bespoke macro or a bug you’d like resolved, don’t hesitate to get in touch with us here for a quote or free consultation. Together, let’s achieve even higher productivity, ya? **Categories:** macros --- ### [Top reasons to upgrade your VBA macros in 2020](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) **Published:** May 30, 2020 **Author:** Amen Jlili **Excerpt:** VBA macros continue to be the choice of the SOLIDWORKS community for automating repetitive tasks. After years of contributing to the API forum and seeing various examples of VBA macros being stretched to the limits of what VBA can do, it is about time to compile a list of reasons why upgrading a VBA macro to a .NET add-in makes sense. **Content:** ![Reasons to upgrade your VBA macros](https://bluebyte.biz/wp-content/uploads/2020/05/watermark-1024x433.png)Converting a SOLIDWORKS VBA macro to an add-in.VBA macros continue to be the choice of the SOLIDWORKS community for automating repetitive tasks. After years of contributing to the [API forum](https://forum.solidworks.com/community/api) and seeing various examples of VBA macros being stretched to the limits of what VBA can do, it’s about time to explore the key reasons to upgrade your VBA macros to a .NET add-in and understand why making this move makes perfect sense. ## Compatibility issues when upgrading SOLIDWORKS A macro that was developed with SOLIDWORKS 2014 for example might not open or run properly in SOLIDWORKS 2018. Often times, the issue is related to references. The developer’s version of SOLIDWORKS is behind the end-user’s one. Consequently, the tlb references are not found and are marked as missing in the end-user’s machine. See image below. This is fixed by going to the macro editor **Tools** > **References**, unchecking any missing references and then adding them again. Most of the time, the missing references are sldworks.tlb and swconst.tlb. SOLIDWORKS references are found in the installation directory of SOLIDWORKS. ![SOLIDWORKS API and PDM API Training and Services » Fix “Compile ...](https://www.cadsharp.com/docs/missing_ref.PNG)Example showing swcommands.tlb reference missing. The entire issue with references compatibility can be circumvented if the developer’s uses [late binding](https://bluebyte.biz/solidworks/solidworks-programming-language-a-beginners-guide-to-c-vba-and-vb-net/) instead of early binding when developing the macro. The developer here puts the burden of resolving the API object types on VBA during runtime. ``` ' this is early binding Dim swApp as SldWorks.SldWorks set swApp = Application.SldWorks ' this is late binding Dim swApp As object set swApp = CreateObject("SldWorks.Application") ``` This works fine but the problem with the said approach is that [late binding](https://bluebyte.biz/macros/early-binding-vs-late-binding-how-to-write-macros-that-will-always-run-with-no-errors/) deprives the developer’s from access to the intellisense. ![](https://bluebyte.biz/wp-content/uploads/2020/05/image.png)VBE uses the referenced tlbs to compile a list of suggestions that auto-completes the developer’s intention. Any edits to methods, parameters or even variable type declarations can be cumbersome. Let’s be honest, no one is expecting you to memorize the entire arguments list of [IFeatureManager.FeatureExtrusion3](https://help.solidworks.com/2020/English/api/sldworksapi/SOLIDWORKS.Interop.sldworks~SOLIDWORKS.Interop.sldworks.IFeatureManager~FeatureExtrusion3.html). ## Deployment issues Installing a SOLIDWORKS macro involve adding menu buttons to an existing command tab. This might not seem so obvious to all SOLIDWORKS users. The problem is exacerbated if you have 100 machines. You will have to do this 100 times. Installing a [SOLIDWORKS add-in](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/), on the other hand, should be as easy as installing any program . An MSI installer takes care of everything. ## UI responsiveness This is, by the far, the biggest drawback of VBA. VBA falls extremely short of .NET when it comes to multi-threading. Some developers argue that **Application.DoEvents** can be used to accomplish UI responsiveness. While this is partially true, I would argue that its usage is not pretty. VBA code still runs on the main thread of the host application (SOLIDWORKS) and **Application.DoEvents** only allows your application to respond to user inputs while the execution of the macro is put onhold and vice versa: Your UI will not be responsive if SOLIDWORKS is busy executing a time-consuming operation, hence loss of UI responsiveness. A .NET add-in, however, can spin a new instance of UI components in a worker thread allowing the main thread to execute API calls. This approach is unorthodox. .NET best practices actually recommend you execute time-consuming tasks (in our case that would be the API calls) in a worker thread but the host-add-in architecture constraints the use of such best practices – *more on this on a latter blogpost*. It requires a bit of threading coordination since UI components were coded to run on the main thread but it still possible to achieve complete UI responsiveness this way. **I think this is the best selling point.** ## Error handling In .NET you can simply use a **try catch block** to catch exceptions. This method of error handling is very superior the archaic approach using **On Err GoTo:** ## Boilerplate code Sorting, reversing, skipping, using Linq to do any data manipulation in .NET has no out-of-the-box equivalent in VBA. Writing a utilities module to do that will set you back a couple thousands of lines of code. This is the reason why most add-ins would count longer lines if rewritten in VBA. **Those are my 5 top reasons and I’m pretty sure there are loads more. Feel free to contribute by sharing your opinion and writing a comment below!** **Categories:** macros --- ### [A Simple Macro for All SolidWorks Delete Dangling Dimensions Automated!](https://bluebyte.biz/macros/a-simple-macro-for-all-solidworks-delete-dangling-dimensions-automated/) **Published:** April 7, 2018 **Author:** Amen Jlili **Content:** ![Reattaching Dangling Dimensions - 2024 - What's New in SOLIDWORKS](https://help.solidworks.com/2024/English/WhatsNew/iym1700164308587.image) If you’ve been working a while in SOLIDWORKS, you know the drill. You open a drawing, and there they are: those hanging, useless dimensions that lost their reference points. They’re referred to as dangling dimensions, and one or two will not hurt anything, but a whole group can take a neat drawing and make it into a confusing mess. They’re not just visual eyesores; they’re an early symptom of unwanted errors. But what if you could nuke them all in one click? Well… now you can, by following along with this guide. This guide is going to explore a simple macro for all SolidWorks [delete dangling dimensions](https://bluebyte.biz/macros/how-to-quickly-delete-dangling-dimensions-in-solidworks-drawings/). You can utilize a simple, convenient macro that addresses this very problem by zapping all your dangling dimensions for you. ## Key Features - Deletes all dangling dimensions from active drawings. - Works with any SOLIDWORKS version, thanks to late-binding. - User confirmation required before deletion. ## **How The Macro Works Behind the Scenes?** The [VBA macro](https://bluebyte.biz/solidworks-vba-macros-library/) follows a clear, logical route to make sure that it only targets what you want it to. Here’s a step-by-step breakdown of how it works: - **It Checks for the Document:** It first checks whether the current document is a drawing. If you have something open like an assembly or a part, it will warn you and terminate, so you don’t even use it where it shouldn’t be used. This is also a good thing to keep in mind if you ever wonder how to cancel macros inc before they land you in trouble. - **It Scans for Dangles:** The macro searches every view in your drawing, looking for any annotations SOLIDWORKS has tagged as “dangling.” It only calls out those dimensions that have lost their reference. - **It Asks for Authorization:** You get a message of approval prior to deletion being done. That is your final chance to approve the action and prevent modifications from being inadvertently made, which is really a great safety feature, especially if you are working on something intricate and would like to prevent modifications from being made by accident, as if you have to delete configuration SolidWorks drawings in a particular way. - **It’s Version-Agnostic:** Because it uses late-binding, the macro does not use explicit references and works perfectly across different versions without your involvement in code.es and works perfectly across different versions without your involvement in code. ### Code: ``` ' Delete all dangling dimensions ' Conditions = Active document must be drawing ' Results = Dangling dimensions deleted ' www.bluebyte.biz Dim swApp As Object Dim swModel As Object Dim swDraw As Object Dim swSheet As Object Dim swView As Object Dim boolstatus As Boolean Dim swAnn As Object Dim swDispDim As Object Dim vSheetNames As Variant Public Enum swDocumentTypes_e swDocNONE = 0 ' Used to be TYPE_NONE swDocPART = 1 ' Used to be TYPE_PART swDocASSEMBLY = 2 ' Used to be TYPE_ASSEMBLY swDocDRAWING = 3 ' Used to be TYPE_DRAWING End Enum Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel Is Nothing Then swApp.SendMsgToUser ("Macro failed because there is no active drawing document.") ElseIf swModel.GetType swDocumentTypes_e.swDocDRAWING Then swApp.SendMsgToUser ("Macro failed because active document is not a drawing.") Else Set swDraw = swModel swModel.ClearSelection2 (True) vSheetNames = swDraw.GetSheetNames For i = 0 To UBound(vSheetNames) swDraw.ActivateSheet vSheetNames(i) Set swSheet = swDraw.Sheet(vSheetNames(i)) Set swView = swDraw.GetFirstView Do While Not swView Is Nothing Set swAnn = swView.GetFirstAnnotation3 Do While Not swAnn Is Nothing If swAnn.IsDangling Then swAnn.Select2 True, -1 End If Set swAnn = swAnn.GetNext3 Loop Set swView = swView.GetNextView Loop boolstatus = swModel.DeleteSelection(True) If boolstatus Then swModel.ClearSelection2 (True) End If Next i End If End Sub ``` ## **Bottom Line** Should you need to automate your SOLIDWORKS workflows even further, from dimension management to automating other drawing processes, [Blue Byte Systems](https://bluebyte.biz/) Inc. is here to help. We specialize in custom add-ins and automation utilities designed to your specifications. Contact us today! **Categories:** macros --- ### [How to Safely Delete a Vault in SOLIDWORKS PDM (Step-by-Step)](https://bluebyte.biz/solidworks/solidworkspdm/how-to-safely-delete-a-vault-in-solidworks-pdm-step-by-step/) **Published:** January 10, 2026 **Author:** Amen Jlili **Content:** [Deleting ](https://help.solidworks.com/2020/english/EnterprisePDM/admin/t_deleting_a_file_vault.htm)a vault in SOLIDWORKS PDM is a destructive and irreversible operation. It removes the vault definition from the archive server and permanently deletes the associated database. This post walks through the correct order of operations, common prompts you’ll see, and the most frequent error that blocks vault removal. - Log in directly on the Archive Server machine - Do not do this from a client or remote admin workstation. - Open SOLIDWORKS PDM Administration. - Log in as a PDM Admin. - Right-click the vault > Properties > Log in as Admin (if not already). - Right-click the vault > Remove: [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-1.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-1.png) - If you are logged into the Archive server, you can get this error: [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-9.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-9.png) - When prompted, enter SQL credentials using a sysadmin account (typically `sa`): [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-14.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-14.png) - Check the confirmation box acknowledging the operation is irreversible. - Click **Yes** to remove the vault and database. - You may be warned that some processes will terminate on the server as well as on other computers: [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-15.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-15.png) - Click Yes [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-16.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-16.png) - When prompted to delete the local view, choose whether to **leave the local contents as normal files and folders** or **delete the cached vault files from the local hard disk**, then click **Delete** and wait for the *Removing local view* process to complete (You will need to confirm another dialog if you choose this option) [![](https://bluebyte.biz/wp-content/uploads/2026/01/image-20.png)](https://bluebyte.biz/wp-content/uploads/2026/01/image-20.png) **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks --- ### [The SOLIDWORKS APIs](https://bluebyte.biz/solidworks/the-solidworks-apis/) **Published:** January 16, 2025 **Author:** Amen Jlili **Content:** When you hear the term “SOLIDWORKS API”, your first thought might be about automating repetitive tasks or improving your design workflow. But the SOLIDWORKS APIs actually include multiple options built for different purposes. Whether you are creating custom macros, building add-ins, or connecting SOLIDWORKS with external systems, there is an API that fits what you are trying to achieve. Let’s walk through the different types and how each one plays a unique role inside the SOLIDWORKS ecosystem. [![The SOLIDWORKS APIs](https://bluebyte.biz/wp-content/uploads/2024/07/Red-Icon-32-Pixel.svg)](https://bluebyte.biz/wp-content/uploads/2024/07/Red-Icon-32-Pixel.svg) ## 1. SOLIDWORKS API (Application Programming Interface) This is the primary API that most developers use to automate and customize tasks in the SOLIDWORKS desktop environment. It’s available as a [COM ](https://en.wikipedia.org/wiki/Component_Object_Model)library and supports development in programming languages like **VBA**, **VB.NET**, and **C#**. Here’s what you can do with it: - Automate repetitive tasks like creating parts, assemblies, or drawings. - Access and modify features, dimensions, and configurations. - Interact with the SOLIDWORKS user interface to add custom menus and toolbars. - Develop complex design tools to streamline engineering workflows. The SOLIDWORKS APIs is your go-to choice for anything that involves the desktop version of SOLIDWORKS. ### Applications You Can Write with the SOLIDWORKS API 1. **VBA Macros**: Automate repetitive tasks within the SOLIDWORKS desktop environment. 2. **Add-ins**: Extend SOLIDWORKS functionality by creating plugins with custom features. 3. **Standalone Applications**: Build independent tools that interact with SOLIDWORKS files and data. ### Online Documentation For detailed information and examples, visit th[e SOLIDWORKS APIs Online Documentation](https://help.solidworks.com/2023/english/api/sldworksapiprogguide/Welcome.htm). ## 2. SOLIDWORKS PDM Professional API For those managing design data and workflows, the SOLIDWORKS PDM Professional API offers powerful tools to interact with your [PDM vault](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-ideal-number-of-add-ins-per-solidworks-pdm-vault/). It allows you to: - Programmatically search for files and folders within the vault. - Automate workflows, like transitioning files between states. - Create custom tools to generate reports or monitor vault activity. - Build integrations with ERP, CRM, or other business systems. This API is ideal if you work with large teams and need to automate or extend PDM’s capabilities. ### **Applications You Can Write with the SOLIDWORKS API** 1. **Custom Add-ins:** Tailored extensions that enhance SOLIDWORKS or PDM functionality by integrating custom features and automation. 2. **Dispatch Scripts:** Script-based tools in PDM for automating vault operations like file handling and workflow enforcement. 3. **SOLIDWORKS VBA Macros:** Lightweight programs to automate tasks and processes within the SOLIDWORKS environment using VBA. 4. **Standalone Applications:** Independent tools that interact with SOLIDWORKS files and data outside the main application interface. ## 3. SOLIDWORKS Document Manager API Need to interact with SOLIDWORKS files without opening the desktop application? The SOLIDWORKS Document Manager API is here for you. It lets you: - Extract properties and metadata from SOLIDWORKS files. - Modify custom properties without launching SOLIDWORKS. - Generate file previews and thumbnails. This lightweight API is perfect for applications where speed and simplicity are critical, such as custom file management tools. **You need a new key every year.** ## 4. SOLIDWORKS CAM API If you’re using SOLIDWORKS CAM for machining and manufacturing, the SOLIDWORKS CAM API can: - Automate toolpath generation. - Customize machining strategies. - Extract machining data for use in other systems. This API is a fantastic choice for those looking to integrate manufacturing and design processes seamlessly. ## 5. SOLIDWORKS Routing API The SOLIDWORKS Routing API is a specialized tool for those working on piping, tubing, and electrical routing. It allows you to: - Automate route creation. - Modify existing routes. - Extract route data for documentation or analysis. If your work involves designing complex systems with routes, this API can save you significant time. ## 6. eDrawings Professional API The eDrawings API provides tools to interact with eDrawings files and applications programmatically. It enables you to: - Open and manipulate eDrawings files. - Automate viewing, measuring, and marking up designs. - Integrate eDrawings functionality into custom applications. ## 7. SOLIDWORKS Costing API The Costing API is designed for manufacturing cost estimation and allows you to: - Automate cost calculations for parts and assemblies. - Extract cost data for reports or integrations. - Customize cost estimation workflows to match your manufacturing processes. It’s an essential tool for teams focused on cost management and efficiency. ## 8. SOLIDWORKS Composer API The SOLIDWORKS Composer API is tailored for creating and managing technical documentation. With it, you can: - Automate the generation of exploded views and animations. - Customize technical illustrations and assembly instructions. - Integrate Composer outputs with external systems. This API is ideal for technical writers and engineers involved in documentation workflows. ## 9. SOLIDWORKS Electrical API The SOLIDWORKS Electrical API focuses on electrical schematics and system design. It enables you to: - Automate schematic generation and updates. - Customize reports and bill of materials for electrical projects. - Integrate electrical data with mechanical designs. This API bridges the gap between electrical and mechanical teams. ## 10. SOLIDWORKS Manage API The SOLIDWORKS Manage API is designed for advanced data and project management. It allows you to: - Automate project tracking and resource management tasks. - Customize dashboards and reports. - Integrate Manage data with other business systems. This API is perfect for organizations looking to enhance their project and process management capabilities. ## 11. 3DEXPERIENCE Platform APIs For those embracing cloud solutions, the 3DEXPERIENCE Platform APIs offer the ability to: - Interact with cloud-based apps like Collaborative Designer for SOLIDWORKS. - Manage data and workflows in the cloud. - Develop integrations with other cloud services. These APIs enable you to extend SOLIDWORKS’ capabilities into the 3DEXPERIENCE platform and beyond. **Categories:** SOLIDWORKS --- ### [SOLIDWORKS PDM API Tip: Ideal Number of Add-ins Per SOLIDWORKS PDM Vault](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-ideal-number-of-add-ins-per-solidworks-pdm-vault/) **Published:** February 28, 2025 **Author:** Amen Jlili **Content:** ![Ideal Number of Add-ins Per SOLIDWORKS PDM Vault](https://bluebyte.biz/wp-content/uploads/2025/02/tasks.png)Your add-ins consist of DLL files. Each time an application like explorer.exe logs into PDM, it loads those files into the application’s sessions, increasing startup time and memory usage. While memory use is not a major issue these days, startup time can be noticeably affected. This is why it’s essential to ideal number of add-ins per SOLIDWORKS PDM vault, as having too many add-ins can significantly impact user performance and responsiveness. The ideal number of add-ins is five, but PDM already includes three default ones: 1. **Dispatch** – Automates workflows via scripting. 2. **SOLIDWORKS Task Add-in** – Add-in used to run custom [SOLIDWORKS macros](https://bluebyte.biz/macros/solidworks-macro-to-apply-custom-color-and-width-to-drawing-edges/) (Convert, Print, Designer Checker…). 3. **SOLIDWORKS PDF Task Add-in** – Add-in used to convert Office and DraftSight documents to PDF. This means **you only have 2 slots left for custom add-ins** before performance starts to degrade. Each add-in adds **overhead**, increasing **vault load times**. Instead of multiple separate add-ins, **merge functionalities into one** to keep performance smooth. ✅ **PDM already has 3 built-in add-ins**, leaving space for just **2 custom add-ins**. ✅ Too many add-ins slow down vault operations. ✅ **Merging multiple add-ins into one** improves performance & simplifies maintenance. **Categories:** PDM API Tips --- ### [Merging PDFs with PDMPublisher: Enhancing Document Navigation with Bookmarks](https://bluebyte.biz/macros/merging-pdfs-with-pdmpublisher-enhancing-document-navigation-with-bookmarks/) **Published:** October 15, 2024 **Author:** Amen Jlili **Content:** ![Merging PDFs with PDM Publisher](https://bluebyte.biz/wp-content/uploads/2024/10/Merging-PDFs-with-PDM-Publisher.png)When utilizing [**PDMPublisher** ](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher")to merge PDFs from your PDM system, one standout feature of merging PDFs with PDMPublisher is the automatic addition of bookmarks to the merged document. These bookmarks act as quick links to each component inside the merged PDF, making navigation and overall usability far better for the end user. Unlike the default **PDM Convert Task**, which does not provide this bookmarking capability, PDMPublisher enhances your workflow by ensuring that users can easily access specific sections of the document without having to scroll through numerous pages. This functionality not only streamlines document management but also boosts efficiency, making PDM Publisher an invaluable tool for anyone working with large assemblies or detailed drawings. **Categories:** macros --- ### [PDMPublisher for SOLIDWORKS: Automate Your Drawing Exports Like Never Before](https://bluebyte.biz/solidworks/pdmpublisher-for-solidworks-automate-your-drawing-exports-like-never-before/) **Published:** May 20, 2025 **Author:** Amen Jlili **Content:** ![Screenshot of SOLIDWORKS 2025 Premium during startup, displaying the red SOLIDWORKS splash screen with the large white “DS SOLIDWORKS” logo and the text “Loading add-in PDMPublisher” in the lower left. A centred pop-up dialog box with a blue information icon reads: “New version of PDMPublisher (SOLIDWORKS) is available. Do you want to download it? Click Yes to download.” The “Yes” button is highlighted in blue and the “No” button is grey. The background faintly shows part of the Windows 11 desktop wallpaper. This image captures the automatic update prompt for the PDMPublisher add-in when launching SOLIDWORKS.](https://bluebyte.biz/wp-content/uploads/2025/05/image-3.png) Preparing deliverables from SOLIDWORKS drawings often turns into a pile of repetitive steps. Exporting PDFs, generating DXFs, organizing files, and adding production notes can easily drain hours from an engineer’s day. [PDMPublisher for SOLIDWORKS](https://bluebyte.biz/product/pdmpublisher-solidworks-large-teams/) takes that grind out of the workflow by automating the entire export process, making it quicker, more consistent, and far less prone to mistakes. ## From PDM Success to SOLIDWORKS Integration PDMPublisher started as a **task add-in for SOLIDWORKS PDM Professional**, where it quickly gained traction among manufacturers who needed to publish clean, production-ready documents automatically during workflow transitions. Due to growing demand, we’ve now brought the same powerful automation to **SOLIDWORKS as an add-in** — no PDM required. Whether you’re working inside SOLIDWORKS or within a vault-managed environment, PDMPublisher gives you complete control over how your documents are exported, merged, and delivered. ![PDMPublisher for SOLIDWORKS](https://bluebyte.biz/wp-content/uploads/2025/05/for-solidworks-1024x450.png) ## What Does PDMPublisher for SOLIDWORKS Do? PDMPublisher automates the generation and publishing of drawing deliverables. With a single click, you can export your SOLIDWORKS drawings to PDF, STEP, DXF, and other formats while inserting the data, notes, and quantities your production team needs. It also supports: - **Master PDF merging** for combining related sheets into a single file - **Title block stamping** with custom notes and production quantities - **Batch processing** of multiple files or configurations - **Smart file naming** based on metadata and rules ## Integration Highlights PDMPublisher for SOLIDWORKS doesn’t just automate export — it connects to your workflow: - **SOLIDWORKS PDM Professional** – Trigger publishing automatically on state change - **Microsoft SharePoint** – Publish to document libraries for wider access - **Windows File Servers** – Route files to folders for manufacturing, quality, or purchasing This flexibility ensures your deliverables land exactly where they’re needed — formatted correctly, and on time. ## Who Is It For? **PDMPublisher** is built for: - Engineering teams that generate high volumes of drawing outputs - SOLIDWORKS users needing DXF and [STEP files](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) for manufacturing - Organizations looking to automate and standardize deliverable publishing - PDM users looking for seamless integration into workflows Thousands of drawings are exported every day using PDMPublisher. Whether you’re an individual designer or part of a large engineering team, PDMPublisher helps you save time, reduce mistakes, and improve delivery consistency. **📥 [Get PDMPublisher](https://bluebyte.biz/product/pdmpublisher-solidworks/ "PDMPublisher (SOLIDWORKS)")** ## Pricing **License Type****Price (USD)****Notes**Perpetual LicenseContact usOne-time fee, unlimited useSubscription – 1 user$1,499 / yearFor individualsSubscription – 2–3 users$999 / year per userUse coupon code: `professional`Subscription – 4+ users$799 / year per userUse coupon code: `premium`Free VersionFreeLimited features: up to 5 documents, basic export--- ## About BLUE BYTE SYSTEMS INC. **Blue Byte Systems Inc.** is a software company based in Vancouver, Canada, specializing in SOLIDWORKS and PDM automation. Our tools help engineering teams optimize their workflows, eliminate repetitive tasks, and scale their operations through smart automation. **Categories:** SOLIDWORKS **Tags:** pdmpublisher --- ### [How to Configure the SOLIDWORKS PDM Bill of Materials for PDM2Excel](https://bluebyte.biz/solidworks/solidworkspdm/how-to-configure-the-solidworks-pdm-bill-of-materials-for-pdm2excel/) **Published:** June 28, 2025 **Author:** Amen Jlili **Content:** **[PDM2Excel ](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel ")is a task add-in for SOLIDWORKS PDM that allows you to automatically export Bills of Materials (BOMs) from PDM into formatted Excel files. It can be triggered manually or as part of a workflow, and it supports custom templates and computed columns.** *This guide explains how to configure the SOLIDWORKS PDM bill of materials for PDM2Excel so your BOM template works perfectly with the task. The goal is to ensure that the exported excel contains accurate quantities and expected metadata.* ## Step 1: Create or Edit the BOM Template Open the SOLIDWORKS PDM Administration Tool and expand the “Bills of Materials” section. Double-click an existing BOM template, or right-click and select “New Bill of Materials” to create one. [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-8-1024x676.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-8.png)Name the BOM template appropriately (for example: Engineering BOM) and set the type to “Bill of Materials”. Ensure the following columns are included: - - - - - Revision - **** ## Step 2: Use for Quantity It is critical that the column used for quantity is . This field shows the actual number of times a component is referenced in an assembly. **Do not use “”, as that is meant for weldment cut lists and does not behave correctly in standard BOM exports**. ## Step 3: Configure the Template in the PDM2Excel Task When creating or editing a PDM2Excel task in the Administration Tool, go to the Options tab and set the Template field to the BOM template you configured (e.g., Engineering BOM). This step is required. If no template is selected, the task will fail: [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-10-1024x1015.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-10.png)## Output In the output example below, we created a Parts Only [Bill Of Materials](https://bluebyte.biz/pdm2excel/pdm2excel-v7-new-support-for-structural-members-in-bill-of-materials-exports/) with two quantity columns, one using **** and the other using **** to illustrate the difference. Notice that **** has the quantities rolled from the parent assemblies. [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-11-1024x588.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-11.png)For questions or assistance, contact Blue Byte Systems Inc. at amen@bluebyte.biz **Categories:** BOM, SOLIDWORKS, SOLIDWORKSPDM **Tags:** bill of materials --- ### [Configuring Any SOLIDWORKS PDM Task (PDMPublisher)](https://bluebyte.biz/solidworks/solidworkspdm/configuring-any-solidworks-pdm-task-pdmpublisher/) **Published:** June 7, 2025 **Author:** Amen Jlili **Content:** SOLIDWORKS PDM tasks allow administrators to automate routine operations like file conversion, publishing, or printing, saving time and reducing errors across engineering teams. This article walks you through the process of configuring any SOLIDWORKS PDM task, using any compatible task add-in such as [PDMPublisher](http://pdmpublisher.com). Whether you’re exporting PDFs or triggering custom workflows, properly configuring a task ensures consistency, control, and efficiency across your vault. ## Step 1: Create the Task 1. Open the **Administration Tool**. 2. Right-click on **Tasks** and select **New Task…**. [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-3.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-3.png) 1. In the first page of the wizard, give your task a **unique name**. 2. Select the appropriate task add-in (e.g., **[PDMPublisher](https://docs.bluebyte.biz/src/propertiespagepdmpublisher.html)**) from the dropdown list: [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-4.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-4.png)## Step 2: Configure the Execution Environment On the **Execution Method** page: - Define which **computers** in your network are allowed to run the task. - If no computers are listed: - Right-click the **SOLIDWORKS PDM icon** in the Windows system tray: [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-5.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-5.png) - Select **Task Host Configuration**. - Ensure the task add-in (e.g., **PDMPublisher**) is **enabled**. ## Step 3: Configure Task Settings Depending on the add-in, you may see one or more configuration tabs. For **PDMPublisher**, configure the following: - [**Options** ](https://docs.bluebyte.biz/src/options.html)– Define output format(s), destination folders (SharePoint, PDM, or file system), and export rules. - [**Annotations** ](https://docs.bluebyte.biz/src/annotations.html)– Choose whether to include stamps, watermarks, or approval blocks. - [**Conditions** ](https://docs.bluebyte.biz/src/conditions.html)– Define when and where the task should be available (e.g., file types, workflow states). ## Step 4: Finalize Click **OK** to save the task. - The task will now appear in the **right-click menu** under **Tasks** in the vault’s File Explorer. [![](https://bluebyte.biz/wp-content/uploads/2025/06/image-2.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-2.png) ## Troubleshooting **Task Menu Not Visible?** If you don’t see the **Tasks** menu in File Explorer, it’s possible your user or group settings have disabled task access: 1. In the **Administration Tool**, open the **User Settings** for the affected user or group: [![Configuring Any SOLIDWORKS PDM Task](https://bluebyte.biz/wp-content/uploads/2025/06/image-1.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-1.png) **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [SOLIDWORKS PDM Add-In Registration Error – Failed to extract add-in from Class not registered](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/) **Published:** June 10, 2025 **Author:** Amen Jlili **Content:** [![SOLIDWORKS PDM Add-In Registration Error](https://bluebyte.biz/wp-content/uploads/2025/06/image-6.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-6.png) If you’re haunted by a persistent SOLIDWORKS PDM add-in registration error when loading your add-in, you are not alone. One of the most common causes of this issue is how the associated processes are launched, particularly when they are run with elevated permissions. ## The Root Cause SOLIDWORKS PDM can run from several processes, such as: - `sldworks.exe` (SOLIDWORKS) - `explorer.exe` (Windows Explorer) - `Inbox.exe` (PDM Inbox) - `Search.exe` (PDM Search) When any of these are launched **as Administrator**, they run with elevated privileges — a different User Access Control (UAC) level than normal. This mismatch causes unexpected behavior, one of which is the **failure to load PDM add-ins** correctly. Even if your [add-in DLL](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/) is built correctly and deployed properly, the add-in may simply not appear or fail silently when this UAC conflict exists. ## Solution 1: Run as a Local User (Not as Administrator) The most reliable fix is also the simplest: > **Always run SOLIDWORKS, Windows Explorer, or any PDM-related process as a standard user — not as Administrator.** If you’re using shortcuts or launch scripts, ensure they’re not set to “Run as administrator.” You can right-click the executable, go to **Properties > Compatibility**, and make sure “Run this program as an administrator” is **unchecked**. ## Solution 2: Clear Add-in Cache from Local App Data Another potential fix — especially when you’ve previously had add-in registration issues or made frequent changes during development — is to clear out the cached add-in data. Here’s how: 1. Open the following folder: `C:\Users\\AppData\Local\SolidWorks DPM\Plugins\` 2. Delete **everything** in that folder. These are just cached files and will regenerate when PDM starts up again. > ⚠️ Important: Be sure to close any PDM-related processes (like Windows Explorer or SOLIDWORKS) before clearing this folder. ## Still Stuck? We Can Help If you’re still running into issues or need professional help developing or debugging SOLIDWORKS PDM add-ins, feel free to reach out. At **Blue Byte Systems**, we specialize in advanced PDM automation and custom development. [Contact us](https://bluebyte.biz/contact) to learn more. **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [A Practical Guide to the SOLIDWORKS PDM API in 2026](https://bluebyte.biz/solidworks/solidworkspdm/a-practical-guide-to-the-solidworks-pdm-api-in-2026/) **Published:** November 15, 2025 **Author:** Amen Jlili **Content:** The [SOLIDWORKS PDM API ](https://help.solidworks.com/2026/English/api/pdmprowebapihelp/Welcome.html)is one of the most capable developer tools in the SOLIDWORKS ecosystem. It is built as a [Windows COM ](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal)object library. This architecture provides very deep access to the vault, workflows, variables, and the entire PDM client environment. Many developers expect a modern HTTP interface similar to typical cloud APIs. The PDM API works differently. It is stateful, local, and tightly integrated with the Windows process that runs the PDM client. [A good place to start with the SOLIDWORKS PDM API is the official documentation. Most API calls have examples in C#, VB.NET and VBA.](https://help.solidworks.com/2025/english/api/help_list.htm?id=4) ## A COM Object Model, Not a REST API Since the PDM API is COM-based, your application (If it is a .NET application) interacts with DLLs that are registered in Windows: [![SOLIDWORKS PDM API and The Primary Interop Assemblies (PIAs) are the compiled .NET references that allow you to communicate with the PDM client. They are the compiled version of the PDM API.](https://bluebyte.biz/wp-content/uploads/2025/11/image-4-1024x221.png "The Primary Interop Assemblies (PIAs) are the compiled .NET references that allows you to communicate with the PDM client. They are the compiled version of the PDM API.")](https://bluebyte.biz/wp-content/uploads/2025/11/image-4.png)The Primary Interop Assemblies (PIAs) are the compiled .NET references that allow you to communicate with the PDM client. They are the compiled version of the PDM API. From the context of VBA macros, the references are slightly different. When you install the PDM client, a reference called *PDMWorks Enterprise XXXX Type Library* is installed for you: [![Screenshot of the Microsoft Visual Basic for Applications (VBA) editor displaying the "Hello_Vault1 [Code]" project. The Project Explorer pane on the left shows the project structure with modules and SOLIDWORKS object references. The main code window, in dark theme, contains the subroutine "Sub main()" with three lines: "Set swApp = Application.SldWorks", "Set swFrame = swApp.frame()", and "handle = swFrame.GetHwnd". Overlaid in the center is the "References - Hello_Vault1" dialog box listing checked libraries, including Visual Basic for Applications, OLE Automation, SOLIDWORKS 2024 Type Library, SOLIDWORKS 2024 Constant Type Library, SOLIDWORKS 2024 Commands Type Library, and SOLIDWORKS Utilities 2024 Type Library (highlighted in blue), along with PDMWorks Enterprise 2024 Type Library. The dialog shows the file path "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS 2024\SC" and includes OK, Cancel, Browse, and Priority controls. The setup demonstrates configuring a VBA macro to interact with SOLIDWORKS and PDM (vault) through API references.](https://bluebyte.biz/wp-content/uploads/2025/11/image-5-1024x625.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-5.png) There are no HTTP requests, no token-based authentication, no JSON data formats, and no web callbacks. You communicate directly with PDM using COM interfaces such as: [IEdmVault5](https://help.solidworks.com/2023/english/api/epdmapi/EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmVault5.html)[IEdmFile5](https://help.solidworks.com/2023/english/api/epdmapi/EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmFile5.html) [IEdmFolder5](https://help.solidworks.com/2023/english/api/epdmapi/EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmFolder5.html) This gives developers immediate, high-performance access to metadata, folders, variables, references, and workflow information. Because the calls happen inside the PDM client session, they can respond instantly to events such as check-in, state change, add file, add folder, or card interactions. ## Which Programming Languages Work With the SOLIDWORKS PDM API Any language that supports [COM interop](https://bluebyte.biz/solidworks/the-solidworks-apis/) can be used. The most common today are: - VBA inside SOLIDWORKS - NET: - VB.NET - C# - C++ - PowerShell through COM interop Python can also be used, but only through external COM wrappers. ## Simple VBA Macro to Log Into a Vault Below is a simple VBA example that connects to a PDM Professional vault. This can be used inside a [SOLIDWORKS macro](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/) or Excel macro. ``` Dim vault As EdmVault5 Set vault = New EdmVault5 vault.Login "username", "password", "MyVaultName" If vault.IsLoggedIn Then MsgBox "Logged into the vault" End If ``` This is the most basic example but it shows how COM objects are created and used. ## PDM Convert Task [![Screenshot of the SOLIDWORKS PDM Add-ins management dialog in the administration tool, logged in as user "AssemBlagieddon (admin)". The left pane displays a tree view under "Add-ins" with multiple entries from Blue Byte Systems Inc., such as PDM2Excel, PDMDeploy, PDMMonday, PDMPublisher, PDMReminder, and RevisionSync. The "SWTaskAddin - 32050050 (SolidWorks Corporation)" entry, developed by Blue Byte Systems Inc., is highlighted with a red border. The right pane shows details for this selected add-in: Name "SOLIDWORKS Task Add-in", Company "SolidWorks Corporation", Add-in version "32050050", Requires version blank, Package "SWTaskAddin.CAF", and Description "Add-in used to run custom SOLIDWORKS macros". Tabs at the top include "Summary" (active), "Files", and "History". Buttons at the bottom are "OK", "Cancel", and "Help". The interface demonstrates selecting and viewing properties of the official SOLIDWORKS Task Add-in within the PDM environment.](https://bluebyte.biz/wp-content/uploads/2025/11/image-6-1024x445.png)](https://bluebyte.biz/wp-content/uploads/2025/11/image-6.png)SOLIDWORKS Task Add-in [![Screenshot of the "New Task - Properties" dialog in SOLIDWORKS PDM, showing the "Script" tab for configuring a file conversion task. The left pane highlights the "Script" section under "New Task" with a green checkmark. The main area displays a VBA script editor containing code to execute in SOLIDWORKS, including: Dim swApp As Object, On Error GoTo Fail:, Set FileSystemObj = CreateObject("Scripting.FileSystemObject"), docFileName = "", Get SW interface object, Set swApp = Application.SldWorks, swApp.Visible = True, Convert docFileName, and an error-handling "Fail" block that logs conversion errors with Err.Number and Err.Description. Below the script are dropdowns: "SOLIDWORKS version to use" set to "" and "Task user interface type" set to "File Conversion". Buttons at the bottom include "Insert Macro >", "< Back", "Next >", "OK", "Cancel", and "Help". The interface is used to define a PDM task that automates document conversion using a VBA macro in SOLIDWORKS.](https://bluebyte.biz/wp-content/uploads/2025/11/convert-task-script-page.png)](https://bluebyte.biz/wp-content/uploads/2025/11/convert-task-script-page.png)A task based on the SOLIDWORKS Task Add-in **PDM ships with the SOLIDWORKS Task Add-in. This add-in can be used to create tasks (Scripts that run on the user’s machine or delegated to other computers on the network). These tasks have scripting pages where administrators can add/edit the VBA logic of the task.** These types of scripts are commonly used in PDM tasks that generate PDF, DXF, or STEP documents. ## Developing With C# in .NET Most modern PDM development is done in C#. To use the PDM API, reference the assemblies mentioned above. A simple C# example to log into a vault looks like this: ``` IEdmVault5 vault = new EdmVault5(); vault.Login("username", "password", "MyVaultName"); if (vault.IsLoggedIn) { Console.WriteLine("Connected to the vault"); } ``` From there, developers typically work with interfaces like: IEdmFolder5 IEdmFile5 IEdmBatchGet IEdmBatchUpdate IEdmEnumeratorVariable5 These provide almost complete access to files, references, variables, and metadata. ## Types of Applications You Can Build Developers use the PDM API to create many types of solutions. The most common categories are shown below. **[PDM Add Ins](https://help.solidworks.com/2021/english/EnterprisePDM/Admin/t_installing_add-in.htm)** Runs directly inside the PDM client. Best for deep automations like revision control logic, approval logic, or multi-file processing. A great example of this is our [free column set customizer](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/ "Customise folders columns in PDM Professional"). [**PDM Tasks**](https://help.solidworks.com/2021/english/enterprisepdm/admin/c_print_plot_convert.htm)Automate file conversion, data extraction, printing, publishing, or scripted actions. Tasks run inside a controlled environment and support COM, .NET, and native add-ins. [PDMPublisher, a Blue Byte Systems Inc product, is another example.](https://pdmpublisher.com/pdm-professional/) **Desktop Utilities** Standalone EXE tools that use IEdmVault5 to log in and perform batch actions such as metadata cleanup or migration. Check out [PDMShell](https://pdmshell.com): our data management solution inside of SOLIDWORKS PDM. ## Learn the PDM API in Three Days With Blue Byte Systems If you want to master the PDM API quickly, [Blue Byte Systems offers a hands-on three-day training course that covers the full API stack](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/). You learn how to build real add-ins, tasks, macros, workflow hooks, batch tools, and event-driven automations. The course walks you through live examples and real vault scenarios so you can apply everything immediately in your environment. If you or your team would like details, you can reach out directly at amen@bluebyte.biz Get our free 50 PDM API Tips and Tricks eBook Get our free 50 PDM API Tips and Tricks eBook Layout Professional e-mail Name \* Professional e-mail \* Submit![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [Protect macros with a password - Valid for Excel and SOLIDWORKS](https://bluebyte.biz/macros/protect-macros-with-a-password/) **Published:** December 26, 2020 **Author:** Amen Jlili **Content:** Protect macros modules from viewing by adding a password from the *protection* tab at **Tools** > ***Macro Name* Properties**. While it’s a common to protect macros with a password, keep in mind that a passowrd-protcted macros security is very brittle and can be broken easily. For stronger protection, consider upgrading your code to a VB.NET add-in. --- **The content of this article is applicable to both SOLIDWORKS and Microsoft Office Excel, PowerPoint and Word.** Protecting macros with a password will prevent users from viewing the source code. You might want to go the extra mile to protect your macro’s from viewing for many reasons. For example you want to: - Protect the macro modules from being inadvertently edited by inexperienced users. - Lock the macro from viewing to avoid code exceptions being thrown. - Protect your intellectual property above all. This short article will show you how to lock a [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/) from being viewed, with a password. Users will continue to be able to run the macro but will not able to view the content of the macro’s modules. These steps are very straight-forward: - In the VBE Editor go to **Tools** > **Macro\_Name Properties**. If the macro is already protected with a password, this option might be greyed out. - In the **protection** tab : - Check **lock project for viewing**. - Add a password and then confirm it. - Save the macro to apply changes after that. [![Protect macros with a password](https://bluebyte.biz/wp-content/uploads/2020/12/image-7.png)](https://bluebyte.biz/wp-content/uploads/2020/12/image-7.png) ## Is My Macro Protected 100% of the Time? Unfortunately, protecting a macro with a password ***does not*** provide you with the ultimate security.[ For example, check this article on how to crack any password-protected VBA macro.](https://bluebyte.biz/macros/crack-any-solidworks-password-protected-macro-with-screenshots/) ## What to Do to Protect My Code? To conclude, the best thing to do is to upgrade your macro to SOLIDWORKS add-ins. In addition to our PDM implementation services, Blue Byte Systems, Inc. has a great wealth of experience upgrading old legacy VBA code to powerful .net Add-ins. [Contact us](https://bluebyte.biz/contact/) or schedule a quick zoom call [here](https://bluebyte.biz/contact/). **Categories:** macros --- ### [What is CDPDM and How Does it Work?](https://bluebyte.biz/solidworks/solidworkspdm/what-is-cdpdm-and-how-does-it-work/) **Published:** March 30, 2022 **Author:** Amen Jlili **Excerpt:** The auto-updater add-in is a tool developed by Blue Byte Systems, Inc. to streamline our code delivery process for our SOLIDWORKS PDM customers. **Content:** Managing SOLIDWORKS PDM add-ins can be a daunting task, especially when it comes to deploying updates or ensuring version control across your team. That’s where **CDPDM** (Continuous Delivery for PDM) from **Blue Byte Systems** comes into play. If you have ever wondered what is CDPDM, it is a solution designed specifically for **SOLIDWORKS PDM** users. CDPDM simplifies how you manage, update, and distribute your custom **PDM add-ins** and tasks, helping you save time and boost productivity. ## What is CDPDM? CDPDM is an innovative tool built to make the continuous delivery of your [SOLIDWORKS PDM add-ins](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-add-in-registration-error-failed-to-extract-add-in-from-path-class-not-registered/) seamless. With CDPDM, you no longer have to manually track each version of an add-in or struggle with installation across multiple systems. This tool automates the process, making it easier for [PDM administrators](https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/) to push updates and ensure that all team members are working with the latest versions of your custom add-ins. [![What is CDPDM?](https://bluebyte.biz/wp-content/uploads/2022/03/preview-1024x711.gif)](https://bluebyte.biz/wp-content/uploads/2022/03/preview.gif) ## Why Choose CDPDM? Whether you’re working on a small team or managing a large network of PDM users, keeping your add-ins up-to-date is critical. CDPDM offers: - **Automatic Add-In Updates**: Say goodbye to manual updates. CDPDM handles the entire process, ensuring your add-ins are always up-to-date without the need for repeated installations. - **Version Management**: Easily control which versions of your add-ins are deployed, reducing errors caused by version mismatches across your organization. - **PDM Optimization**: CDPDM is designed to work directly within your SOLIDWORKS PDM environment, streamlining workflows and minimizing downtime. - **Centralized Management**: All add-ins and their versions are managed from one place, making it easier to keep track of changes and updates. ## How Does CDPDM Work? CDPDM integrates directly into your **SOLIDWORKS PDM Professional** environment. Here’s a simple breakdown of how it works: 1. **Install CDPDM**: Download the CDPDM tool from your Blue Byte Systems account. Make sure to unblock the downloaded file (right-click > Properties > Unblock) before unzipping it. 2. **Load into PDM**: Use the PDM Administration tool to load the CDPDM add-in by going to `File > Open` and selecting the CDPDM `.cex` file. Drag and drop it into the **Add-ins** node to integrate it into your PDM system. 3. **Manage Add-Ins with Ease**: Once installed, CDPDM allows you to manage all your custom PDM add-ins from a single interface. Right-click the add-in and choose **Update Add-ins** to access the list of available add-ins, select the one you need, and install or update it effortlessly. 4. **Configure and Deploy**: Input your server credentials (your Blue Byte Systems account details), and you’re good to go. CDPDM will handle the rest, deploying the latest versions to all users as needed. 5. **Seamless Updates**: CDPDM automatically checks for new versions of your PDM add-ins and updates them without disrupting your workflow. All you need to do is restart your PDM session to sync the changes. ## Key Features of CDPDM - **Automatic Deployment**: No manual installs—just smooth, automated updates across your entire team. - **Multi-Version Support**: Manage and deploy different versions of your add-ins with a few clicks, ensuring compatibility and reducing errors. - **Centralized Control**: Manage all your PDM add-ins in one place, giving you total control over your deployment process. - **User-Friendly**: CDPDM is designed to be simple and intuitive, so even administrators with minimal technical knowledge can use it effectively. ## Why CDPDM is a Game Changer for SOLIDWORKS PDM Add-Ins For businesses using **SOLIDWORKS PDM**, CDPDM is a must-have tool. It cuts down the time spent on manual updates and reduces the risk of errors caused by outdated add-ins. By automating the delivery process, CDPDM ensures that everyone on your team is working with the most current versions of your add-ins, helping you maintain a smooth and efficient workflow. Plus, with the **centralized management** of add-ins, you don’t have to worry about tracking files or manually updating each user. CDPDM handles all of that for you, leaving you free to focus on what really matters—getting the job done. ## Start Simplifying Your PDM Add-Ins Today If you’re managing a **SOLIDWORKS PDM** environment and want to streamline your add-in deployment, **CDPDM** is the solution you’ve been waiting for. Say goodbye to manual installations and hello to automated, seamless updates with CDPDM from **Blue Byte Systems**. For more information or to get started, visit [Blue Byte Systems Documentation](https://docs.bluebyte.biz/src/cdpdm) and take the first step toward optimizing your PDM workflows with CDPDM. **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [Dark/Light theme: Sync your Windows 10 default app mode with SOLIDWORKS 3D](https://bluebyte.biz/solidworks/solidworks2022/dark-light-theme-sync-your-windows-10-default-app-mode-with-solidworks-3d/) **Published:** July 27, 2022 **Author:** Amen Jlili **Content:** SOLIDWORKS 3D offers users a dark and a light theme. To sync your Windows 10 default app mode with SOLIDWORKS 3D, you can use a custom add-in that automatically aligns the theme with your system settings. There is a setting in Windows 10 that automatically turn on or off theme selection in third-party applications. SOLIDWORKS does not use that feature so it’s about time we wrote an article to show how a custom add-in can automatically pick up that Windows setting. First, to turn on or off app theme mode, you need to : - Type theme in the Windows search bar and pick the first result. - Click on Colours on the sidebar, and you will get this window. ![](https://bluebyte.biz/wp-content/uploads/2022/07/image-9.png)Clicking light or dark under “Choose your default app mode” will switch the theme in your applications. A good example is Google Chrome. The source code of the add-in is available on our [GitHub](https://github.com/BlueByteSystemsInc/SOLIDWORKSWindowsAppModeSync). It’s made of two classes: – swAddIn.cs: This is the add-in class. – WindowsThemeManager.cs : This class listens for registry changes when the default app mode values. swAddIn.cs WindowsThemeManager.cs: **Categories:** SOLIDWORKS, SOLIDWORKS2022 --- ### [Virtual Machine Checklist for Your SOLIDWORKS PDM Large Data Transformation/Migration](https://bluebyte.biz/solidworks/solidworkspdm/virtual-machine-checklist-for-your-solidworks-pdm-large-data-transformation-migration/) **Published:** August 3, 2025 **Author:** Amen Jlili **Content:** [![Virtual Machine Checklist for Your SOLIDWORKS PDM Large Data Transformation and Screenshot of a Windows Remote Desktop session running SOLIDWORKS. In the foreground is a dark-themed PowerShell window titled "PDMSHELL" (PowerShell 7.4.0). The console displays a long log of a macro execution with timestamps (e.g., 09:31:29–13:07) and repeated messages such as: SLDDRW: Caching 7 references... SLDDRW: DLL macro ran successfully SLDDRW: Found 32 references... SLDDRW: Caching file (and references)... The log shows progressive file counts (7, 6, 32, 11, 14, 85, 58, 15, etc.) and ends with a command line: textPS C:\> .\runswmacro -filePath "PDMSHELLDLL.dll" -skip 3045 -list foundfiles.csv A note below reads: "The current operation is taking too long. You can cancel at any time." In the background, a SOLIDWORKS window is partially visible with the SOLIDWORKS logo and menu bar. The overall scene demonstrates a batch macro processing many SOLIDWORKS drawing files via PowerShell, logging caching and reference resolution in real time.](https://bluebyte.biz/wp-content/uploads/2025/08/Virtual-Machine-Checklist-for-Your-SOLIDWORKS-PDM-Large-Data-Transformation.webp)](https://bluebyte.biz/wp-content/uploads/2025/08/Virtual-Machine-Checklist-for-Your-SOLIDWORKS-PDM-Large-Data-Transformation.webp) Performing a large dataset transformation in **SOLIDWORKS PDM vault**—whether for cleaning up, updating existing drawings, or merging with a new vault—is not just a technical task; it’s a business-critical operation. At **Blue Byte Systems Inc.**, we’ve led many data migration projects and learned that success starts with a solid virtual machine setup. That’s why this virtual machine checklist for your SOLIDWORKS PDM large data transformation helps ensure IT infrastructure is properly prepared before any migration work begins If you’re planning a PDM migration, automation-based renaming, or metadata/files export, use this field-proven checklist to avoid costly disruptions and ensure a smooth process. ## System Configuration Start with a robust system foundation to avoid performance or permission issues: - **RAM**: Ensure the VM has **at least 16 GB of memory** ([as per SOLIDWORKS Corp system recommendations](https://www.solidworks.com/support/system-requirements)) to handle large datasets and API operations. - **Disable Windows Updates**: Prevent unexpected reboots or resource conflicts by turning off automatic updates. - **Enable Remote Access**: Turn on **RDP** so migration tasks can be managed remotely. - **User Privileges**: - Windows user must have **local administrator rights**. - PDM user must have **vault admin permissions**, including rights to check in/out, transition, rename, and update metadata. ## Environment Stability Unattended automation demands reliability: - [**Auto-Lock Disabled**: Turn off session lock and idle logout policies.](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/interactive-logon-machine-inactivity-limit) [Check this article](https://superuser.com/questions/1503161/how-can-i-stop-windows-vms-from-auto-screenlock-after-x-minutes). - **Sleep/Hibernate Disabled**: Prevent the VM from sleeping mid-process: [![](https://bluebyte.biz/wp-content/uploads/2025/08/image-1024x527.png)](https://bluebyte.biz/wp-content/uploads/2025/08/image.png) ## Exporting Files to Network Drives If part of your migration involves **exporting files to a shared directory**: - Ensure the Windows user has **write access** to the target network path (e.g. `\\network\pdm-migration\export`). - Prefer **UNC paths** over mapped drives to avoid inconsistencies across user sessions. ## SOLIDWORKS Setup (for API-Dependent Tools) Even PDM-focused tasks may rely on SOLIDWORKS for: - Extracting [custom properties](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/) - Processing derived drawings - Handling references Verify the environment: - SOLIDWORKS is **installed and the proper licenses for the type of installation can be borrowed**. - Required features like **Toolbox** are available. (Note: Toolbox is *not included* with SOLIDWORKS Standard.) - No blocking dialogs (e.g., missing add-ins, license popups). - Test with a basic macro to validate **API connectivity**. ## Renaming Files? Do This First If you’re **renaming files as part of the migration**—especially in batch using the API or scripts—**vault consistency is critical**. Before running the migration: - **Ensure all users are completely logged out** of the vault. - **Ensure all files are checked in**. No files should be checked out by anyone. - **Clear all local vault views** on user machines and secondary VMs. - Optionally, **temporarily disable user access** during the operation to prevent interference. Renaming in a live vault with active users or cached files can lead to **reference corruption**, **rename failures**, and **broken assemblies**. Don’t skip this step. ## Why This Checklist Matters PDM migrations are high-risk if not managed carefully. Misconfigured VMs, insufficient permissions, or unlocked files can turn a one-day export into a week-long recovery job. By following this checklist, you ensure: - A **stable, API-ready VM environment** - **No dialog interruptions** - **Data consistency** when renaming, exporting, or migrating - A smoother experience for both IT and engineering teams At **Blue Byte Systems Inc.**, we help companies automate, migrate, and modernize their SOLIDWORKS PDM environments with confidence. 📩 **Need expert guidance?** [🌐Schedule a discovery call or request a free vault readiness review today.](https://calendly.com/bluebyte/datamigration?back=1 "Contact") **Categories:** data migration, SOLIDWORKS, SOLIDWORKSPDM **Tags:** data migration, solidworks pdm --- ### [Building a Connector Between SOLIDWORKS PDM and PLM Systems](https://bluebyte.biz/solidworks/solidworkspdm/building-a-connector-between-solidworks-pdm-and-plm-systems/) **Published:** August 17, 2025 **Author:** Amen Jlili **Content:** Integrating SOLIDWORKS PDM (Product Data Management) with a PLM (Product Lifecycle Management) system is one of the most effective ways for companies to streamline their product development process. In fact, building a connector between SOLIDWORKS PDM and PLM systems helps bridge the gap between engineering and enterprise operations. While PDM ensures files and revisions are controlled locally, PLM provides enterprise-wide visibility, connecting engineering data to the wider business, including manufacturing, supply chain, and quality teams. The scope of a connector is not to replace either system, but to create a bridge that ensures the right information flows between them. Most companies do not require an exhaustive integration of every field or object instead, they typically need a few key workflows automated. ## What Most Companies Need Through our experience working with manufacturing and engineering firms, we’ve found that almost 90% of companies ask for the same three capabilities when planning a PDM-to-PLM connector: 1. **Automatic Part Number Creation** - Companies want the PLM system to generate part numbers and send them back to PDM to ensure consistency and prevent duplicates. 2. **Syncing of Data Card and Associated Files** - Metadata from PDM data cards (properties such as Description, Material, Project, etc.) must flow to the PLM. - If needed, associated files like PDF drawings or neutral CAD formats (STEP, IGES, etc.) are also sent automatically. 3. **Syncing of BOMs (Bills of Materials)** - The BOM structure, including quantities and rows, is synchronized into PLM. - This ensures manufacturing and planning teams always have the correct, up-to-date product structure. These three elements cover many use cases and represent the backbone of most PDM-to-PLM connectors. ## Triggers for Synchronization For a connector to be practical, it must support flexible triggers that [PDM administrators](https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/) can configure. Based on real-world requests, there are three primary trigger methods: 1. **Right-Click Menu Action** - Users can right-click a file (or multiple files) in PDM Explorer to trigger a one-direction sync from PDM to PLM. - This action can include both data card synchronization and BOM transfer. 2. **Data Card Button** - A button on the PDM data card provides a convenient way for users to manually push data from a single part or assembly to PLM without needing workflow transitions. 3. **Automatic Sync on Workflow Transition** - The most common requirement is syncing automatically when a file is released. - For example, when a CAD file moves to the “Released” state in PDM, the connector pushes the metadata, associated PDFs, and BOM into PLM without user intervention. This three-pronged approach balances user control with automation, making it easy for administrators to configure the right level of synchronization for their company. ## Saving Settings A PDM-to-PLM connector requires configuration, and one of the key considerations is how and where to save settings. - Credentials Only: Best practice is to store only the PLM login credentials in PDM. These credentials allow the connector to authenticate when pushing or pulling data. - Encryption: Credentials should always be encrypted before being saved in the vault or registry, ensuring they cannot be exposed if someone gains access to the server or database. In addition to credentials, variable mapping is a critical part of the setup: - Variable Mapping: The connector needs to know how PDM data card variables map to PLM attributes. For example: - PDM Variable: Description → PLM Field: Part Description - PDM Variable: Material → PLM Field: Material - PDM Variable: Project → PLM Field: Project Code - Flexible Configuration: This mapping should be configured by administrators through a settings page or XML/JSON file, allowing them to adjust fields without modifying the connector itself. - Consistency: Mapping ensures that the right metadata flows correctly between systems and that BOM rows remain aligned with the part attributes in PLM. By keeping settings lightweight encrypted credentials plus variable mappings companies ensure the connector is secure, adaptable, and easy to maintain. ## Technical Requirements At a technical level, the PLM system must expose a method for receiving data. The most straightforward option is a REST API: - REST API: While not mandatory, a modern REST interface makes the integration cleaner and easier to maintain. It allows the connector to send and receive JSON payloads for part creation, metadata updates, and BOM structures. - Alternative Options: For PLMs without REST APIs, connectors may rely on file-based exchanges (CSV, XML) or SOAP web services, though these approaches are more brittle and harder to maintain. Ultimately, while workarounds exist, the presence of a well-documented REST API significantly reduces development cost and improves long-term reliability. ## **Conclusion** Creating a connector between SOLIDWORKS PDM and a PLM system is less about building an all-encompassing integration and more about solving a handful of core use cases. Nearly every company benefits from building a connector between SOLIDWORKS PDM and PLM systems that supports: - Automatic part number generation - Syncing metadata, PDFs, and associated files - Syncing BOM structures and quantities When paired with flexible triggers (manual or automatic) and secure settings management (encrypted credentials + variable mapping), these features ensure smooth collaboration between engineering and the rest of the business. At the technical level, a REST API is strongly recommended, but not strictly required, to implement a reliable connector. --- ## About Blue Byte Systems Inc. Blue Byte Systems Inc. is a Canadian software company specializing in SOLIDWORKS API and [PDM automation](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-stop-using-file-names-in-pdm-automation-heres-why-ids-are-better/). With over a decade of experience, we have built tools and connectors that help engineering teams eliminate manual steps and keep their data in sync across platforms. Our solutions, including [PDMShell](https://bluebyte.biz/product/pdmshell/ "PDMShell"), [PDMPublisher](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher"), and [PDM2Excel](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel"), are trusted by companies worldwide to streamline workflows and improve efficiency. Whether you need a custom connector to your PLM or a turnkey automation solution, Blue Byte Systems delivers software that puts engineers back in control of their time. **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [A Tetris Game in SolidWorks VBA Macro](https://bluebyte.biz/macros/a-tetris-game-in-solidworks-vba-macro/) **Published:** February 15, 2025 **Author:** Amen Jlili **Content:** ***TLDR: You can download a tetris game in SOLIDWORKS VBA macro by providing your email address. Here are the instructions to play***: - **Open a new part in SOLIDWORKS.** - **Load the macro (make sure to run the main subroutine)** - **Click on the top button to build the board. This might take a few moments.** - **Click on start to begin playing.** In this article, we’re diving into how you can create the iconic Tetris game in SOLIDWORKS using a [custom VBA macro](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/). I’m calling this project *SOLIDWORKS Tetris*, and it’s a fun way to combine gaming with CAD modeling. Using SOLIDWORKS’ API, I’ve managed to recreate the classic Tetris mechanics: falling blocks, collision detection, rotating pieces, clearing lines, and even an online high-score system. Here’s a breakdown of how I built *SOLIDWORKS Tetris* and how you can make your own version too! ## Getting Started The first thing you’ll want to do is set up the board. Using SOLIDWORKS, we create a grid of cubes, each one representing a block in the game. The grid is 10 columns wide and 20 rows high, just like the original Tetris game. We use SOLIDWORKS to generate small cubes and position them in the grid, creating the visual representation of the game space. ## Creating the Tetris Shapes Next, we define the seven standard Tetris shapes. Each shape has different rotations, and we store these rotations in an array. You’ve got the classic shapes like the **I**, **O**, and **T** blocks, and these are represented by four blocks each, rotating in different ways. - **I Shape**: Four blocks in a line, with two possible rotations. - **O Shape**: A 2×2 square that doesn’t rotate. - **T Shape**: A T-shaped block that can rotate in four ways. I’ve set up a few of these shapes, but you can add the rest (S, Z, J, L) as well! ## Collision Detection Collision detection is a big part of Tetris, and we need to make sure the pieces don’t overlap or move outside the grid. I check for collisions whenever a piece moves or rotates. The game will stop the piece from moving if it’s out of bounds or collides with another piece already on the board. ## Rendering and Moving the Pieces Once the pieces are defined, it’s time to make them move! Each piece starts at the top of the board, and you control it using the arrow keys on your keyboard. I use the `GetAsyncKeyState` function to capture the input and move or rotate the piece accordingly. As the pieces fall, I check for collisions each time the piece moves. If the piece hits the bottom or another block, it locks into place, and a new piece appears at the top. ## Clearing Lines and Scoring When a line is completely filled, it gets cleared, and all the blocks above it drop down. I keep track of the score, giving you points every time you clear a line. The more lines you clear, the higher your score! ## Game Loop The game runs in a loop where: - A random piece is chosen and starts falling. - The piece falls until it either collides with another block or reaches the bottom. - Once the piece locks in place, a new piece is generated. - The game checks for complete lines, clears them, and updates your score. As you play, the game speeds up, making it more challenging over time! ## User Input To control the pieces, you simply use the arrow keys: - **Left/Right Arrows**: Move the piece horizontally. - **Up Arrow**: Rotate the piece. - **Down Arrow**: Speed up the piece’s descent. ## High Score System I added a high-score system to make the game more competitive. After each game, your score is saved online, and you can check out the top scores. You’ll even get a global leaderboard to see how you rank! You can also see the top scores within your company by sharing a unique company ID, making it a fun challenge among coworkers. ## Get the Source Code If you want to dive deeper into *SOLIDWORKS Tetris* and access the source code, it’s available when you purchase the[ **SOLIDWORKS API course bundle**](https://bluebyte.biz/become-a-solidworks-api-developer/ "Become a SOLIDWORKS API Developer") from Blue Byte Systems Inc. This course bundle will teach you how to harness the power of the SOLIDWORKS API for projects like this and many more! ## Wrapping Up Building *SOLIDWORKS Tetris* was a fun and creative project. It combines the logic of game development with the power of SOLIDWORKS’ API to create something completely unique. Whether you’re a SOLIDWORKS user, a game enthusiast, or just someone looking for a cool project, this is a great way to get hands-on with SOLIDWORKS and the API. ## Get Tetris Below Name \*First Last Email Company Name Email \*Professional email required. Company GET TETRIS![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) **Categories:** macros --- ### [SOLIDWORKS PDM: Enhancing PDF Output with Annotations and Dynamic Folder Creation in PDMPublisher](https://bluebyte.biz/solidworks/solidworkspdm/solidworks-pdm-enhancing-pdf-output-with-annotations-and-dynamic-folder-creation-in-pdmpublisher/) **Published:** October 6, 2024 **Author:** Amen Jlili **Content:** [PDMPublisher](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher") is a powerful SOLIDWORKS PDM add-in that revolutionizes how you manage and print documents from your assemblies. One standout feature of PDM Publisher is its **Annotations** capability, which allows users to insert notes at specific locations in the printed PDFs. This functionality enhances the utility of the printed documents and provides a level of customization that is invaluable for engineers and designers. Enhancing PDF output with annotations and dynamic folder creation in PDMPublisher gives users even more control, ensuring printed files are organized and detailed exactly the way the project demands. [![Enhancing PDF Output with Annotations and Dynamic Folder Creation in PDMPublisher](https://bluebyte.biz/wp-content/uploads/2024/10/THUMBNAIL.png)](https://bluebyte.biz/wp-content/uploads/2024/10/THUMBNAIL.png) ## Customizing Annotations With the Annotation feature, you can seamlessly mix static text with dynamic variables that evaluate to specific values from your [PDM files](https://bluebyte.biz/transition-pdm-file-as-administrator/). This means that your notes can contain real-time data, making your PDFs more informative and relevant. For example, you can include variables such as part names, revision numbers, and other essential details directly within the notes. This is particularly useful in collaborative environments where updated information is crucial. ## Evaluation Function Explained The evaluation process utilizes a dedicated method that parses a specified pattern and replaces designated placeholders with actual values. Here’s a breakdown of how it works: - **Variable Handling**: The function checks if the provided pattern contains any placeholders, indicated by `$`. It then retrieves the corresponding variable value from the PDM file. - **Alias Mapping**: The function supports various aliases, such as file name, configuration name, and version. These are mapped to their respective properties, allowing for easy integration into your annotations. - **Error Handling**: The code includes error handling to ensure that any issues encountered during variable retrieval do not disrupt the flow of the application. ## Available Options for Dynamic Variables The evaluation function supports several options that can be used in the annotation text: - **FileNameWithoutExtension**: Retrieves the file name without its extension. - **FileName**: Retrieves the full file name. - **ConfigurationName**: Returns the current configuration name. - **State**: Gets the current state of the file. - **LaunchingUser**: Fetches the name of the user ***launching*** the task. - **User**: Fetches the name of the user that is ***executing*** the task. - **Date**: Inserts the current date in your locale format. - **Revision**: Returns the current revision of the file. - **Extension**: Retrieves the file extension. - **TargetExtension**: Fetches the target extension. - **TopAssemblyFolder**: Provides the top-level assembly folder path. - **FileFolder**: Retrieves the folder path of the file. These options give you the flexibility to customize your annotations extensively, ensuring that all pertinent information is captured in your printed documents. ## Dynamic Output Path Creation In addition to annotations, PDM Publisher allows users to utilize special variables as part of the output path for saved documents. If the specified directory does not exist, PDM Publisher will automatically create it. This feature can be leveraged to organize your files systematically by using dynamic variables such as: - **Launching Username**: Create folders based on who initiated the action, making it easy to track contributions from different team members. - **State of the File**: Sort files into directories based on their current state, streamlining the review and approval process. - **Data Card Variables**: Use values from the data card to generate folders, ensuring that all related documents are neatly categorized and easily accessible. By implementing these features, PDM Publisher enhances document management and workflow efficiency, providing a robust solution for engineering teams. **Categories:** SOLIDWORKSPDM --- ### [A PDM race condition: When Saving Directly Causes Issues](https://bluebyte.biz/macros/a-pdm-race-condition-how-your-code-might-wrestle-with-pdm-when-saving-files-directly-to-the-vault-and-what-to-do-about-it/) **Published:** July 4, 2022 **Author:** Amen Jlili **Excerpt:** How to handle race conditions between SOLIDWORKS and PDM API. **Content:** A PDM race condition may occur when two instructions are executed at the same time. The output gets determined by which instruction finishs first. Usually, this produces inconsistent results and behaviours. The following instruction will always depend on having a consistent output from the previous one to execute correctly, and that’s what makes a race condition hard to fix. There is quite a bit of concurrency to deal with. There are some interesting race conditions that can occur between SOLIDWORKS and PDM Professional. I’m going to explain one in this article. Assume you have a giant file (+100 MB) you’re saving to PDM. Conventional wisdom says that you save the file directly to the vault and you use IEdmFolder5::AddFile to add the file. This is wonderful, and it works **well** if the file’s extension **is not** part of the Adding Files option below. ![A PDM race condition](https://bluebyte.biz/wp-content/uploads/2022/07/image-1024x795.png)The PDM client is constantly watching for files with those extensions to appear in the [local cache](https://bluebyte.biz/solidworks/solidworkspdm/virtual-machine-checklist-for-your-solidworks-pdm-large-data-transformation-migration/) so it can add them to the vault. This feature is arguably a good and a bad one at the same time. From the user’s perspective, it saves them time having to right-click on files and click Add To Vault. It works well for sld extensions (sldprt, sldasm and slddrw). From the API perspective, however, it creates a race condition with [IEdmFolder5::AddFile](https://help.solidworks.com/2014/english/api/epdmapi/epdm.interop.epdm~epdm.interop.epdm.iedmfolder5~addfile.html) if this API call is used right after the file is created in the local cache (by IModelDoc2::Save for example). If PDM auto-adds the file first, [IEdmFolder5::AddFile](https://help.solidworks.com/2014/english/api/epdmapi/epdm.interop.epdm~epdm.interop.epdm.iedmfolder5~addfile.html) will re-add the file to the vault causing unnecessary copying. The final output of that race condition would look something like this: ![A Windows File Explorer window showing the folder path "C:\SOLIDWORKSPDM\Bluebyte\testfolder". The folder contains two files: "Copy of testpart.sldprt" (25 KB, SOLIDWORKS Part Document, checked out by Admin) and "testpart.SLDPRT" (25 KB, SOLIDWORKS Part Document). Both files are listed with standard file icons, and the navigation bar at the top displays the full directory path. The view is set to Details mode with columns for Name, Checked Out By, Size, Type, and Description.](https://bluebyte.biz/wp-content/uploads/2022/07/image-1.png)## Any good solutions, eh? There are a couple of solutions to remedy this issue. We’re going to list a couple of them below. - We can stop using IEdmFolder5:AddFile in favour of PDM adding the file on its own. We still need to get the IEdmFile5 object so we can check the file in (for example). Using IEdmVault5::GetFileFromPath is likely to fail because of the race condition. Instead, we can IEdmVault5::TryGetFileFromPath which has a timeout. We can set the timeout to 30 seconds which more than enough for the file to be added. [IEdmVault5::TryGetFileFromPath](http://IEdmVault5::TryGetFileFromPath) is an extension method from [BlueByte.SOLIDWORKS.PDMProfessional.Extensions](https://www.nuget.org/packages/BlueByte.SOLIDWORKS.PDMProfessional.Extensions/2021.0.28) a nuget package of useful code for PDM. Unfortunately, this solution does not work if the file takes longer than 30 seconds to be added by PDM. - The other approach is to temporarily disable the auto-add feature in PDM. Unfortunately, there is no API call to perform this and frrom my interactions with API support, it doesn’t look like this option will be added. ![Screenshot of an email from "apisupport@solidworks.com" sent Wed, Jun 22, 1:55 AM (12 days ago). The subject line is blacked out. The email begins with "Hello Amen," followed by the message: "The vault view is an ActiveX control that is embedded inside the windows explorer. So, when the users are saving the file to this location they are saving it to the disk directly. So, blocking it via flag as you are suggesting is not a good idea." The final sentence is highlighted in yellow for emphasis.](https://bluebyte.biz/wp-content/uploads/2022/07/image-2-1024x253.png)- **The best solution is to save the file to a temporary location (C:\\Temp for example) and then use IEdmFolder5::AddFile5 to add the file back into PDM.** ## Can I reproduce this issue? You can replicate it with this example on our [GitHub](https://github.com/BlueByteSystemsInc/PDMSaveRaceCondition). ## What’s next? This article explores one of many race condition examples between PDM API and SOLIDWORKS API and there are more. If you are struggling with one, sometimes bringing experts to make your PDM workflow more efficient can save you valuable time and internal resources. [Book a FREE SOLIDWORKS or PDM API consultation](https://bluebyte.biz/contact/) **Categories:** macros --- ### [SOLIDWORKS PDM API TIP: Stop Using File Names in PDM Automation – Here’s Why IDs Are Better](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-stop-using-file-names-in-pdm-automation-heres-why-ids-are-better/) **Published:** March 17, 2025 **Author:** Amen Jlili **Content:** When developing automation tools or add-ins for SOLIDWORKS PDM, one of the most common mistakes I see is relying on file paths or names to identify objects. Stop using file names in PDM automation because, at first glance, it seems logical—after all, files have names, right? But here’s the problem: **file names and paths are fragile.** Users can (and will) rename files, move folders, or reorganize entire directories. The moment that happens, your automation breaks. ## Enter Immutable IDs SOLIDWORKS PDM assigns **a unique, immutable ID** to every object—files, folders, data cards, you name it. These IDs never change, no matter what the user does. By using these IDs in your scripts and add-ins: - You avoid errors caused by renamed or moved files. - Your code becomes more **stable** and **resilient**. - You save time troubleshooting broken automations. ## Real-World Example Let’s say your script updates a [custom property](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/) on all files in a certain folder. If you use the folder path and someone moves it, your script won’t find it. If you use the folder’s ID, it works *no matter where it lives*. ## The Takeaway **Best practice**: Always use IDs to identify objects in SOLIDWORKS PDM. Paths and names are for humans. IDs are for automation. **Categories:** PDM API Tips --- ### [SOLIDWORKS PDM TIP: Creating Submenus in SOLIDWORKS PDM with IEdmCmdMgr5::AddCmd](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-tip-creating-submenus-in-solidworks-pdm-with-iedmcmdmgr5addcmd/) **Published:** April 23, 2025 **Author:** Amen Jlili **Content:** ![Creating Submenus in SOLIDWORKS PDM](https://bluebyte.biz/wp-content/uploads/2025/04/image-3.png) If you’re developing custom add-ins or commands for SOLIDWORKS PDM, you may want to improve the user experience by organizing your commands into submenus. This approach is central to creating submenus in SOLIDWORKS PDM, ensuring a more professional and structured interface. As you add more commands, a cluttered context menu can quickly become overwhelming, so grouping related commands under a parent label keeps the interface clean and intuitive. ## How to Create a Submenu To create a submenu, use the double backslash (`\\` in C# if not escaped) separator in the menu name when registering your command with `AddCmd`. ### Example ``` poCmdMgr.AddCmd(15065, "ParentMenu\\ChildMenu", 43, string.Empty, string.Empty, -1, 0); ``` This code registers a new command under: `Right-click > ParentMenu > ChildMenu` ## Important Notes 1. **Context Menu Only** Submenus created this way will **only appear in the right-click (context menu)** in Windows File Explorer. 2. **No Modification of Built-In Menus** You **cannot** add your submenu to any of [SOLIDWORKS PDM](https://bluebyte.biz/service/solidworks-pdm-data-migration/)’s existing menus or built-in add-ins. This technique is reserved strictly for custom commands. 3. Use submenus to: - Group related automation tools - Separate user vs admin functions - Clean up large sets of utility commands Need help building PDM tools or structuring your add-ins? [Reach out to Blue Byte Systems Inc.](https://bluebyte.biz) — we specialize in SOLIDWORKS PDM automation and custom development. **Categories:** PDM API Tips --- ### [SOLIDWORKS PDM API Tip 16: Why IEdmFile5::IsLocked Requires a Call to Refresh()](https://bluebyte.biz/pdm-api-tips/solidworks-pdm-api-tip-16-why-iedmfile5islocked-requires-a-call-to-refresh/) **Published:** April 18, 2025 **Author:** Amen Jlili **Content:** When working with the SOLIDWORKS PDM API, it’s important to understand how the system handles state and caching. One frequently misunderstood property is `IEdmFile5::IsLocked`. Understanding why `IEdmFile5::IsLocked` requires a call to refresh() is crucial, as while it appears straightforward, it doesn’t behave like properties in reactive UI frameworks such as WPF, and this can lead to subtle but critical issues in automation and add-in development. ## Understanding CLR Properties in the PDM API In environments like WPF, dependency properties offer real-time synchronization with the underlying data model. Any change is automatically reflected in the property value. This is not the case with the PDM API. Properties like `IEdmFile5::IsLocked` are standard **CLR properties**. These properties do not auto-update when changes occur in the vault. Instead, they rely on cached data at the time the `IEdmFile5` object was retrieved or last refreshed. ## What This Means for Developers `IsLocked` will not reflect the actual current lock state of a file if that state has changed since the last time the file object was refreshed. This commonly occurs in scenarios such as: - A file is locked or unlocked by another user - A workflow transition unlocks a file - An external operation changes the file status In these cases, reading the `IsLocked` property without refreshing the object will return outdated information. ## Correct Usage To ensure you’re working with current data, always call `IEdmFile5::Refresh()` before accessing lock-related properties: ``` IEdmFile5 file = ...; file.Refresh(); bool isLocked = file.IsLocked; ``` This forces the object to synchronize with the current state of the vault, ensuring `IsLocked` reflects the latest status. ## When to Use `Refresh()` Besides `IsLocked`, other properties that depend on current vault state also benefit from a refresh call: - `CurrentState` - `CurrentVersion` In general, any time you suspect that external operations may have changed the state of a file, refreshing before reading is a safe and recommended approach. ## Conclusion The [SOLIDWORKS PDM API](https://bluebyte.biz/pdm-api-tips/things-you-can-now-with-the-solidworks-pdm-api-from-2022-theyre-pretty-cool/) does not use reactive or event-driven state tracking. It’s up to the developer to ensure that objects are up to date before relying on their state. Understanding why IEdmFile5::IsLocked requires a call to refresh() helps developers prevent inconsistent behavior and significantly reduce debugging time in complex workflows or automation scenarios. **Categories:** PDM API Tips --- ### [A Comprehensive Guide to SOLIDWORKS Table Types: Optimize Your Design Workflow](https://bluebyte.biz/solidworks/a-comprehensive-guide-to-solidworks-table-types-optimize-your-design-workflow/) **Published:** September 9, 2024 **Author:** Amen Jlili **Content:** Tables are a powerful feature in SOLIDWORKS, allowing you to efficiently organize and display essential information such as Bill of Materials (BOMs), revision histories, hole data, and more. In this guide, we’ll explore the most commonly used SOLIDWORKS table types and how they can streamline your design workflow for better accuracy and productivity. ## What are SOLIDWORKS Tables? SOLIDWORKS tables are built-in features that allow users to manage, organize, and display design data in an easy-to-read format. They help with documenting product details, managing configurations, and reducing errors in the manufacturing process. Here’s a breakdown of the most popular table types in SOLIDWORKS and how they can enhance your design workflow. ## 1. Bill of Materials (BOM) Table ![SOLIDWORKS Table Types](https://bluebyte.biz/wp-content/uploads/2024/09/image-1024x576.png) The **Bill of Materials (BOM)** table is one of the most essential tools for assembly management in SOLIDWORKS. It lists all components, part numbers, quantities, and descriptions for a specific assembly. A well-organized BOM ensures all required parts are accounted for during the manufacturing process. ### Key Benefits - Automatically updates when components in the assembly change. - Customizable to include only the information you need, like part numbers and descriptions. - Can be exported to formats like CSV or Excel for easy sharing with other teams, such as purchasing or production. ## 2. Revision Table ![Revision Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-1.png)Tracking changes is critical, especially in collaborative environments. A **Revision Table** helps you manage design updates by displaying details like revision number, date, and description of changes. This table ensures everyone is aware of the latest modifications, reducing the risk of miscommunication or outdated designs. ### Key Benefits: - Automatically records and updates revision history. - Customizable columns for additional information like approval names. - Integrates seamlessly into company-specific workflows and documentation standards. ## 3. General Table The **General Table** in SOLIDWORKS is highly customizable and can be used for any type of data you need to track or present. Unlike predefined tables like BOMs or revision tables, general tables allow you to structure and manage custom data efficiently. ### Key Benefits - Fully customizable, making it suitable for non-standard information. - Allows flexibility in formatting and data presentation. - Can be used for tracking specific project metrics or custom data points. ## 4. Hole Table ![Hole Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-2.png) A **Hole Table** in SOLIDWORKS is a must-have for managing and documenting hole data in parts and assemblies. It provides detailed information such as hole size, type, and location, helping manufacturers accurately produce the part. ### Key Benefits: - Automatically detects and lists all holes in the part or assembly. - Displays hole coordinates based on a reference point for easy manufacturing. - Reduces errors during production by offering clear, precise documentation. ## 5. Weldment Cut List Table ![Weldment Cut List Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-3.png) For managing weldments, the **Weldment Cut List Table** is indispensable. It provides details such as material, length, and quantity for each [structural member](https://bluebyte.biz/pdm2excel/pdm2excel-v7-new-support-for-structural-members-in-bill-of-materials-exports/) in a weldment. This table ensures accurate cutting and assembly, making it easier to manufacture complex structures. ### Key Benefits - Automatically generates a cut list based on the design. - Dynamically updates with changes to the weldment. - Ensures accurate information for manufacturing, including material and dimensions. ## 6. Bend Table ![Bend Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-4.png) The **Bend Table** is specifically designed for sheet metal parts in SOLIDWORKS, helping you track and document bends. It includes important details like bend allowance, bend radius, and direction, ensuring precision during sheet metal fabrication. ### Key Benefits - Automatically calculates bend information based on the design. - Customizable to match specific manufacturing requirements. - Prevents mistakes in the bending process by providing detailed instructions. ## 7. Punch Table ![Punch Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-5.png) The **Punch Table** is another valuable tool for sheet metal parts. It lists all punch features along with their locations and dimensions, helping manufacturers ensure that punches are accurately placed during fabrication. ### Key Benefits - Automatically generates punch data for your parts. - Provides coordinates for punch placement. - Reduces errors in punch operations during production. ## 8. Weld Table ![Weld Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-7.png) The **Weld Table** documents all the welds in your design, providing critical information like bead size, length, and material. This table is essential for communicating welding requirements to fabricators. ### Key Benefits - Provides detailed welding instructions, including material and bead size. - Ensures that welds are correctly implemented during manufacturing. - Reduces ambiguity in welding processes for better quality control. ## 9. Hole Callout Table ![Hole Callout Table](https://bluebyte.biz/wp-content/uploads/2024/09/image-10.png) The **Hole Callout Table** is specifically designed for providing clear, detailed callouts of hole features in a part or assembly. It ensures accurate communication of hole specifications to manufacturers. ### Key Benefits - Automatically extracts and displays hole information. - Provides clear, concise callouts for easy reference. - Enhances manufacturing accuracy by ensuring all hole details are clearly documented. All of these SOLIDWORKS table types, including Bill of Materials (BOM), Revision Tables, and Design Tables, can be automated using the SOLIDWORKS API. By automating table creation and management, you can save time, reduce errors, and streamline your design process. If you’re looking to implement SOLIDWORKS table automation or need custom solutions for your design workflow, feel free to [contact us](https://bluebyte.biz/contact/) at Blue Byte Systems Inc. Our team of experts is here to help you maximize the potential of the SOLIDWORKS API. **Categories:** SOLIDWORKS --- ### [Why I Still Love SOLIDWORKS PDM Tasks (And What Needs to Change)](https://bluebyte.biz/solidworks/solidworkspdm/why-i-still-love-solidworks-pdm-tasks-and-what-needs-to-change/) **Published:** July 29, 2025 **Author:** Amen Jlili **Content:** Let me start by saying this: **I love SOLIDWORKS PDM tasks.** And I know many people will disagree with that statement. Yes, we’re inevitably moving toward cloud-based solutions—and that’s a good thing—but small changes can still go a long way in improving an application that hasn’t seen substantial UI or UX updates in years. [![Love SOLIDWORKS PDM Tasks](https://bluebyte.biz/wp-content/uploads/2025/07/image-6.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-6.png) As a SOLIDWORKS PDM developer, I’ve spent the last **five years** building custom add-ins, task scripts, and automation solutions for customers across a variety of industries. I’ve even developed a framework—**[PDMSDK](https://pdmsdk.bluebyte.biz)**—to help developers get started with PDM add-in development quickly and consistently. After half a decade of building the same types of solutions, I’d like to share some constructive feedback—things I genuinely hope Dassault Systèmes considers improving around the PDM **task framework**. ## **TaskDetails Dialog** [![TaskDetails Dialog](https://bluebyte.biz/wp-content/uploads/2025/07/image-2.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-2.png) The **Task Details** window is used to show the result of a task execution—such as exporting a BOM or converting a file. You can access it by: - Right-clicking a failed task in the **Task List** - Selecting **Task Details** Unfortunately, the current implementation has some frustrating limitations: **❌ Current Pain Points:** - The window does **not resize properly** - Error messages are often **cut off**, especially long ones - There is **no clear distinction** between PDM errors and custom add-in errors - The **OK** and **Help** buttons are **not anchored**—they remain static regardless of resizing **✅ Suggested Improvements:** - Make the window resizable - Set `FormBorderStyle = Sizable` - Apply a minimum size (e.g., 500×400) - Anchor controls properly so they adjust with the window - Use **multi-line, scrollable text boxes** for errors and logs - Group metadata fields clearly: Started by, Executed by, Start Time, End Time - Use clear **section headers** and **consistent alignment** for labels and values - Add **keyboard navigation support** (Tab, Enter) - Add a **“Copy to Clipboard”** button for error messages 🌐 **Bonus Suggestion: Developer-Friendly Help** Enhance the **Help** button by allowing developers to redirect users to a **custom help page**, using the existing `IEdmTaskInstance.SetStatus` method to capture the help page URL. This could link to internal documentation, support articles, or troubleshooting guides—far more helpful than the generic SOLIDWORKS documentation that many users are currently redirected to. ## Task List This is the admin’s go-to view for tracking scheduled and completed tasks. Currently, it’s only available through the **PDM Administration tool**. **❌ Usability Friction:** Accessing the task list involves: 1. Searching for **PDM Administration** in the Start Menu 2. Launching the tool 3. Logging in to the vault (every time) 4. Navigating to the **Task List** That’s **at least 4 clicks** and **multiple credential fields**—just to view task history. For admins who check this daily, this feels excessive. **✅ Suggested Improvements:** - **Add Task List access to the vault tray icon** (`edmserver.exe` / blueberry icon) [![Add Task List access to the vault tray icon](https://bluebyte.biz/wp-content/uploads/2025/07/image-8.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-8.png) - When a task **succeeds**, clear any residual error messages. The error message *The method was executed successfully* does not make any sense: [![Error Message](https://bluebyte.biz/wp-content/uploads/2025/07/image-3.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-3.png) - Add a **search box** in the completed and pending tasks lists - Add a column for the **filename or folder** the task was run on [![Completed Tasks](https://bluebyte.biz/wp-content/uploads/2025/07/image-10-1024x192.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-10.png)## The **Task Setup Dialog** The Task Setup interface is generally well designed, but there are a few important areas where improvements could go a long way, especially for **custom task developers**. **❌ Pain Points:** The dialog has a fixed width and height. While this is acceptable for built-in tasks provided by SOLIDWORKS, the available UI space becomes minimal when developing **custom tasks with custom pages**. For example, on the **Options** page, a vertical scrollbar appears—not because of too much content, but because the parent dialog’s width is fixed. Ideally, the task setup dialog should use a **resizable tool window** (`SizableToolWindow` in WinForms/Win32 API terms) Rather than a **fixed tool window**, it allows developers more flexibility in designing user-friendly interfaces. [![Bill Of Materials Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-11.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-11.png) The **Execution Method** requires prior permission for the task’s add-in to be granted through the **Task Host Configuration** dialog—a step that is often overlooked by many PDM administrators. [![Sync Revisions Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-16.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-16.png) To permit an add-in, you must: - Locate the **edmserver.exe** (the blueberry icon) in your system tray. - If it’s not visible, you’ll need to log in to your vault via **File Explorer** first. - Right-click the icon and select **Task Host Configuration**. [![The Host Configuration](https://bluebyte.biz/wp-content/uploads/2025/07/image-15.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-15.png) - Choose the appropriate vault from the dropdown and check **Permit**. [![Task Host Configuration](https://bluebyte.biz/wp-content/uploads/2025/07/image-14.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-14.png) Unfortunately, these steps are time-consuming and not immediately obvious. **✅ Suggested Improvements:** - Ideally, the **Task Host Configuration** should be **accessible directly** from the Execution Method section—though integration into the setup dialog is unlikely. - A more practical solution would be to add a **“Permit Add-in” checkbox** within the task setup UI, allowing the user to enable the associated add-in on the current machine. - ***Alternatively—and most feasibly—a button could be added next to the Refresh button to launch the Task Host Configuration dialog directly. This would likely be the most intuitive and effective improvement.*** [![Bill Of Materials Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-13.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-13.png) Here are a few miscellaneous issues that make working with tasks harder than it needs to be: 1. **Tasks can’t be scheduled** **directly on selected files, folders, or search**. This limits automation flexibility and makes batch tasks more complex [![Bill of Materials Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-17.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-17.png) 2\. **No filtering in permission dialogs:** Vaults with many users/groups suffer from a **lack of search** or **filtering options** when assigning permissions to run or edit tasks [![Bill of Materials Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-18.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-18.png) 3\. **Increase or remove** the character limit for Text content in notifications. [![Bill of Materials Properties](https://bluebyte.biz/wp-content/uploads/2025/07/image-19.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-19.png) 4\. **Custom notification text (email or dialog):** Custom notification text in SOLIDWORKS PDM tasks **supports HTML**, but the current **character limit** severely restricts how much formatting or content can be included. This makes it difficult to implement even basic branding or effective communication practices. For example, adding structured sections, links to support resources, or styled text is often impossible due to these constraints. This is especially limiting when trying to deliver modern, user-friendly notifications similar to what users might expect from platforms like the **3DEXPERIENCE Marketplace**, which uses rich HTML formatting to provide clear instructions, embedded links, and visually branded experiences. Adding to the frustration, the **PDM Inbox uses an ActiveX browser control**, which limits rendering to legacy standards. However, newer versions of Windows and .NET support using the **Microsoft Edge WebView2 control**—a modern, Chromium-based browser component that supports full HTML5, CSS3, and JavaScript. [![SOLIDWORKS PDM Notification](https://bluebyte.biz/wp-content/uploads/2025/07/image-20-1024x641.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-20.png)**5. Parallel Execution for the Same Task Type** One of the long-standing limitations in SOLIDWORKS PDM is that **tasks of the same type can only run one at a time per Task Host**. For example, if you trigger ten **Convert to PDF** operations, they will be executed **sequentially**, even if the machine has 16 cores and plenty of RAM. This creates a bottleneck, especially for organizations running high volumes of repeatable, lightweight operations like: - File conversion (PDF, STEP, DXF, etc.) - Custom printing - Metadata extraction or stamping if you love [SOLIDWORKS PDM tasks](https://bluebyte.biz/solidworks/solidworkspdm/configuring-any-solidworks-pdm-task-pdmpublisher/), imagine how much more powerful they could be with parallel execution. What if administrators could specify how many instances of the same task type are allowed to run in parallel on the same host? Imagine a **“Maximum Concurrency”** setting in the task definition that allows 2, 3, or more simultaneous executions of that task—on the same machine. - Select 10 drawings - Trigger Convert to PDF - Instead of queuing 10 tasks in a long line, **3 launch in parallel**, the rest queue behind them - Machine resources are better utilized, and users get results faster Of course, allowing multiple task instances on the **same machine** introduces complexity: - **Resource contention**: If two tasks write to the same temp path or use shared registry keys, results may conflict. - **Add-in architecture**: Existing tasks are not designed to be reentrant or isolated—changes may be needed at the add-in level. - **Error handling and logging**: Separate logs per instance would be required to prevent overlap. That said, these are **solvable problems**—especially for tasks that are stateless and read-only. And in some environments, **admins would gladly accept the risk** in exchange for faster throughput. **Categories:** SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [Understanding the Flattened BOM View in SOLIDWORKS PDM 2024](https://bluebyte.biz/solidworks/solidworkspdm/understanding-the-flattened-bom-view-in-solidworks-pdm-2024/) **Published:** July 6, 2025 **Author:** Amen Jlili **Content:** [![Flattened BOM View in SOLIDWORKS PDM and An image of a SOLIDWORKS Bill of Materials (BOM) interface displaying a flattened view of an assembly. The interface includes tabs for "Preview," "Data Card," "Version 1/1," "Bill of Materials," "Contains," and "Where Used." The BOM section shows a table with columns for "Type," "File Name," "Config.," "Part No.," "Qty," and "State." The selected "Flattened" view lists components such as "tool vise.SLDASM," "compound center," "lower plate.SLDPRT," "upper compound," "eccentric.SLDPRT," "Saddle.SLDPRT," "upper plate.SLDPRT," "cap screw.SLDPRT," and "locking handle.SLD" with quantities ranging from 1 to 8, all marked as "Under Editing." The version is labeled as "1 ['']" under the default configuration.](https://bluebyte.biz/wp-content/uploads/2025/07/image-1024x664.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image.png)Managing complex assemblies and tracking part usage across multiple levels of a product structure can be time-consuming. To simplify this, the new flattened BOM view in SOLIDWORKS PDM 2024 introduces a powerful way to display all components in a single consolidated list directly within the bill of materials tab in the PDM file explorer. ## What is the Flattened BOM View? The **Flattened** BOM view displays your product structure as a simple list of components, **without indentation**. Unlike indented or structured BOMs, this view focuses on showing each component **only once**, regardless of how many times or at what levels it appears in the assembly. ### Key Benefits - **Simplified View**: All components are listed in a flat structure—no need to expand tree levels. - **Summed Quantities**: Components that appear at multiple levels have their quantities **automatically rolled up** into a single total. - **Faster Analysis**: Saves time manually aggregating quantities, making it ideal for purchasing, inventory, and production planning. ## Still Using an Older Version of PDM (Older than 2024)? If you’re working with **older versions of SOLIDWORKS PDM** that don’t support the Flattened BOM view, you can still achieve similar results using the **[PDM2Excel add-in](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")**. ### [PDM2Excel](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel"): Flattened BOMs for Everyone [![Flattened BOMs for Everyone](https://bluebyte.biz/wp-content/uploads/2025/07/image-1-1024x510.png)](https://bluebyte.biz/wp-content/uploads/2025/07/image-1.png) **PDM2Excel** allows you to export a **Flattened BOM with rolled-up quantities**, even if your vault is running a pre-2024 version of SOLIDWORKS PDM. This makes it a valuable tool for teams that need up-to-date BOM exports without upgrading their entire PDM infrastructure. With PDM2Excel, you can: - Export **Parts Only, Top Level, Flattened and Indented BOMs** with accurate rolled quantities. - Work around the limitations of earlier PDM releases. - Create Excel-ready BOMs for reports, purchasing, or manufacturing. Whether you’re using the built-in tools in **SOLIDWORKS PDM 2024** or leveraging **PDM2Excel** in earlier versions, Flattened BOMs can significantly improve how you analyze and share your bill of materials. For more information about PDM2Excel or help with upgrading your vault, reach out to [Blue Byte Systems Inc.](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel") **Categories:** BOM, SOLIDWORKS, SOLIDWORKSPDM **Tags:** solidworks pdm --- ### [How To Export the Active Document As a STEP File](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) **Published:** September 18, 2025 **Author:** Amen Jlili **Content:** This macro allows you to export the active document as a STEP file to the same directory as the original file. It will automatically name the STEP file the same as the active document, but with the .step extension. This macro is an easy way to export parts and assemblies to STEP files. You can download an icon for the macro at this [link](https://www.dropbox.com/scl/fi/nzqu9z1m4pz7exn5tl3n5/STEP.bmp?rlkey=qjnm79roknqsa6gqk7e4mznmq&dl=0) to use when you add it as a button on a toolbar. ## System Requirements ● SolidWorks Version: SolidWorks 2014 or later ● Operating System: Windows 7 or later ## Pre-Conditions ● The active document must be a part or assembly. ● This macro does not work on drawing files. ● Ensure that the document is saved before running the macro, as it will export the file in the same directory. ## Results ● The macro will save the active document as a .step file in the active document’s directory. ● A message box will show you where the file was saved. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Dim swApp As SldWorks.SldWorks Dim Part As ModelDoc2 Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Sub main() ' Initialize SolidWorks application and active document Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc ' Exit if no document is active If Part Is Nothing Then Exit Sub ' Get the path of the active document Dim Path As String Path = Part.GetPathName ' Exit if the active document is a drawing (since STEP export is not supported for drawings) If Part.GetType = swDocDRAWING Then Exit Sub End If ' Prepare the path for the STEP file by replacing the extension Dim Extension As String Extension = Mid(Path, InStrRev(Path, ".")) Path = Replace(Path, Extension, ".step") Extension = ".step" ' Export the file as STEP longstatus = Part.SaveAs3(Path, 0, 0) ' Notify the user about the saved file location MsgBox "Saved " & Path, vbInformation End Sub ``` You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Save_as_STEP.swp). ## **Need Custom Macro Development?** Do you need changes done to the macro to accommodate your requirements or to utilize it with other processes, such as when you need to export the active document as a STEP file? At [Blue Byte Systems](https://bluebyte.biz/) Inc., we offer custom macro development to suit your specific needs! **Categories:** macros --- ### [SolidWorks Macro for Creating a Center of Gravity (CoG) Point](https://bluebyte.biz/macros/solidworks-macro-for-creating-a-center-of-gravity-cog-point/) **Published:** September 16, 2025 **Author:** Amen Jlili **Content:** This step-by-step tutorial provides an exhaustive tutorial on how to utilize a SolidWorks Macro for creating a center of gravity (CoG) Point in placing a 3D sketch point automatically at the Center of Gravity (CoG) of an assembly or a part. It presents the code of the macro, step-by-step guidelines, and tips on troubleshooting to help you precisely locate the center of mass required for balancing, structural analysis, and simulation. [![SolidWorks Macro for Creating a Center of Gravity (CoG) Point and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2025/09/SolidWorks-Macro-for-Creating-a-Center-of-Gravity-CoG-Point-1024x554.png)](https://bluebyte.biz/wp-content/uploads/2025/09/SolidWorks-Macro-for-Creating-a-Center-of-Gravity-CoG-Point.png) ## System Requirements In order to use this macro effectively, you will need the following: - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Prerequisites - The [active document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) must be a part or assembly file. - The part or assembly must have valid geometry to calculate the [center of gravity](https://bluebyte.biz/macros/how-can-i-add-center-of-mass-to-a-part-in-solidworks/). - Ensure that the part or assembly is open and active before running the macro. ## Macro Code The macro is written in Visual Basic for Applications (VBA). You can cut and paste the code itself directly into a new macro file in SolidWorks or download the .swp file from the following link. ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object (part or assembly) Dim boolstatus As Boolean ' Boolean status variable Dim longstatus As Long ' Long status variable for capturing operation results Dim Annotation As Object ' Annotation object for any annotations added (not used here) Dim Gtol As Object ' Geometric tolerance object (not used here) Dim DatumTag As Object ' Datum tag object (not used here) Dim FeatureData As Object ' Feature data object for manipulating feature details (not used here) Dim Feature As Object ' Feature object for creating/manipulating features (not used here) Dim Component As Object ' Component object for assemblies (not used here) ' Main subroutine to create the Center of Gravity point in a 3D sketch Sub main() Dim mp As Variant ' Array to hold the mass properties (center of gravity coordinates) Dim PlaneObj As Object ' Plane object (not used here) Dim PlaneName As String ' Name of the plane (not used here) Dim SketchObj As Object ' Sketch object for creating the 3D sketch (not used here) Dim Version As String ' SolidWorks version (not used here) ' Error handling block to capture unexpected issues On Error GoTo errhandlr ' Initialize SolidWorks application Set swApp = Application.SldWorks ' Check if SolidWorks application is available If swApp Is Nothing Then MsgBox "SolidWorks application not found. Please ensure SolidWorks is installed and running.", vbCritical, "SolidWorks Not Found" Exit Sub End If ' Get the currently active document Set Part = swApp.ActiveDoc ' Check if there is an active document open in SolidWorks If Part Is Nothing Then MsgBox "No active document found. Please open a part or assembly and try again.", vbCritical, "No Active Document" Exit Sub End If ' Check if the active document is a drawing (GetType = 3 corresponds to drawing) If Part.GetType = 3 Then MsgBox "This macro only works on parts or assemblies. Please open a part or assembly and try again.", vbCritical, "Invalid Document Type" Exit Sub End If ' Enable adding objects directly to the database without showing in the UI Part.SetAddToDB True ' Get the mass properties of the active part or assembly ' mp array holds center of mass coordinates (mp(0) = X, mp(1) = Y, mp(2) = Z) mp = Part.GetMassProperties ' Check if mass properties are valid (in case the part has no geometry) If Not IsArray(mp) Or UBound(mp) < 2 Then MsgBox "No geometry found in the part or assembly. Cannot calculate center of gravity.", vbCritical, "Invalid Geometry" Exit Sub End If ' Insert a new 3D sketch Part.Insert3DSketch ' Create a point at the center of gravity coordinates Part.CreatePoint2 mp(0), mp(1), mp(2) ' Exit the sketch mode Part.InsertSketch ' Rename the newly created feature to "CenterOfGravity" in the feature tree Part.FeatureByPositionReverse(0).Name = "CenterOfGravity" ' Successfully exit the subroutine Exit Sub ' Error handling block errhandlr: MsgBox "An error occurred. No valid geometry found to process.", vbCritical, "Error" Exit Sub End Sub ``` You can download the Macro with a click [here](https://solidworksvbamacros.bluebyte.biz/Create_Center_of_Gravity_Point_in_SolidWorks.swp). ## Need to Modify The Macro to Specific Requirements? Or perhaps you would like to use it with other workflows? Contact us anytime. We at [Blue Byte System](https://bluebyte.biz/) Inc. provide custom macro development services that are tailored to address your individual requirements. Call us and maximize your work productivity with our powerful solutions today! **Categories:** macros --- ### [How Can I Add Center of Mass to A Part in SOLIDWORKS?](https://bluebyte.biz/macros/how-can-i-add-center-of-mass-to-a-part-in-solidworks/) **Published:** September 11, 2025 **Author:** Amen Jlili **Content:** Ever felt the need to add a center of mass point to your SOLIDWORKS part, but don’t know how to? You’re in the right place. In this guide, you’ll learn how to add center of mass to a part in SolidWorks. ## Introduction to the Center of Mass (COM) The center of Mass (COM) is a fundamental characteristic that is the mean location of the mass of a body. It is important to understand COM in order to study a part’s stability, balance, and inertia. Whether you are designing a very sophisticated assembly for aerospace or a simple bracket for a consumer product, the COM helps you to predict how the part will behave under different forces and conditions. Although SOLIDWORKS will calculate the COM for you automatically, wouldn’t it be convenient to have a permanent visual reference point within your part file? That is where a simple VBA macro comes in. This article will guide you through a SOLIDWORKS macro that adds a [Center of Mass point](https://bluebyte.biz/macros/solidworks-macro-for-creating-a-center-of-gravity-cog-point/) for you automatically. It’s gonna be easy to refer to in drawings, sketches, and assemblies alike. ## **Why Use a Macro for This?** SOLIDWORKS includes calculators for the Center of Mass, but they require several clicks and do not create a persistent feature in the tree. That can be annoying if you are going to need to refer to the COM frequently. A macro removes that step. With one click, you can: - **Save time:** No more searching menus for the COM. - **Improve the workflow:** The COM point is included as a feature and becomes a permanent addition to your design. - **Increase collaboration:** The COM point is exposed to anyone who opens the part file, so everyone is on the same page. ## The VBA Macro: Your Toolkit The following VBA macro is a quick fix to create a COM point. We will make sure that you have all the requirements set up before you write the code. ### System Requirements - **SOLIDWORKS Version:** SOLIDWORKS 2017 and later. - **Operating System:** Windows 7, 8, 10, or later. - **VBA Environment:** SOLIDWORKS includes a built-in VBA environment. You can get to it by going to Tools > Macro > New or Edit. - **Other Libraries:** None. This macro uses only standard SOLIDWORKS API references, so you will not need to install other files. ### Pre-requisites For the macro to function correctly, ensure your part file is in the following state: - **Active Document:** You must execute the macro on an active part document (.sldprt). - **Material Assignment:** The part must contain a valid material assigned. This is necessary for SOLIDWORKS to be able to calculate the mass and, therefore, the COM correctly. - **Geometry:** The space cannot be empty. It must contain a minimum of one solid or surface. ### How to Use the Macro? To use the Macro, you don’t really have to be an expert programmer: - **Open SOLIDWORKS**: Open SOLIDWORKS and open the part you want to utilize. - **Access the VBA Editor**: Go to Tools > Macro > New. Give your macro a name (e.g., Add\_COM\_Point.swp) and save it. This will activate the VBA editor. - **Paste the Code**: Simply copy the code block above and paste it into the new module. - **Save and Run**: Save the macro (Ctrl + S) and close the VBA editor. Now go to Tools > Macro > Run, and select your macro. Alternatively, you might want to assign a keyboard shortcut or pin it on a toolbar for quick use. ### The VBA Code ``` 'The code provided is for educational purposes only and should be used at your own risk. 'Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. 'For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Dim swApp As SldWorks.SldWorks Dim swModelDoc As SldWorks.ModelDoc2 Dim swCenterMass As SldWorks.Feature Dim swCenterMassReferencePoint As SldWorks.Feature Option Explicit Sub main() Set swApp = Application.SldWorks Set swModelDoc = swApp.ActiveDoc Set swCenterMass = swModelDoc.FeatureManager.InsertCenterOfMass Set swCenterMassReferencePoint = swModelDoc.FeatureManager.InsertCenterOfMassReferencePoint End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/addmasscenter.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/AddMassCenter.swp). ## Customizing and Expanding the Macro This is a good place to begin a macro, but with the SOLIDWORKS API, there are an incredible number of possibilities. You can use this macro and modify it to: - **Create a custom property:** Create a [custom property](https://bluebyte.biz/macros/how-to-measure-sketch-length-and-add-custom-property-using-vba-macro/) automatically on the part with the coordinates of the COM. - **Integrate with other tools:** Use the COM point to open a new sketch or reference geometry. - **Batch process files:** Modify the macro to run on a group of multiple part files in a folder, a very handy feature for large projects. ## Conclusion With this simple [VBA macro](https://bluebyte.biz/macros/how-to-use-vba-macros-for-solidworks-automation/), you can automate your SOLIDWORKS process and provide your part designs with a professional touch. Center of Mass is an important property, and having a permanent visual reference to it can save your time, improve the accuracy, and make your design decisions simpler. Start with this code, experiment with the SOLIDWORKS API, and identify areas where you can further automate your design process. hopefully you have understood how you can add center of mass to a part in SolidWorks within a few minutes. Thanks for reading! **Categories:** macros --- ### [SOLIDWORKS Macro for Automated Mate Toggling and Assembly Constraint Testing](https://bluebyte.biz/macros/solidworks-macro-for-automated-mate-toggling-and-assembly-constraint-testing/) **Published:** October 8, 2025 **Author:** Amen Jlili **Content:** ## Description - The macro targets a user-defined mate set to “Angle 0 Deg.” - The macro toggles the mate’s suppression status (unsuppressing and immediately repressing). [![SOLIDWORKS Macro for Automated Mate Toggling and An image divided into two side-by-side sections labeled "Before" and "After," showing a SOLIDWORKS software interface. The "Before" section displays a 3D model of a rectangular base with two red cylindrical components attached, viewed in an isometric motion study. The feature tree on the left lists "Control Panel" and "Valve Assembly" with constraints like "Angle 0 Deg" and "Concentric." The "After" section shows the same model with an additional red cylindrical component added to the right side, and the feature tree updated to reflect the new assembly and constraints. Both sections include toolbars and a 3D view with axes indicators.](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-for-Automated-Mate-Toggling-1024x400.png)](https://bluebyte.biz/wp-content/uploads/2025/10/SOLIDWORKS-Macro-for-Automated-Mate-Toggling.png) ## System Requirements - **SolidWorks Version:** SolidWorks 2014 or newer - **Operating System:** Windows 7 or later ## Pre-Requisites - This macro must be executed from within an active SOLIDWORKS assembly document that contains the indicated target mate called “Angle 0 Deg.”. (The code can be changed to target any of the mates.) ## Results - The assigned mate, “Angle 0 Deg,” is programmatically toggled between suppressed and unsuppressed states. - The automation cycle checks to see if the assembly constraints are stable without permanently changing any constraints. - *Optional:* The code contains an additional feature to maximize the view of the assembly during the operation for visual feedback, which can be turned on easily by the user. ## Steps to Set Up the Macro 1. **Open the SOLIDWORKS Assembly** - Check that the [Active Document](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/) in SOLIDWORKS is the Assembly file that contains the specific mate that you will be toggling. 2. **Access and Load the VBA Macro** - **Access the VBA Editor:** Open the VBA editor in SolidWorks by pressing (Alt + F11). - **Load the Code:** Insert a new Module (Insert > Module) and then paste the provided VBA Code from the SOLIDWORKS macro for automated mate toggling into the module window. 3. **Run the Macro** - Run the macro from within the VBA Editor itself (Run > Run Sub/UserForm) or save the macro file (.swp) and run the macro from the SOLIDWORKS menu (Tools > Macro > Run) or as a custom button on a custom Toolbar. ## VBA Macro Code ``` ' Disclaimer: ' The code provided should be used at your own risk. ' Blue Byte Systems Inc. assumes no responsibility for any issues or damages that may arise from using or modifying this code. ' For more information, visit [Blue Byte Systems Inc.](https://bluebyte.biz). Option Explicit ' Declare variables for the SolidWorks application and active document Dim swApp As Object ' SolidWorks application object Dim Part As Object ' Active document object (part or assembly) Dim boolstatus As Boolean ' Boolean to capture operation success Dim longstatus As Long, longwarnings As Long ' Longs to capture detailed operation statuses Sub main() ' Initialize the SolidWorks application object Set swApp = Application.SldWorks ' Get the currently active document Set Part = swApp.ActiveDoc ' Optional: Declare and set the active model view Dim myModelView As Object ' Object for controlling the model view Set myModelView = Part.ActiveView ' Optional: Maximize the SolidWorks window (uncomment to enable functionality) ' myModelView.FrameState = swWindowState_e.swWindowMaximized ' Step 1: Select the mate named "Angle 0 Deg" boolstatus = Part.Extension.SelectByID2("Angle 0 Deg", "MATE", 0, 0, 0, False, 0, Nothing, 0) ' Step 2: Unsuppress the selected mate to activate it Part.EditUnsuppress2 ' Step 3: Clear the current selection to reset the environment Part.ClearSelection2 True ' Step 4: Re-select the mate named "Angle 0 Deg" boolstatus = Part.Extension.SelectByID2("Angle 0 Deg", "MATE", 0, 0, 0, False, 0, Nothing, 0) ' Step 5: Suppress the selected mate to deactivate it Part.EditSuppress2 ' Step 6: Clear the selection again to clean up the selection state Part.ClearSelection2 True End Sub ``` ### Macro[](https://solidworksvbamacros.bluebyte.biz/src/Return_A_Axis_to_HOME1.html#macro) You can download the macro from [here](https://solidworksvbamacros.bluebyte.biz/images/Return_A_Axis_to_HOME1.swp). ## Need to customize the macro? [Contact us](https://bluebyte.biz/contact) today to help create a more powerful, custom solution for your specific constraint testing experience. **Categories:** macros --- ### [Don't Export BOMs to CSV Files - SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/bom/dont-export-boms-to-csv-files-solidworks-pdm/) **Published:** June 29, 2025 **Author:** Amen Jlili **Content:** Say goodbye to the limitations and frustrations of exporting Bill of Materials (BOM) as plain CSV files from SOLIDWORKS PDM. With the powerful **[PDM2Excel](https://bluebyte.biz/product/pdm2excel/ "PDM2Excel")**, you can now export your BOMs directly into Excel using your own customized templates, complete with your company header and even thumbnails. This solution not only enhances the visual appeal of your BOM exports but also streamlines your workflow with greater flexibility and professionalism. ## Why Avoid Exporting BOMs to CSV Files? Don’t export BOMs to CSV files if you want to maintain a professional and visually structured document. CSV files, while simple and widely supported, often lead to a bland and unformatted presentation of your BOM data. They lack the ability to retain company branding, structured headers, or any graphical elements like thumbnails, which are essential for clear communication and professional documentation. Exporting BOMs as CSV files can result in extra manual work to reformat and organize the data in Excel, which is time-consuming and prone to errors. ## Export BOMs with Your Own Excel Template [PDM2Excel is a task add-in for SOLIDWORKS PDM that enables you to export BOMs using a customized Excel](https://bluebyte.biz/solidworks/solidworkspdm/bom/top-5-reasons-to-start-using-pdm2excel-to-start-exporting-pdm-boms-to-excel/) template stored within your PDM vault. This means you can define your own headers, layout, and design, ensuring consistency with your company’s branding and documentation standards. ### How It Works - **Prepare Your Excel Template:** Create and save your Excel template in your PDM vault. This template should include your company header and any other formatting you want to appear on your BOM export. - **Configure the Starting Cell for BOM Data:** In the PDM2Excel task settings, specify the exact starting cell where the BOM data will begin to populate within your template. For example, if your BOM header starts at row 6 and column 1, set this location accordingly. - **Launch the Task:** Right-click on your assembly within SOLIDWORKS PDM, navigate to the task menu, and launch the PDM2Excel task. - **Review Your Export:** Once the task completes, open the resulting Excel file. You will see your BOM data neatly laid out starting right after your template’s header, preserving all your customized formatting and branding. ## Step-by-Step Guide to Exporting BOM to Excel Using PDM2Excel 1. **Open Your Assembly:** Start with the assembly in SOLIDWORKS PDM that you want to export the BOM for. 2. **Locate Your Excel Template:** Navigate to the folder in your PDM vault where your custom Excel template is saved. 3. **Check Template Setup:** Open your Excel template briefly to verify the BOM header location and confirm the starting cell for the BOM data. 4. **Configure PDM2Excel Task:** Open the PDM2Excel task setup page, go to the Options tab, and browse to select your custom template file. Input the starting row and column indices where the BOM data should begin. Make sure to **save**. 5. **Run the Export Task:** Back in PDM, right-click the assembly, select Tasks, and launch the configured PDM2Excel task. 6. **Verify the Export:** Open the exported Excel file to ensure the BOM data is correctly populated beneath your template header, formatted exactly as you designed. **Stop settling for hideous CSV exports and elevate your BOM documentation with PDM2Excel. If you want a live demonstration or have questions about integrating this powerful tool into your workflow, feel free to reach out to BLUE BYTE SYSTEMS INC. through their website or LinkedIn. They offer personalized demos to help you get the most out of your SOLIDWORKS PDM experience**: For more information and to schedule a demo, visit: [PDM2Excel Demo and Q&A](https://calendly.com/bluebyte/pdm2excel-demo-and-qa?back=1&month=2023-12) **Categories:** BOM, SOLIDWORKS, SOLIDWORKSPDM **Tags:** bill of materials --- ### [Batch export SOLIDWORKS assemblies to IGES using PDMPublisher](https://bluebyte.biz/solidworks/solidworkspdm/batch-export-solidworks-assemblies-to-iges-using-pdmpublisher/) **Published:** October 1, 2024 **Author:** Amen Jlili **Content:** Exporting SOLIDWORKS parts and assemblies to the IGES (.igs) format is a common necessity for engineers and designers who need to share 3D models with clients, manufacturers, or collaborators using different CAD systems. However, many users encounter challenges when attempting to export to IGES using the built-in PDM Convert Task. In this article, we’ll explore why the PDM Convert Task falls short and how you can batch export SolidWorks assemblies to IGES using **PDMPublisher** as the optimal solution for exporting all sub-assemblies and parts, along with their configurations, in a seamless batch process. --- ## Why Export to IGES Format? The Initial Graphics Exchange Specification (IGES) is a widely accepted, neutral file format that facilitates the exchange of information among different CAD systems. Exporting to IGES ensures compatibility and preserves the integrity of your 3D models. ### Benefits of IGES Format - **Cross-Platform Compatibility:** IGES files can be opened and edited in most CAD software, making collaboration easier. - **Preservation of Geometry:** Maintains complex geometries and surface data accurately. - **Industry Standard:** Commonly used in aerospace, automotive, and manufacturing industries. --- ## Limitations of the PDM Convert Task The SOLIDWORKS PDM Convert Task is designed to automate file conversions, but it has significant limitations when exporting to IGES format. ### Key Limitations 1. **No Native IGES Support:** The PDM Convert Task does not support exporting to the IGES format directly. 2. **Inability to Handle Assemblies Properly:** Struggles with exporting assemblies, especially those containing multiple sub-assemblies and configurations. 3. **Inefficient Workflow:** Requires manual intervention, making the process time-consuming and prone to errors. ### Impact on Productivity These limitations can significantly hinder productivity, forcing users to perform manual exports or seek alternative solutions, which may not be efficient for large projects. --- ## Introducing PDMPublisher: The Optimal Solution **PDMPublisher** is a powerful add-in for SOLIDWORKS PDM that overcomes the limitations of the standard Convert Task. It provides enhanced export capabilities, allowing you to export parts and assemblies to IGES format efficiently. ### Key Features of PDMPublisher - **IGES Export Capability:** Directly export parts and assemblies to the IGES (.igs) format. - **Batch Processing:** Export multiple files simultaneously, including all sub-assemblies. - **Configuration Handling:** Automatically exports all configurations within parts and assemblies. - **User-Friendly Interface:** Easy to set up and integrate into your existing PDM workflow. --- ## Benefits of Using PDMPublisher for IGES Exports ### 1. Streamlined Workflow - **Automated Process:** Reduces manual steps with [automated batch exporting](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/). - **Time-Saving:** Significantly decreases the time spent on exporting files. ### 2. Enhanced Compatibility - **Complete Exports:** Ensures all parts, assemblies, and configurations are exported. - **Sub-Assemblies Included:** No need to export sub-components separately. ### 3. Improved Productivity - **Batch Exporting:** Handle large numbers of files with ease. - **Error Reduction:** Minimizes the risk of errors associated with manual exporting. ### 4. Seamless Integration - **Within PDM Environment:** Works directly within SOLIDWORKS PDM, maintaining data integrity. - **Minimal Learning Curve:** Intuitive interface that’s easy to navigate. --- ## How to Export to IGES Format Using PDMPublisher ### Step 1: Install PDMPublisher - Obtain the PDMPublisher add-in in our store or request a demo. - Follow the installation instructions in your order email to get started. The process is very straightforward. ### Step 2: Configure Export Settings - Access PDMPublisher within the PDM administration tool. - Create a new PDMPublisher task and configure it. - Set the export file format to IGES (.igs). - Check the options for batch processing, including sub-assemblies and configurations. ### Step 3: Select Files for Export - Navigate to the top level assembly you wish to export within PDM or outside. - Right-click and choose the name of the task you created under Tasks. ### Step 4: Initiate the Export Process - Start the batch export - Monitor progress through the PDMPublisher interface. ### Step 5: Verify Exported Files - Locate the exported IGES files in the designated output directory. - Open them in a compatible CAD viewer to ensure integrity. ## Conclusion Exporting SOLIDWORKS parts and assemblies to IGES format is essential for cross-platform collaboration and manufacturing processes. The limitations of the PDM Convert Task can hinder productivity and workflow efficiency. [**PDMPublisher**](https://bluebyte.biz/product/pdmpublisher/) simplifies this by allowing users to batch export SolidWorks assemblies to IGES using PDMPublisher, ensuring all sub-assemblies and configurations are accurately exported. By integrating PDMPublisher into your workflow, you can enhance productivity, reduce errors, and ensure seamless collaboration with partners and clients. **Categories:** SOLIDWORKS, SOLIDWORKSPDM --- ### [30 SOLIDWORKS API Tricks in 45 Minutes – Live at Hawk Ridge Systems D2M](https://bluebyte.biz/webinar/30-solidworks-api-tricks-in-45-minutes-live-at-hawk-ridge-systems-d2m/) **Published:** October 12, 2025 **Author:** Amen Jlili **Content:** [![](https://bluebyte.biz/wp-content/uploads/2025/10/image-1.png)](https://bluebyte.biz/wp-content/uploads/2025/10/image-1.png)BLUE BYTE SYSTEMS INC. is bringing SOLIDWORKS customization to the [Hawk Ridge Systems](http://www.hawkridgesys.com) Design-to-Manufacturing (D2M) conference this year. [Amen Jlili](https://www.linkedin.com/in/jliliamen/), Founder and Technical Director of Blue Byte Systems, will be leading this session aimed at engineers wanting to automate, optimize, and extend SOLIDWORKS using the API. He will go through 30 tested API tips and tricks used in solutions Blue Byte Systems Inc has developed and deployed around the world for customers in the manufacturing and aerospace industries. ## What’s the presentation about? In those 45 minutes, you will learn tips and tricks about SOLIDWORKS API: - **VBA Programming Tips:** Visual Basic for Applications (VBA) and Visual Basic Editor (VBE) tips. - **Document Management Tips**: Tips and tricks on how to [manage SOLIDWORKS documents](https://bluebyte.biz/solidworks-pdm-professional-api-3-day-bootcamp-2026/) with the API. - **SOLIDWORKS Performance Tips**: Learn API calls that reduce model load time and speed up SOLIDWORKS. ## When is the presentation? Date: October 30th 2025 Time: 11:30 AM – 12:15 PM PST Registration: To attend, please follow this [link](https://hawkridgesys.com/d2m-2025-accelerate). **Categories:** webinar **Tags:** hawk ridge systems, solidworks api --- ### [SOLIDWORS PDM API TIP: What is Hwnd?](https://bluebyte.biz/pdm-api-tips/solidwors-pdm-api-tip-what-is-hwnd/) **Published:** January 31, 2025 **Author:** Amen Jlili **Content:** ![What is Hwnd](https://bluebyte.biz/wp-content/uploads/2025/01/image-1.png) Hwnd, or simply what is hwnd, appears in many PDM API calls as a parameter and is unfortunately not well-defined in the SOLIDWORKS PDM API documentation. **Hwnd**: Handle of window: a unique identifier in Win32. It identifies a window in File Explorer and is not persistent across different sessions of File Explorer (explorer.exe). This means that the window handle may change for the window. In the context of the [SOLIDWORKS PDM API](https://bluebyte.biz/pdm-api-tips/things-you-can-now-with-the-solidworks-pdm-api-from-2022-theyre-pretty-cool/), the window handle is especially important because it allows: - The blue login dialog box is to be shown **atop** the host application window. If you specify **zero** in the **LoginAuto** method, the login dialog box may **NOT** be rendered in the right area of your screen, causing the user to be confused. The host application’s control will be given away to the login box, which is not visible to the user. A common consequence is the host application window flashing and not responding to the user input. - A similar behaviour may concur as well for API calls such as the check-in API call. The check-in API call may trigger some PDM dialog boxes to render in the wrong area of the screen if Hwnd is not specified. **💡HOW TO GET THE WINDOW HANDLE IN .NET:** In WinForms, use to get the handle of the form. In a Console app, use Process.GetCurrentProcess().MainWindowHandle.ToInt32() In a WPF app, use new WindowInteropHelper(this).Handle.ToInt32() to get the handle of the active window. **Categories:** PDM API Tips, SOLIDWORKS, SOLIDWORKSPDM --- ### [Early binding vs Late Binding: How to write macros that will always run with no errors](https://bluebyte.biz/macros/early-binding-vs-late-binding-how-to-write-macros-that-will-always-run-with-no-errors/) **Published:** December 26, 2020 **Author:** Amen Jlili **Content:** **TLDR**: *Here’s what you need to know about Early Binding Vs Late Binding* - Use early binding for writing macros. It provides IntelliSense and enforces types. - Late binding is a great way to avoid missing reference errors. It allows the Visual Basic Editor (VBE) to resolve variable types during runtime. All variables must be defined as an **Object**. - Check [this SOLIDWORKS documentation article ](https://help.solidworks.com/2021/english/api/sldworksapiprogguide/GettingStarted/Early_and_Late_Binding.htm#:~:text=Early%20binding%20occurs%20when%20an,to%20be%20of%20type%20Object.)on early and late binding. [![Early Binding Vs Late Binding](https://bluebyte.biz/wp-content/uploads/2020/12/vba-logo.png)](https://bluebyte.biz/wp-content/uploads/2020/12/vba-logo.png)VBA LOGO --- The topic of *Early Binding vs Late Binding* is really close to my heart: The eternal question on whether to use early binding or late binding for SOLIDWORKS or Excel VBA macros. Each of these approaches has its consequences and we’re going to discuss those in great detail in this article. Now, before I give you my personal take on early and late binding, let’s define what they are and go over the pros and cons of each other. By the end of this article, you will be able to discern when use late or early binding. Let’s begin with early binding. ## Early Binding when writing macros When you *early-bind* your variables in a VBA macro, you tell the VBE, to assign a specific type to a variable, when it compiles the macro for execution. For example: `Dim swApp as SldWorks.SldWorks ` This tells VBE: “Hey, make sure you that swApp is of type SldWorks.SldWorks”. Now this is awesome because VBE doesn’t have to do anything extra. It will go and find the type that matches SldWorks from the referenced libraries in **Tools** > **References** and enforce that type assignment for the rest of your macro. This is called **type-enforcement**. It means if you misspell a method name or miss a parameter, VBE won’t allow you to run the macro until you have those compile-errors fixed. Now, because you’re *early-binding* your variables, VBE is able to grab the methods and properties definitions from the tlb reference and assist you into writing the api calls by making autocompleted suggestions. This feature is called “IntelliSense”. ![Autocomplete for FeatureManager interface](https://bluebyte.biz/wp-content/uploads/2020/12/image-10.png)Autocomplete for FeatureManager interface It is a productivity boost and sometimes is a necessity when you are working with ill-designed API calls that have +10 parameters like [FeatureManager::FeatureExtrusion3 ](https://help.solidworks.com/2021/english/api/sldworksapi/SOLIDWORKS.Interop.sldworks~SOLIDWORKS.Interop.sldworks.IFeatureManager~FeatureExtrusion3.html) ![Parameters of the API call FeatureManager::FeatureExtrusion3](https://bluebyte.biz/wp-content/uploads/2020/12/image-9.png)Parameters of the API call FeatureManager::FeatureExtrusion3 Early binding is great but it also comes with its shares of problems. A good example is when the type definitions cannot be found. You will have to go to **Tools** > **References** and fix any missing ones to allow VBE to resolve variable declarations appropriately. ![Early binding error: User-defined type not defined](https://www.codestack.net/solidworks-api/troubleshooting/macros/missing-solidworks-type-library-references/compile-error-user-defined-type-not-defined.png)Early binding error: User-defined type not defined ## Late Binding to the rescue When you use late binding, you’re telling VBE to resolve variables types during runtime. VBE has access to all the COM libraries installed on your machine is able to run through them and grab the appropriate type that matches the declared variable and how it is used. This is great way if you don’t know what version of SOLIDWORKS the end-user has on their computer. To use late binding, simply declare all variables as **Object**. You can even remove the SOLIDWORKS references from the **Tools** > **References** window. You will also have to replace the line : `Set swApp = Application.SldWorks` with `Set swApp = GetObject(, "SldWorks.Application")` Here’s an example that prints a hello world message using late binding: `Dim swApp As ObjectSub main()'Attach to the active sldworks sessionSet swApp = GetObject("", "SldWorks.Application")If Not swApp Is Nothing Then 'print process id Debug.Print "Process ID is : " & swApp.GetProcessID() 'display message to user swApp.SendMsgToUser "Hello from late-bound SOLIDWORKS macro!"End IfEnd Sub` Unfortunately when you do that, a few things will happen: - You lose access to the IntelliSense since all variables are declared as **Object**. - You will need to either define [swConst ](http://help.solidworks.com/2021/english/api/SWHelp_List.html?id=5ddc51e8358c454cac47d11becb9a910#Pg0)enumerations in your macro or use their integer values which is a really bummer. Your code is less readable. As you can see writing a macro using late binding is equivalent of writing code on a white board which is unpleasant because no-one memorizes the API. This brings me to my personal take on binding. **Continue reading below**. ## *Early Binding vs Late Binding* conclusion: How to score two birds with one stone - Use early binding to write your SOLIDWORKS or Excel [VBA macro](https://bluebyte.biz/macros/top-reasons-to-upgrade-your-vba-macros-in-2020/). Make full use of IntelliSense. - Distribute your finished macro after late-binding your variables and explicitly defining the SOLIDWORKS enumerations. [This VBA macro from the SOLIDWORKS documentation does that](https://help.solidworks.com/2012/english/api/sldworksapi/Get_Document_Information_Example_VB.htm) with the [DocumentTypes\_e](http://help.solidworks.com/2021/english/api/swconst/SOLIDWORKS.Interop.swconst~SOLIDWORKS.Interop.swconst.swDocumentTypes_e.html) enum. ## What to do next? That’s a good question! VBA is becoming an obsolete scripting language. It’s great for automating small tasks, but it is not the sharpest tool in the shed for automating complex workflows in SOLIDWORKS or PDM. At [Blue Byte Systems, Inc](https://bluebyte.biz/contact/)., we encourage our customers to [reach out to us](https://bluebyte.biz/contact/) to upgrade their VBA macros to add-ins. This secures your code and makes it easier to maintain and deploy, while also addressing important considerations such as early binding vs late binding. **Categories:** macros --- ### [How to Register a SOLIDWORKS Add-in DLL (64-bit)](https://bluebyte.biz/solidworks/how-to-register-a-solidworks-add-in-dll-64-bit/) **Published:** June 10, 2025 **Author:** Amen Jlili **Content:** If you are developing a SOLIDWORKS add-in as a .NET Framework (version 4 and older) application, you will need to register your SOLIDWORKS Add-in DLL so that SOLIDWORKS can find it and load it. This guide explains how to register a SOLIDWORKS add-in DLL (64-bit) and covers manual registration for developers who will register from the command-line program. **Disclaimer: This method will only work for the old legacy .NET Framework 2, 3, and 4.** ## Step-by-Step Instructions (64-bit or Any CPU) - Open Command Prompt with Administrator permissions. This is necessary to have admin permissions to make changes to the system registry. - Navigate to the folder where your DLL is located. Use the cd command to change your current directory in the Command Prompt to the location where the compiled add-in DLL is located. **cd .dll** - Run the .NET registration tool. You will use the .NET registration tool RegAsm.exe, which is a part of the 64-bit .NET Framework. The command looks like the following: **C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\RegAsm.exe /codebase .dll** - Confirmation. If successful, you will see a response that states the following message, ***“Types registered successfully.”*** - Warning: You may also see this response, ***“Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications…”*** This is normal during development. You should, when in production, use a strong name key to sign your assembly. [![How to Register a SOLIDWORKS Add-in DLL (64-bit) and A screenshot of an Administrator Command Prompt window showing a command to register a .NET assembly file. The command "C:\Windows\System32\cd" changes the directory to a DLL folder, followed by "RegAsm.exe /codebase FILE_NAME.dll" to register the file using the .NET Framework Assembly Registration Utility version 4.8.9932.0. A warning (RA0000) indicates that registering an unsigned assembly with /codebase may cause interference, suggesting a strong name and re-registration. The process completes successfully, shown in green text.](https://bluebyte.biz/wp-content/uploads/2025/06/image-7-1024x543.png)](https://bluebyte.biz/wp-content/uploads/2025/06/image-7.png) ### What About 32-bit Registration? **What About 32-bit DLLs?** You are only required to register 64-bit DLLs for all of today’s current versions of SOLIDWORKS, as all of them run as SolidWorks 64 bit applications. The only time you would, in fact, have to register a 32-bit DLL is if you’re targeting SOLIDWORKS 2013 or earlier. The process is the same, but uses the 32-bit version of RegAsm.exe: ``` C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe ``` ### **Unregistering The Add-in** If you want to remove the add-in (e.g., cleaning up or switching between builds), just run: ``` C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /unregister PDMPublisher.dll ``` ## Still Need Help? At [Blue Byte Systems](https://bluebyte.biz/), we develop and maintain professional SOLIDWORKS add-ins for automation, analysis, UI enhancements, and system integration. If you are experiencing problems or require a dependable API resource, we are here to assist you with guides like how to register a SOLIDWORKS add-in DLL (64-bit). **👉 [Contact us](https://bluebyte.biz/contact/) today to find your custom solution!** **Categories:** SOLIDWORKS **Tags:** solidworks api --- ### [How to Launch SOLIDWORKS 3D Using the SolidWorks Command Line Arguments](https://bluebyte.biz/solidworks/solidworks2022/how-to-launch-solidworks-3d-using-the-solidworks-command-line/) **Published:** July 12, 2022 **Author:** Amen Jlili **Content:** Need to start SOLIDWORKS in a specific set of behaviors or modes? Well… You can with the SOLIDWORKS command line arguments via the sldworks.exe program. Use the arguments as special instructions you pass to SOLIDWORKS just before it launches, telling it exactly how you’d like for it to behave. These arguments don’t always get properly documented, but a decent spot to search for them is in this cadoverflow thread. Warning: they are case-sensitive, so make sure to use the exact capitalization provided. ## How to Launch SOLIDWORKS with Arguments? It’s quite straightforward. Here are the step-by-step instructions: - Open the Command Prompt (CMD). - Navigate to the SOLIDWORKS installation folder. This is done by typing CD followed by the path in double quotes, like this: CD “C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS”. - Type the sldworks.exe command followed by the desired argument. For example, to use the /r argument, type: sldworks.exe /r. ``` sldworks.exe /r ``` ### Useful SOLIDWORKS Command Line Arguments Over the years, several of these arguments have proven to be quite handy. Here are some of them: #### /r This is a good case for hiding some dialog boxes, especially the ones of the MsgBox type. It can eliminate intrusive pop-ups caused by SldWorks.*SendToMsgToUser2* and SldWorks.*SendToMsgUser*, like the journal warning you get when you have more than one running. This keeps the workflow flowing smoothly without interruption. ![A screenshot of an error message box from the software SOLIDWORKS. The window title says "SOLIDWORKS" and a yellow warning icon is on the left. The text in the box reads: "A journal file could not be created. Auto recover will not work. Another session of SOLIDWORKS may already be running on this machine." An "OK" button is visible at the bottom right.](https://bluebyte.biz/wp-content/uploads/2022/07/SolidWorks-Error.jpg) #### /m Used to run a macro (.swp). A great feature is that it loads the application without the splash screen, which makes the startup faster. #### /b This switch runs SOLIDWORKS in batch mode. It’s convenient for some tasks, but be careful because it opens in a very small window. That can be inconvenient for [API calls](https://bluebyte.biz/solidworks/optimizing-solidworks-api-performance-best-practices-and-key-api-calls/) that require a user interface, like *ZoomToFit2*, so use it only when those specific features aren’t required. ![A screenshot of the SOLIDWORKS application window. The top of the window has the SOLIDWORKS logo and a menu bar with File, View, and Tools. Below this, a panel titled SOLIDWORKS Resources is open, showing a welcome message and a section for SOLIDWORKS Tools. The bottom of the window indicates the software version: SOLIDWORKS Professional 2022 SP2.0.](https://bluebyte.biz/wp-content/uploads/2022/07/image-4.png)**SOLIDWORKS** launched in batch mode #### /d Programmers will want this argument to begin [SOLIDWORKS in developer](https://bluebyte.biz/become-a-solidworks-api-developer/) mode and add an additional menu with additional features. ![A screenshot of a drop-down menu in a software application. The menu is titled DeveloperTools and lists several options. From the top down, the items are: Make Section..., Read Section, Dump Entity ID, Dump Modeller Version, Check Entity (in gray, suggesting it's unavailable), Check Feature, Check Radius of Curvature, and finally, a horizontal line separating the last option, Customize Menu. The mouse cursor is visible, hovering over the DeveloperTools menu title.](https://bluebyte.biz/wp-content/uploads/2022/07/image-5.png) #### /swlite Do not have to open a model in order to view it? This argument opens SOLIDWORKS in read-only mode. It comes in handy when you are viewing a model and do not want to accidentally change it. Just note that the close window icon (x) is not available with this argument. ![A full-screen screenshot of the SOLIDWORKS application. The main window displays a 3D model of a long, metallic-looking object with a cross-section shaped like a lowercase 'h'. On the left, the Feature Manager Design Tree shows the model's history, including an Extrude1 feature and different planes. A drop-down menu is open from the File menu at the top, listing options such as New..., Open..., Save, and Print.... On the far right, the SOLIDWORKS Resources panel is visible, showing different tools and links. At the bottom of the screen, the view is labeled Isometric.](https://bluebyte.biz/wp-content/uploads/2022/07/image-6-1024x565.png)SOLIDWORKS launched in lite mode.#### /SWGenericMainWinTitle This is a cosmetic tweak and is useful. It does not place the year in the DS SOLIDWORKS logo in the sldworks.exe process, which makes it look more generic. ![How to Launch SOLIDWORKS 3D Using the SolidWorks Command Line Arguments](https://bluebyte.biz/wp-content/uploads/2022/07/image-7-1024x681.png)Sldworks.exe launched with a generic DS SOLIDWORKS logo#### /SWDisableExitApp This command can be used to avoid the crash window. It is useful when debugging, and you do not want the crash report pop-up window to interrupt your work. A fair heads up: These are not officially documented or approved by the [SOLIDWORKS API](https://bluebyte.biz/solidworks/the-solidworks-apis/) team, so use with caution. Finally, even though the SOLIDWORKS command line arguments are not supported officially, they offer a potent way to customize how you launch the application. With the sldworks.exe file and these commands, you can streamline your workflow, automate tasks, and access undocumented functions. Fiddling around with these arguments can help you unlock a more streamlined and customized SOLIDWORKS experience. ![A screenshot of an email from apisuppor@solidworks.com to a user named Amen. The subject is not visible. The email, sent on Tuesday, July 12 at 10:21 AM, discusses command-line switches for SOLIDWORKS. The body of the email says: "Hello Amen, The only switch our team regularly suggests is the /m switch. That switch allows you to run a VBA macro on startup. For example sldworks.exe /m macro.swp In regards to all the other ones you may have discovered, I don't think that they are properly documented because I don't think that they're fully supported or endorsed. It's more of use it if you like but there's no guarantee that we won't decide to change it later or remove it. Most of the switches don't apply to the API except for /m so I can't definitively say but this is my assumption. I suspect that many were originally added for internal purposes and some users found them and started using them. But to answer your question there is no formal information or formal list that I am aware of. Regards, Dassault Systèmes SolidWorks Corp. API Support" The email signature includes the company's name, address, and website links. A final note for resellers is also included at the bottom.](https://bluebyte.biz/wp-content/uploads/2022/07/image-8-1024x884.png) **Categories:** SOLIDWORKS, SOLIDWORKS2022 --- ### [How to Print STEP Files in SOLIDWORKS and Automate Export with PDMPublisher](https://bluebyte.biz/macros/how-to-print-step-files-in-solidworks-and-automate-export-with-pdm-publisher/) **Published:** September 30, 2024 **Author:** Amen Jlili **Excerpt:** DP **Content:** While it’s easy to export STEP files manually in SOLIDWORKS, it can become cumbersome if you need to handle multiple configurations or large assemblies. In addition, many users also look for ways to print step files in SOLIDWORKS when managing different outputs. Here’s the basic process to manually export STEP files: 1. Open your part or assembly in SOLIDWORKS. 2. Click on `File > Save As` and select **STEP** as the file type. 3. Customize your export options by clicking the **Options** button. 4. Save the STEP file to your desired location. For assemblies or parts with many configurations, [manually exporting each configuration](https://bluebyte.biz/macros/solidworks-macro-for-automated-batch-export-of-configurations-to-step/) can be tedious. That’s where **PDMPublisher** comes in handy. ## Automating the Process with PDMPublisher **PDMPublisher** is an advanced tool integrated with SOLIDWORKS PDM that helps automate the export and printing of multiple configurations. One of the most useful features is **Process All Configurations**, which automatically exports all configurations from your [part or assembly](https://bluebyte.biz/macros/solidworks-macro-export-part-and-assembly-to-iges-file/) to [STEP files](https://bluebyte.biz/macros/how-to-export-the-active-document-as-a-step-file/). Additionally, it allows you to batch print the configurations, ensuring no configuration is left out. This makes it an efficient souldtions for heading a SolidWorks PDM batch plot. ### How to Use PDMPublisher to Print and Export STEP Files - In your [SOLIDWORKS PDM](https://bluebyte.biz/macros/solidworks-pdm-professional-you-have-chosen-to-load-a-net-add-in-well-what-do-you-do-next/) environment, set up the **PDMPublisher** task. - Open the Options page and set your export location and filename values like follow: [![Print STEP Files in SOLIDWORKS and An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2024/09/image-11.png)](https://bluebyte.biz/wp-content/uploads/2024/09/image-11.png) - Enable the **Process All Configurations** feature. [![An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2024/09/image-12.png)](https://bluebyte.biz/wp-content/uploads/2024/09/image-12.png) - If you’re interested in printing the affected documents by the the task, then pick **Export Affected Document**. - You can also pick **Export References to File Formats Individually** to export the references in an assembly. - Run the task in File Explorer, and **[PDMPublisher](https://pdmpublisher.com/ "PDMPublisher")** will handle the batch printing and exporting for you: [![An illustration of a person working at a computer, with hands on a keyboard and mouse. The computer screen displays a 3D model of a mechanical part with a hole, viewed in a design software interface showing tools like "Pains," "Origine," "Extrusion," and "Add Step" on the left sidebar. An orange gear icon with a small robot face overlays the screen, symbolizing automation or AI assistance in the design process.](https://bluebyte.biz/wp-content/uploads/2024/09/image-13.png)](https://bluebyte.biz/wp-content/uploads/2024/09/image-13.png) This saves considerable time and ensures accuracy when exporting complex assemblies with multiple configurations. Instead of manually handling each configuration, **[PDMPublisher](https://bluebyte.biz/product/pdmpublisher/ "PDMPublisher")** automates the entire process, freeing you up to focus on other critical tasks such as when you need to print step files in SOLIDWORKS. **Categories:** macros --- ### [PDM Sync Add-In for Monday.com Boards with SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/sync-monday-com-boards-with-solidworks-pdm/) **Published:** January 2, 2025 **Author:** Amen Jlili **Content:** ![](https://bluebyte.biz/wp-content/uploads/2025/01/monday-to-pdm-1024x570.png)Monday.com is a highly popular system for planning and managing projects and tasks. However, for teams using SOLIDWORKS PDM, a major hurdle remains syncing project data. Simply put, there is no official inherent integration with PDM systems in the Monday.com standard integrations. The amount of manual labor required for SolidWorks data migration between your PDM board and the Monday.com task board is tedious and increases the likelihood of human error in data migration, making a proper PDM sync essential. In response to this challenge, our professionals at Blue Byte Systems Inc. have developed a custom (third-party integration tool) add-in that provides a positive experience with PDM sync between the Monday.com system and [SOLIDWORKS PDM.](https://bluebyte.biz/service/pdm-automation-integration/) Our custom solution automates the sync of your Monday.com board tasks to corresponding data card fields in PDM. What’s the end result? You can work with real-time accuracy with your data and never do a manual update again. This integration bridges the gap between project management and engineering data the most efficiently. ### Key Features: - **Rapid Setup & Quick Deployment:** The add-in allows for a very simple setup process, which allows users to quickly map items on Monday.com boards to fields on PDM data cards. - **Data Synchronization:** The add-in is designed to ensure real-time data consistency for a reliable PDM sync of important data from Monday.com to PDM. - **Configurable Mapping:** Users are able to configure exactly which fields and items to sync, allowing the integration to be tailored to an individual project and only passing along relevant data. ### Benefits: - **Improved Workflow Automation:** Automated synchronization minimizes manual data entry and guarantees that everyone is working off the same accurate, up-to-date information on both platforms. - **Improved Collaboration Across Departments:** By providing both project management and engineering teams with unified access to the most current project data, the add-on improves team communications and transparency of operations. - **Improved Efficiency with Increased Productivity:** Reducing administrative burden enables engineering teams to put more effort into designing, improving efficiency overall. - **Data Accuracy:** Integration forces everyone to work off the most current data that is guaranteed to be accessible to both the project management and engineering environments so everyone is working off the same information and especially not outdated information. ## **How To Use The PDM Sync Add-In?** The add-in’s configuration is structured to facilitate precise control over the data flow. Here’s what you need to do— ![](https://bluebyte.biz/wp-content/uploads/2025/01/right-click-menu.png)After adding the add-in to your vault via the Administration tool, right-click on the add-in to get the settings. ### **Mapping Section** - **Board Name:** Identifies the Monday.com board name that is being mapped (i.e., it can represent a specific project board). For example, “ABC Manufacturing USA LLC”. - **Identifying Variable:** Designates the main variable within PDM that acts as a unique identifying variable to a specific item on the Monday.com board (i.e., data is linked between the two systems). For example, “Customer Name” could be used to link data between the two systems. - **Mapping Array:** This section is configured to map specific PDM Variables to Monday.com field titles (e.g., File Name > Task Name or Revision > Status). ### Monday Section #### **API Key** - A sensitive key that is necessary for authenticating and authorizing API calls between the integration and Monday.com. - The API key allows secure communication and data transfer, ensuring only authorized requests are processed. - You can obtain the token from Monday’s developer portal: #### ![](https://bluebyte.biz/wp-content/uploads/2025/01/token-1024x236.png) After configuring the add-in, you can include the button in the PDM card editor. Follow the instructions in the image below to finish this step.![](https://bluebyte.biz/wp-content/uploads/2025/01/board-monday-1024x345.png)Once you have completed the configuration the add-in, open the card editor and add a button that triggers the add-in like follow: ![](https://bluebyte.biz/wp-content/uploads/2025/01/image-1024x477.png) To test the add-in, go to a folder in PDM and click the button. Sometimes, you have click out and refresh the card to get the new values. ## **Custom Solutions At Blue Byte System Inc.** Our specialized PDM sync add-in is a reliable and robust solution that allows you to leverage a smooth workflow and control data integrity. The PDM sync add-in gives you a trustworthy way to [Monday.com](https://monday.com/) data migration without having to manually manage everything while worrying for human errors. The PDM sync add-in developed by Blue Byte Systems Inc. connects your project management with engineering data so your teams can collaborate easily, improve accuracy, and concentrate on innovation. Please reach out if you wish to develop a custom add-in macro to best suit your specific workflow. GET Monday Datacard sync add-in Email Name Company Name \*First Last Email \*Professional email required. Company Get PDMMonday Add-in by E-mail![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) **Categories:** SOLIDWORKSPDM --- ### [SolidWorks Macro Export Flat Pattern DXF: How to Automate with VBA](https://bluebyte.biz/solidworks/solidworks-macro-export-flat-pattern-dxf/) **Published:** September 5, 2024 **Author:** Amen Jlili **Content:** ![SolidWorks Macro Export Flat Pattern DXF](https://bluebyte.biz/wp-content/uploads/2024/09/Export-DXF-1-1024x537.jpg)Working with sheet metal in SolidWorks, you’ll often find yourself in need of exporting large assembly files into DXF format for manufacturing purposes. And if you’re someone who needs to deal with exporting dozens of parts from a large assembly manually, you understand how much of a time-consuming task it can be. You don’t have to worry or waste time on manually exporting each sheet anymore. With a VBA (Visual Basic for Applications), you can automate the **SolidWorks export sheet metal DXF** process. Now, you can export 1:1 scale DXF files directly with production-ready accuracy and efficiency. In this guide, we’re gonna walk you through the process of how to automate SolidWorks macro export flat pattern DXF using VBA. Rest assured, this solution is gonna not just save your time but also help you streamline your workflow, regardless of the complexity of assemblies. ## Why You Should Automate Your SolidWorks DXF Export You should automate your SolidWorks DXF export sooner rather than later since manual file conversion is slow and highly prone to human error. Especially when you’ll be dealing with complex assemblies, it’s a must. Automating it provides you with many benefits such as– - **Efficiency:** Export all the sheet metal components of the assembly at once automatically, instead of opening each file individually. - **Accuracy:** The macro will give you a hard 1:1 scale in your SolidWorks DXF export, which may be critical to production otherwise. - **Time-Saving:** The entire process is automated, and you can focus on other, more complex issues of design. ## How to Convert a SolidWorks File to DXF Automatically To begin automating the process, you’ll need– - SolidWorks - Basic understanding of VBA and macros The VBA macro forms the backbone of this automation, wherein it looks for sheet metal parts within your assembly and exports their flat patterns as DXF files in a 1:1 scale. ## Here’s A Step-By-Step Breakdown of How It Should be Done ### Step 1: Create a New Macro in SolidWorks Open SolidWorks and go to Tools > Macro > New and choose where you wish to save your new macro file. Choose a folder that is convenient so that you can write the VBA code there and save it. ### Step 2: Implement The Provided VBA Code for Auto-Export of DXF Below is a handy VBA script to loop through all your existing assembly components, check if the part is a sheet metal part, and auto-export it as a DXF file. This is a preview of what the code does in the background: - **Assembly Check:** The macro performs a check to ascertain whether the active document is an assembly or not. In case it is not, the macro displays a warning message, requiring the opening of an assembly, to avoid any mistake. - **Component Loop:** It then iterates through all components of the assembly. - **Part Validation:** For each part, checking if it is a valid part and not yet processed so that duplicates are not exported by accident. - **Flat Pattern Export:** The macro keeps going with the ExportToDWG2 function to flat pattern export. The function is written to flat pattern export SolidWorks export sheet metal DXF with all the right options, such as bend lines. - **File Naming:** File Naming: Lastly, it renames the file from .SLDPRT to .DXF, and also saves it in the same folder as the original part file. ### Step 3: Personalize the Macro You can modify the saveDir variable to select where you want to save the DXF files. Include custom file naming schemes or error handling if needed. ### Step 4: Run the Macro Once you have saved the code in your macro file, go ahead and open your assembly within SolidWorks. Go to **Tools > Macro > Run**, and select the macro file that you saved. The macro will run automatically, saving DXF files for each sheet metal body within your assembly as well as saving them in the provided directory. Now you can see the huge difference from exporting each file separately. ## Benefits of Using SolidWorks Text to DXF Even though the primary purpose of this macro is to export flat patterns for production, the same idea could be applied to do some other tasks as well. For instance, you might export SolidWorks text to DXF using the script. It will be helpful to generate files to laser engrave or mark. The [SolidWorks API](https://bluebyte.biz/solidworks/solidworks-api-programming-languages-comparison-vba-vb-net-and-c/) is highly customizable, and you can develop [automation solutions](https://www.cognizant.com/us/en/glossary/automation-solutions) that are specifically suited to your requirements, so you have full control over what you’re doing. You can automate your SolidWorks macro export flat pattern DXF process and boost productivity, along with avoiding errors effectively. Due to the power of [VBA macros](https://bluebyte.biz/solidworks-vba-macros-library/), you are now able to transform your lengthy, time-consuming process into a quick, auto-action. --- ## Need Assistance with SolidWorks Automation? If you require automation of more of your SolidWorks processes, like sheet metal custom solutions, DXF export, or other niche workflows, Blue Byte Systems is here to help. We specialize in automating SolidWorks and PDM processes for enhanced efficiency and accuracy. Call us today to discuss your needs and let us help you streamline your operations with custom automation solutions! **Categories:** SOLIDWORKS --- ## Pages ### [BLUE BYTE SYSTEMS INC.](https://bluebyte.biz/) **Published:** February 14, 2019 **Author:** Amen Jlili **Excerpt:** **Content:** ![](https://bluebyte.biz/wp-content/uploads/2026/04/PDMPublisher-01-e1758288732696-removebg-preview.png) PDMPublisher Certified SOLIDWORKS Solution Partner Product # Automate publishing of CAD and Office documents Generate your engineering deliverables directly from SOLIDWORKS PDM — PDFs, DXFs, STEP files, flat patterns, merged packages, and more, driven by rules, workflows, and vault metadata. Publishes to 15+ formats - PDF - 3D PDF - DXF - DWG - STEP - IGES - X\_T - STL - U3D - EPRT - EDRW - EASM - IFC - 3MF - HTML [ **PDMPublisher for SOLIDWORKS PDM** For PDM Professional vaults ](https://bluebyte.biz/product/pdmpublisher/) [ **PDMPublisher for SOLIDWORKS** Desktop — no PDM required ](https://bluebyte.biz/product/pdmpublisher-solidworks/) [ ![PDMPublisher demo video preview](https://i.ytimg.com/vi/GYazDFAh45g/maxresdefault.jpg) ](https://www.youtube.com/watch?v=GYazDFAh45g) **See PDMPublisher in action** — The Smarter Way to Export from SOLIDWORKS® and PDM Professional Trusted by engineering teams AROUND THE WORLD ![Oregon Tool (Cutting Tools, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/Oregontool.png)Oregon Tool (Cutting Tools, USA) ![Tigercat Industries (Heavy Forestry, Canada)](https://bluebyte.biz/wp-content/uploads/2025/10/tigercat.png)Tigercat Industries (Heavy Forestry, Canada) ![The Knapheide Company (Truck Bodies, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/Knapheide.png)The Knapheide Company (Truck Bodies, USA) ![Ellison Technologies (SOLIDWORKS Reseller, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/elison.png)Ellison Technologies (SOLIDWORKS Reseller, USA) ![Safran (Aerospace, Europe)](https://bluebyte.biz/wp-content/uploads/2025/10/safran.png)Safran (Aerospace, Europe) ![Hawk Ridge Systems (SOLIDWORKS Reseller, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/hawkridge.png)Hawk Ridge Systems (SOLIDWORKS Reseller, USA) ![Invenio LTD (SOLIDWORKS Reseller, Australia)](https://bluebyte.biz/wp-content/uploads/2025/10/invenio.png)Invenio LTD (SOLIDWORKS Reseller, Australia) ![IVYS Energy Solutions (Clean Technology, Canada)](https://bluebyte.biz/wp-content/uploads/2025/10/ivsy-absorption.png)IVYS Energy Solutions (Clean Technology, Canada) ![SolidBox (Engineering Services, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/solidbox.png)SolidBox (Engineering Services, USA) ![SolidProfessor (Education, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/solidprofessor.png)SolidProfessor (Education, USA) ![Soudronic (Can-making Equipment, Germany)](https://bluebyte.biz/wp-content/uploads/2025/10/soundronic.png)Soudronic (Can-making Equipment, Germany) ![Structured Solutions (Project Management, USA)](https://bluebyte.biz/wp-content/uploads/2025/10/structured-solutions.png)Structured Solutions (Project Management, USA) Blue Byte Systems Services ## Automation, migration, and integration services for SOLIDWORKS and PDM teams We help engineering and manufacturing teams customize SOLIDWORKS, automate SOLIDWORKS PDM, migrate engineering data, connect business systems, and train teams to build better tools. Consulting and development ### Custom VBA macros, add-ins, PDM tools, and engineering system connectors From quick SOLIDWORKS macros to production-ready PDM add-ins and ERP integrations, Blue Byte Systems designs practical software around the way your engineering team already works. - API-driven SOLIDWORKS and PDM automation - Production tools built for engineering workflows - Implementation, support, and team enablement [Discuss Your Project](https://bluebyte.biz/contact/) [View Customization Services](https://bluebyte.biz/service/cad-automation-customization/) ![Certified SOLIDWORKS Solution Partner](https://bluebyte.biz/wp-content/uploads/2026/06/Solution-Partner-Logo.png)### Certified SOLIDWORKS Solution Partner Our certified partner product, PDMPublisher, extends SOLIDWORKS PDM Professional with automated document publishing, PDF merging, exports, and release package generation. - Automated PDFs, STEP files, DXFs, and release packages - Controlled outputs from PDM workflows and transitions - Configurable publishing rules for production vaults ### Services built around real engineering data Each engagement can start small, then grow into a supported internal tool, workflow add-in, migration utility, or connected automation platform. [ 01#### SOLIDWORKS Customization VBA macros, add-ins, task panes, batch tools, drawing automation, and API-driven CAD utilities that remove repetitive model and drawing work. - Drawing creation, note updates, property population, and export automation - Custom task panes, command tabs, batch processors, and design table tools - Model checks, naming rules, metadata cleanup, and release preparation Learn More → ](https://bluebyte.biz/service/cad-automation-customization/) [ 02#### PDM/PLM Integration Connect SOLIDWORKS PDM with ERP, PLM, CRM, databases, web APIs, dashboards, and internal systems without forcing engineers into duplicate entry. - Workflow transition add-ins and vault event automation - ERP item, BOM, revision, and document synchronization - SQL reporting, REST API connectors, dashboards, and status monitors Learn More → ](https://bluebyte.biz/service/pdm-automation-integration/) [ 03#### PDM Data Migration Move legacy CAD files, references, metadata, revisions, and folders into a clean SOLIDWORKS PDM vault with repeatable validation. - Legacy folder analysis, file reference repair, and duplicate detection - Variable mapping, revision import, lifecycle setup, and vault loading - Dry runs, exception reports, and migration scripts your team can trust Learn More → ](https://bluebyte.biz/service/solidworks-pdm-data-migration/) [ 04#### Training & Enablement Online and in-person training for SOLIDWORKS automation, PDM API development, VBA, and C# add-ins, with practical examples your team can extend. - PDM API fundamentals, add-in structure, event handling, and debugging - VBA macro training for SOLIDWORKS models, drawings, and metadata - Custom workshops built around your vault, workflows, and standards Learn More → ](https://bluebyte.biz/service/training-enablement-in-person-or-online/) [ 05#### Microsoft Development WPF desktop apps, Office plugins, web APIs, SQL tools, and Microsoft-based engineering software that connects CAD, PDM, documents, and business data. - C# desktop tools, installers, background services, and admin utilities - Office automation, Excel reporting, document generation, and data checks - SQL Server, Azure, REST APIs, authentication, and internal web services Learn More → ](https://bluebyte.biz/service/microsoft-technologies-development/) [Not sure where to start? #### Tell us about your workflow Describe your vault, your file volume, and the manual steps that slow your team down. We’ll suggest the smallest tool that removes the most manual work — and a realistic path to build it. Discuss Your Project ](https://bluebyte.biz/contact/) Product Spotlight ### PDMShell: scriptable automation for SOLIDWORKS PDM Professional Move past Dispatch. PDMShell runs automation on demand, from PDM events, or as tasks inside SOLIDWORKS PDM Professional — one-off commands, repeatable .pdmshell scripts, visual workflows, and administrator-controlled add-in automation. - Command shell for vault navigation, file operations, search, and cleanup - Repeatable .pdmshell scripts for batch work, migrations, and administrator tasks - Visual editor to build and validate workflows with a guided layout - Approved scripts in PDM command menus, tasks, transitions, and scheduled jobs [Explore PDMShell](https://pdmshell.com/) [Plan Your Automation](https://bluebyte.biz/contact/) Visual Editor Demo The PDMShell visual editor — build, connect, and validate PDM workflow steps. ### A practical delivery process The work is scoped around your vault, CAD standards, business systems, and team capacity so the final tool fits the environment it will run in. **Step 01**#### Discovery Review workflows, pain points, vault structure, file types, data sources, and the business outcome the tool needs to support. **Step 02**#### Prototype Build a focused proof of concept against representative files, variables, workflows, or system endpoints before broad rollout. **Step 03**#### Implement Develop the macro, add-in, migration script, connector, or application with clear configuration and deployment paths. **Step 04**#### Support Train users and administrators, document the workflow, and refine the tool as production edge cases appear. ### SOLIDWORKS PDM, connected to everything around it We build the connectors that keep engineering data flowing between your file sources, SOLIDWORKS PDM Professional, and the business systems your company already runs on. **Engineering data sources**![File Explorer](https://bluebyte.biz/wp-content/uploads/2026/05/icons8-file-explorer-96.png) ![SharePoint](https://bluebyte.biz/wp-content/uploads/2026/05/microsoft_sharepoint_logo_office_icon_145722.png) ![Google Drive](https://upload.wikimedia.org/wikipedia/commons/1/12/Google_Drive_icon_%282020%29.svg) ![Dropbox](https://bluebyte.biz/wp-content/uploads/2026/05/cloud_document_dropbox_file_hosting_files_hosting_storage_icon_123270.png) ⇄ ![SOLIDWORKS](https://upload.wikimedia.org/wikipedia/en/d/d2/SolidWorks_Logo.svg) PDM Professional ⇄ **Business systems**![SAP](https://bluebyte.biz/wp-content/uploads/2026/05/sap_logo_icon_170763.png) ![Salesforce](https://bluebyte.biz/wp-content/uploads/2026/05/salesforce_logo_icon_168852.png) ![Dynamics 365](https://bluebyte.biz/wp-content/uploads/2026/05/Dynamics365-color.svg.png) ![Epicor](https://bluebyte.biz/wp-content/uploads/2026/05/Epicor_Logo_Teal_RGB_1.png) ### What every engagement is measured against Whatever we build — a macro, an add-in, a migration, or a connector — it has to deliver these three things. #### Less manual engineering work Automate repeatable drawing, metadata, export, publishing, and approval tasks that slow down release cycles. #### Cleaner connected data Keep CAD, PDM, ERP, PLM, and reporting data aligned with fewer copy-paste errors and fewer hidden spreadsheets. #### Tools your team can own Deliver practical utilities with documentation, configuration, and training so internal teams can keep improving them. ### Ready to remove the manual work? Tell us about your vault, workflows, and systems — or build in-house skills first with our SOLIDWORKS PDM API courses for VBA, C#, and add-ins. [Discuss Your Project](https://bluebyte.biz/contact/) [View API Courses](https://bluebyte.biz/wp-content/solidworks-pdm-api-courses/) ## Frequently Asked Questions ## Didn’t find what you need? [ Send Us a Message ](https://bluebyte.biz/contact/) What does Blue Byte Systems Inc. do? Blue Byte Systems develops automation and integration tools for SOLIDWORKS and SOLIDWORKS PDM, helping engineering teams eliminate manual steps, standardize workflows, and scale their data management systems. Are you an official SOLIDWORKS partner? Yes. Blue Byte Systems Inc. is a **SOLIDWORKS Solution Partner**, trusted by resellers and enterprise customers worldwide. What products do you offer? We offer a suite of PDM automation tools including: - [**PDMPublisher** ](https://pdmpublisher.com)— Automates exports (PDF, DXF, STEP, etc.) from SOLIDWORKS and PDM. - [**PDMShell** ](https://pdmshell.com)— A scripting environment for advanced PDM automation. Do you provide training on the SOLIDWORKS PDM API? Yes. We host intensive [**3-day PDM API Bootcamps** ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/)focused on add-ins, task automation, and real-world API development as well as **online self-paced courses**. Do you offer consulting or project-based development? **Yes**. We provide full-service API consulting, custom automation, and PDM integration across the entire SOLIDWORKS ecosystem. This often involves: - Developing custom add-ins and task scripts to automate engineering or release processes. - Integrating PDM data with systems such as Epicor, SAP, Arena PLM, Aras Innovator, and Monday.com. - Designing data migration strategies for legacy systems or Workgroup PDM to PDM Professional transitions. - Implementing revision synchronization, batch export tools, and BOM automation. - Creating bespoke dashboards, REST APIs, and connectors that expose engineering data to downstream systems (manufacturing, purchasing, or quality). Products licensing & support **How is licensing managed?** Licenses can be per seat, per vault, or enterprise — depending on your team size and deployment needs. Subscription and perpetual options are available. **What’s included with support?** All licenses include email support, bug fixes, and minor version updates. Premium support plans offer faster response and feature customization options. **Can I transfer my license to another machine or user?** Yes, licenses can be deactivated on one machine and reactivated on another at any time. **Do you offer volume or reseller pricing?** [Yes, we have partner and reseller programs with discounted tiers and referral bonuses.](/contact) --- ### [Customise folders columns in PDM Professional](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/) **Published:** January 24, 2025 **Author:** Amen Jlili **Content:** # Assign Column Sets to Specific Folders ## What Does this PDM Add-in Do? - Define unique column layouts for different folders in the vault. - Enhance productivity by ensuring relevant information is always at hand without manual adjustments. Email Name Company Name \*First Last Email \*Professional email required. Company Get Folder Columns Manager Add-in by E-mail![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) ## Overview The Folder Columns Manager add-in is a powerful tool designed to streamline the file browsing experience in SOLIDWORKS PDM. It gives administrators and users a simple way to customise folders columns in PDM Professional by applying tailored column layouts in Windows file explorer for specific folders within the vault. ## Reviews ![](https://bluebyte.biz/wp-content/uploads/2025/11/2020-ReconCraft-Logo-1024x124.png) “I can map columns sets to different folders! You have no idea how long I wished for that ability.” ***John F., ReconCraft, LLC*** ![](https://bluebyte.biz/wp-content/uploads/2025/11/Velux_logo.svg-1.png) “Hi Amen, I can inform you that I did not experience any problems downloading or installing the add-in. It works fine for me in SolidWorks PDM 2024 SP05. However, I just had to figure out how to write mapping properties and I think it could be a really useful tool in the long run.” ***Johnny Nygaard, Process Development Manager & Cad specialist hos VELUX*** #### Looking to customize this tool? [ CONTACT US ](https://bluebyte.biz/contact/) --- ### [SWUG](https://bluebyte.biz/swug/) **Published:** August 25, 2026 **Author:** Amen Jlili **Content:** This page contains presentation links of previous SOLIDWORKS APIs user group presentations: - [The SOLIDWORKS Document API Manager (Intro): 2026-08-25](https://bluebyte.biz/wp-content/uploads/2026/08/The-SOLIDWORKS-Document-Manager-API_Jlili.pptx) --- ### [Blog](https://bluebyte.biz/blog/) **Published:** November 29, 2018 **Author:** Amen Jlili **Excerpt:** **Content:** # CAD, PLM & Automation JOURNAL Practical tutorials, macro examples, and automation strategies for CAD, PDM, and PLM professionals. For [custom development](https://bluebyte.biz/consulting-process/), PDM migration, contact us. [![Folder pane listing numeric ranges from 3000-3999 up to 8000-8999 in 1000-step folders.](https://bluebyte.biz/wp-content/uploads/2026/08/image.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/)### [ Why Serial Numbers and Folder Number Ranges Keep Your SOLIDWORKS PDM Vault Fast ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) Amen Jlili August 14, 2026 No Comments Every PDM administrator eventually runs into the same argument. One camp says the vault is a database, so folders are irrelevant and you should just search for what you need. The other camp says folders matter, because the day the “LIBRARY” folder takes forty seconds to open, everybody notices. Both camps are right, and the resolution is not a compromise between them. It is a naming convention. The debate, as it actually plays out A thread on the MyCAD forum captures this perfectly. A user asked whether SOLIDWORKS PDM should use a minimalist structure with one big library folder, or many categorized folders. [ View Full Post ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) [![](https://bluebyte.biz/wp-content/uploads/2025/09/PDMPublisher-01-1.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/)### [ How to Get a Free PDMPublisher Trial License ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) Amen Jlili August 4, 2026 No Comments PDMPublisher helps SOLIDWORKS PDM Professional users automatically generate, export PDF, DXF. It is a great alternative to the convert task and combine documents. You can request a free PDMPublisher trial license through the Blue Byte Systems online store.This article explains how to submit your request, install the software, and activate your trial. System requirements Before requesting a trial, confirm that your environment meets these minimum requirements: PDMPublisher requires SOLIDWORKS PDM Professional and does not support SOLIDWORKS PDM Standard. Request your free trial The seat pricing displayed on the product page is provided for reference only. You will not be charged for [ View Full Post ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) [![Host with a microphone in the foreground; a dark screen shows a SolidWorks PDM window and an orange starburst logo in the background, with the title 'SOLIDWORKS PDM WITH CLAUDE'](https://bluebyte.biz/wp-content/uploads/2026/08/claude.png) ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/)### [ Using Claude with SOLIDWORKS PDM through the PDMShell MCP Server ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) Amen Jlili August 1, 2026 No Comments Most SOLIDWORKS PDM administrators are used to working through Windows Explorer, administration tools, scripts, and custom add-ins. These tools are powerful, but even a simple question can require several steps. For example: The PDMShell MCP Server provides another way to work with this information. It connects Claude to SOLIDWORKS PDM through PDMShell, allowing users to ask questions about their vault using normal language. What is MCP? MCP stands for Model Context Protocol. It provides a standard way for an AI application such as Claude to connect to external tools and data sources. Claude does not connect directly to the PDM database. [ View Full Post ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) [![PDMShell workflow editor showing a dark IDE interface with a flowchart: Begin circle → Check out → Navigate to a vault folder → Run SOLIDWORKS Macro → Check in → + Add a new action; right panel labeled Command Parameters with fields for directory and id; bottom purple console line reading 'Good evening, jilili! Welcome to PDMShell.'](https://bluebyte.biz/wp-content/uploads/2026/06/visual-code-editor-templated-macro-run.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/)### [ PDMShell vs. PowerShell: The CAD Admin’s Guide to Engineering Automation ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) Amen Jlili June 27, 2026 No Comments If you work in engineering IT or CAD administration, you’ve likely spent hours trying to make different software systems talk to each other. When searching for ways to automate these clunky processes, two tools with confusingly similar names always pop up: PowerShell and PDMShell. They sound like variations of the same thing, but they aren’t. One is a massive tool built by Microsoft for managing entire corporate networks. The other is a sharp, niche utility built by Blue Byte Systems specifically for SOLIDWORKS PDM Professional. Let’s break down what they actually do, how they differ, and why you might end up [ View Full Post ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) [![Flowchart: Begin → Check in → Exit PDMShell → Add a new action (dashed line) on the right.](https://bluebyte.biz/wp-content/uploads/2026/06/image-3.png) ](https://bluebyte.biz/solidworks/solidworkspdm/automate-weekly-solidworks-pdm-check-ins-with-pdmshell-and-windows-task-scheduler/)### [ Automate Weekly SOLIDWORKS PDM Check-Ins with PDMShell and Windows Task Scheduler ](https://bluebyte.biz/solidworks/solidworkspdm/automate-weekly-solidworks-pdm-check-ins-with-pdmshell-and-windows-task-scheduler/) Amen Jlili June 3, 2026 No Comments This article explains how to use PDMShell with Windows Task Scheduler to automatically check in files from a SOLIDWORKS PDM vault folder on a weekly schedule. PDMShell is a command-line tool for SOLIDWORKS PDM that allows administrator to run PDM operations from scripts. By combining PDMShell with Windows Task Scheduler, you can automate recurring PDM tasks such as logging in to a vault, navigating to a folder, searching for files, and checking in files. Before setting this up, make sure PDMShell is installed on the computer that will run the scheduled task. The computer must also have a local PDM vault [ View Full Post ](https://bluebyte.biz/solidworks/solidworkspdm/automate-weekly-solidworks-pdm-check-ins-with-pdmshell-and-windows-task-scheduler/) [![SOLIDWORKS Add-Ins dialog with a highlighted ScanTo3D entry and OK/Cancel buttons.](https://bluebyte.biz/wp-content/uploads/2026/05/addin-manager-transparent.png) ](https://bluebyte.biz/solidworks/solidworks-task-pane-icons-fixing-transparency-issues/)### [ SOLIDWORKS Task Pane Icons: Fixing Transparency Issues ](https://bluebyte.biz/solidworks/solidworks-task-pane-icons-fixing-transparency-issues/) Amen Jlili May 17, 2026 No Comments When creating a SOLIDWORKS task pane, the SOLIDWORKS API documentation says that icon transparency can be handled by using a specific background color. For CreateTaskpaneView3, the documentation explains that task pane bitmap images should use a 256-color palette, and that the transparent area should use the following color: The expectation is simple: wherever the icon uses that gray color, SOLIDWORKS should treat it as transparent. In practice, that does not always work. You may create the icon exactly as described, use the correct gray background color, and still see a gray box behind the icon inside SOLIDWORKS. The documentation suggests that [ View Full Post ](https://bluebyte.biz/solidworks/solidworks-task-pane-icons-fixing-transparency-issues/) Load More Posts You made all the way to our first post! Congratulations! --- ### [Checkout](https://bluebyte.biz/checkout/) **Published:** May 11, 2026 **Author:** Shahmeer **Content:** # Checkout - Secure SSL Encrypted Payment Have a coupon? [Click here to enter your code](#coupon_two) If you have a coupon code, please apply it below. Apply coupon **💱 Payment Information: All orders are processed in USD. Local currency prices are provided for reference only and may vary.** ## Billing details orFirst name \* \* Last name \* \* Company name (optional) Country / Region \*Select a country / region…AfghanistanÅland IslandsAlbaniaAlgeriaAmerican SamoaAndorraAngolaAnguillaAntarcticaAntigua and BarbudaArgentinaArmeniaArubaAustraliaAustriaAzerbaijanBahamasBahrainBangladeshBarbadosBelarusBelauBelgiumBelizeBeninBermudaBhutanBoliviaBonaire, Saint Eustatius and SabaBosnia and HerzegovinaBotswanaBouvet IslandBrazilBritish Indian Ocean TerritoryBruneiBulgariaBurkina FasoBurundiCambodiaCameroonCanadaCape VerdeCayman IslandsCentral African RepublicChadChileChinaChristmas IslandCocos (Keeling) IslandsColombiaComorosCongo (Brazzaville)Congo (Kinshasa)Cook IslandsCosta RicaCroatiaCubaCuraçaoCyprusCzech RepublicDenmarkDjiboutiDominicaDominican RepublicEcuadorEgyptEl SalvadorEquatorial GuineaEritreaEstoniaEswatiniEthiopiaFalkland IslandsFaroe IslandsFijiFinlandFranceFrench GuianaFrench PolynesiaFrench Southern TerritoriesGabonGambiaGeorgiaGermanyGhanaGibraltarGreeceGreenlandGrenadaGuadeloupeGuamGuatemalaGuernseyGuineaGuinea-BissauGuyanaHaitiHeard Island and McDonald IslandsHondurasHong KongHungaryIcelandIndiaIndonesiaIraqIrelandIsle of ManItalyIvory CoastJamaicaJapanJerseyJordanKazakhstanKenyaKiribatiKosovoKuwaitKyrgyzstanLaosLatviaLebanonLesothoLiberiaLiechtensteinLithuaniaLuxembourgMacaoMadagascarMalawiMalaysiaMaldivesMaliMaltaMarshall IslandsMartiniqueMauritaniaMauritiusMayotteMexicoMicronesiaMoldovaMonacoMongoliaMontenegroMontserratMoroccoMozambiqueMyanmarNamibiaNauruNepalNetherlandsNew CaledoniaNew ZealandNicaraguaNigerNigeriaNiueNorfolk IslandNorth MacedoniaNorthern Mariana IslandsNorwayOmanPakistanPalestinian TerritoryPanamaPapua New GuineaParaguayPeruPhilippinesPitcairnPolandPortugalPuerto RicoQatarReunionRomaniaRussiaRwandaSão Tomé and PríncipeSaint BarthélemySaint HelenaSaint Kitts and NevisSaint LuciaSaint Martin (Dutch part)Saint Martin (French part)Saint Pierre and MiquelonSaint Vincent and the GrenadinesSamoaSan MarinoSaudi ArabiaSenegalSerbiaSeychellesSierra LeoneSingaporeSlovakiaSloveniaSolomon IslandsSomaliaSouth AfricaSouth Georgia/Sandwich IslandsSouth KoreaSouth SudanSpainSri LankaSurinameSvalbard and Jan MayenSwedenSwitzerlandTaiwanTajikistanTanzaniaThailandTimor-LesteTogoTokelauTongaTrinidad and TobagoTunisiaTürkiyeTurkmenistanTurks and Caicos IslandsTuvaluUgandaUkraineUnited Arab EmiratesUnited Kingdom (UK)United States (US)United States (US) Minor Outlying IslandsUruguayUzbekistanVanuatuVaticanVenezuelaVietnamVirgin Islands (British)Virgin Islands (US)Wallis and FutunaWestern SaharaYemenZambiaZimbabwe Street address \* Apartment, suite, unit, etc. (optional) Town / City \* (optional) State / County \* Select an option…AlabamaAlaskaArizonaArkansasCaliforniaColoradoConnecticutDelawareDistrict of ColumbiaFloridaGeorgiaHawaiiIdahoIllinoisIndianaIowaKansasKentuckyLouisianaMaineMarylandMassachusettsMichiganMinnesotaMississippiMissouriMontanaNebraskaNevadaNew HampshireNew JerseyNew MexicoNew YorkNorth CarolinaNorth DakotaOhioOklahomaOregonPennsylvaniaRhode IslandSouth CarolinaSouth DakotaTennesseeTexasUtahVermontVirginiaWashingtonWest VirginiaWisconsinWyomingArmed Forces (AA)Armed Forces (AE)Armed Forces (AP) Postcode / ZIP (optional) (optional) Phone (optional) Email address \* \* ### Additional information Order notes (optional) Customer identification (optional) ### Your order Product Subtotal Folder Column ManagerFolder Column Manager **× 1** $3,000.00USD Subtotal US$3,000.00 Tax US$0.00 Total **$3,000.00** USD - Credit / Debit Card Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our [privacy policy](https://bluebyte.biz/privacy/). ### Terms of Service Terms governing the usage of our software, digital platforms, and general service delivery. **Welcome to Blue Byte Systems Inc.** By using our products, services, and website, you agree to comply with and be bound by the following terms and conditions. If you do not agree with these terms, you should not use our services or products. ## Introduction Welcome to Blue Byte Systems Inc. (“we,” “us,” or “our”). These terms of service define the relationship between our company and our users, detailing user responsibilities and the rules for interacting with our software platforms. ## Use of Products and Services Our products and services are intended for use as described in the accompanying documentation. You agree to use our products and services in a manner consistent with all applicable laws and regulations. Any unauthorized use of our products or services is prohibited. ## Limitation of Liability To the fullest extent permitted by law, Blue Byte Systems Inc. shall not be liable for any direct, indirect, incidental, special, or consequential damages resulting from the use or inability to use our products or services. This includes, but is not limited to, damages for loss of profits, data, or other intangible losses. Your use of our products is entirely at your own risk. ## Warranty Disclaimer Our products and services are provided “as is” and “as available” without any warranties of any kind, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and non-infringement. We do not warrant that services will be uninterrupted or error-free. ## Indemnification You agree to indemnify, defend, and hold harmless Blue Byte Systems Inc., its officers, directors, employees, and agents from any claims, damages, losses, and expenses (including legal fees) arising out of your misuse of the services or violation of these terms. ## Governing Law These terms and conditions are governed by and construed in accordance with the laws of the province of British Columbia, Canada. Any legal action or proceeding arising under these terms will be brought exclusively in the courts located in British Columbia. By using our products, you acknowledge you have read and agree to be bound by these terms. I have read and agree to the website [terms and conditions](https://bluebyte.biz/terms-of-service/) \* Complete Purchase --- ### [Consulting Process](https://bluebyte.biz/consulting-process/) **Published:** July 23, 2024 **Author:** Amen Jlili **Content:** # Engineering Precision Through Tailored CAD & PDM Consulting Started in late **2020** by **Amen Jlili**, **Blue Byte Systems Inc.** is based in **Vancouver, Canada**. We specializes in delivering cutting-edge solutions for the SOLIDWORKS and SOLIDWORKS PDM ecosystems. We provide a comprehensive range of services, including custom API solutions, tailored macros, PDM data migration, and online training programs. [ Explore Our Process ](#bb-consulting-process) [ Schedule Consultation ](#bb-consulting-process) ## OUR EXPERTISE ![SOLIDWORKS Customization Icon](https://bluebyte.biz/wp-content/uploads/2025/08/Blue-Icon-32-Pixel-1.svg) ### SOLIDWORKS ECOSYSTEM CUSTOMIZATION AND AUTOMATION ### SOLIDWORKS PDM PROFESSIONAL DATA MIGRATION ### .NET DESKTOP SOFTWARE DEVELOPMENT (Winforms, WPF, UWP) ### SOLIDWORKS ECOSYSTEM APIs TRAINING ## OUR CONSULTING PROCESS HOW WE WORK ### Our 4-Step Scoping Process From initial technical discovery to fixed-scope deployment, we ensure seamless CAD & PDM engineering execution. 1 #### Technical Discovery Meeting Connect directly with Amen Jlili and the Blue Byte team to define your workflow requirements and targets. 2 #### Vault & Data Audit We analyze your existing SOLIDWORKS assemblies, custom macros, network drives, or legacy PDM structures. 3 #### Fixed Scope Roadmap Receive a transparent fixed-price proposal and time-bound project implementation roadmap within 48 hours. 4 #### Development & Delivery Custom C# Add-ins, API utilities, or PDM data migrations deployed with 99.8% precision and full team training. Schedule Discovery Call & Meeting --- ### [Contact](https://bluebyte.biz/contact/) **Published:** August 15, 2019 **Author:** Amen Jlili **Content:** Certified SOLIDWORKS® Solution Partner # CONTACT BLUE BYTE SYSTEMS Specializing in automating SOLIDWORKS, CAD, and PLM workflows. Get in touch with our engineering team today. Response within 24h Certified CAD/PDM Partner Free Technical Discovery ## CONTACT US Fill in your requirements below for an immediate project response. Email Company Type Macro Customization Other General Contact PDMPublisher PDMShell SOLIDWORKS Customization SOLIDWORKS PDM Customization SOLIDWORKS PDM Migration Training Message SEND MESSAGE Or speak/write to a member of the Blue Byte Systems team: ### Phone (9AM PT - 4PM PT) Canada: [778 200 2012](tel:7782002012) Copy Worldwide: [+1 778 200 2012](tel:+17782002012) Copy ### Email Sales/Training: Copy Technical Support: [support@bluebyte...](mailto:support@bluebytesystemsinc.zohodesk.com "support@bluebytesystemsinc.zohodesk.com") Copy ### Blue Byte Systems Inc. (Appointment Required) 170-122 Richards St Vancouver, BC V6B 2Z4, Canada ⚡ INSTANT ONLINE SCHEDULING ## Book a Call with Blue Byte Systems Schedule a direct 1-on-1 meeting with our SOLIDWORKS, PDM API, and PLM automation engineers. Select your preferred date and time below. ⏱️ 30-Min Technical Discovery 💻 Live API & Workflow Demo 📋 Custom Quote & Scope --- ### [Terms Of Purchase](https://bluebyte.biz/terms-of-purchase/) **Published:** August 27, 2024 **Author:** Amen Jlili **Content:** ### Terms of Purchase Terms governing the usage of our software, digital platforms, and general service delivery. - Last modified on June 24, 2026 - [ Published On August 27, 2024 ](https://bluebyte.biz/2024/08/27/) Navigation [Introduction](#introduction) [Software Licenses](#licenses) [Subscriptions](#subscriptions) [Professional Services](#services) [Delivery](#delivery) [Payment Terms](#payment) [No Refunds](#refunds) # Terms of Purchase ## Introduction These Terms of Purchase ("Terms") govern the purchase of software licenses, subscriptions, and professional services ("Software and Services") provided by Blue Byte Systems Inc. ("Blue Byte Systems," "we," "us," or "our"). By purchasing or using our Software and Services, you ("Customer") agree to be bound by these Terms. If you do not agree, do not purchase or use our Software and Services. ## Software Licenses - All software is licensed, not sold. - Your purchase grants you a non-exclusive, non-transferable, limited license to use the software in accordance with: - The purchased license type - The license term - The applicable End User License Agreement (EULA) - License keys may include technical enforcement mechanisms such as: - Activation - Hardware locking - Subscription expiration ## Subscriptions - Subscription licenses are valid for the purchased term. Upon expiration: - Software functionality may be limited or disabled. - Continued use requires renewal. Subscription fees are non-refundable once the license key has been issued. ## Professional Services Professional services may include: - Technical support - Training - Consulting - Implementation assistance - Custom development Services are provided remotely unless otherwise agreed. ### Service Hours - Must be scheduled in advance - Are billed hourly or in pre-paid blocks - Must be used within the agreed service period Unused service hours are non-refundable unless otherwise agreed in writing. ## Delivery Software licenses are delivered electronically, typically via: - License key - Download link - Customer portal Delivery is considered complete once the license key or download access has been issued. ## Payment Terms Payment is due in full prior to: - License key issuance - Subscription activation - Delivery of services Unless otherwise agreed in writing. All fees are non-refundable. ## No Refunds ALL SALES ARE FINAL. Blue Byte Systems Inc. does not provide refunds for software licenses, subscription licenses, support services, or training services. Except where required by applicable law. ## Warranty Disclaimer Software and Services are provided **"AS IS"** without warranty of any kind. Blue Byte Systems Inc. disclaims all implied warranties, including merchantability, fitness for a particular purpose, and non-infringement. We do not guarantee uninterrupted or error-free operation. ## Limitation of Liability To the maximum extent permitted by law, Blue Byte Systems Inc. shall not be liable for loss of profits, data, business interruption, or indirect damages. Total liability shall not exceed the amount paid for the Software or Services. ## License Compliance Customer agrees not to share license keys, circumvent enforcement, or reverse engineer the software. Violation may result in license termination. ## Governing Law Governed by the laws of **British Columbia, Canada**. Jurisdiction: Vancouver, British Columbia. ## Entire Agreement These Terms, together with the applicable EULA, constitute the complete agreement. ## Acceptance By purchasing or using Blue Byte Systems Software and Services, you acknowledge that you have read and agree to these Terms. Last Updated: October 2023 --- ### [Terms of Service](https://bluebyte.biz/terms-of-service/) **Published:** May 5, 2019 **Author:** Amen Jlili **Content:** ### Terms of Service Terms governing the usage of our software, digital platforms, and general service delivery. - Last modified on June 24, 2026 - [ Published On May 5, 2019 ](https://bluebyte.biz/2019/05/05/) **Welcome to Blue Byte Systems Inc.**By using our products, services, and website, you agree to comply with and be bound by the following terms and conditions. If you do not agree with these terms, you should not use our services or products. ## Introduction Welcome to Blue Byte Systems Inc. ("we," "us," or "our"). These terms of service define the relationship between our company and our users, detailing user responsibilities and the rules for interacting with our software platforms. ## Use of Products and Services Our products and services are intended for use as described in the accompanying documentation. You agree to use our products and services in a manner consistent with all applicable laws and regulations. Any unauthorized use of our products or services is prohibited. ## Limitation of Liability To the fullest extent permitted by law, Blue Byte Systems Inc. shall not be liable for any direct, indirect, incidental, special, or consequential damages resulting from the use or inability to use our products or services. This includes, but is not limited to, damages for loss of profits, data, or other intangible losses. Your use of our products is entirely at your own risk. ## Warranty Disclaimer Our products and services are provided "as is" and "as available" without any warranties of any kind, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and non-infringement. We do not warrant that services will be uninterrupted or error-free. ## Indemnification You agree to indemnify, defend, and hold harmless Blue Byte Systems Inc., its officers, directors, employees, and agents from any claims, damages, losses, and expenses (including legal fees) arising out of your misuse of the services or violation of these terms. ## Governing Law These terms and conditions are governed by and construed in accordance with the laws of the province of British Columbia, Canada. Any legal action or proceeding arising under these terms will be brought exclusively in the courts located in British Columbia. By using our products, you acknowledge you have read and agree to be bound by these terms. --- ### [Thank You](https://bluebyte.biz/thank-you/) **Published:** June 8, 2026 **Author:** Shahmeer **Content:** Welcome to Blue Byte Systems ![Blue Byte Systems](https://bluebyte.biz/wp-content/uploads/2026/02/Blue-Byte-Inc-Fest-286x126-01.png) Payment confirmed # Your subscription is active. You received an order receipt by email. To access your courses, you need an account on bluebyte.biz — use one of the two options below. **Already have an account?** Go directly to your account page — your course access is already linked to your email address. How to access your courses 1 **Already have an account?** Click "Go to My Account" below, log in, and your courses will be waiting. **Important:** Register using the same email address you used for payment, otherwise your subscription may not link automatically. 2 **Register / Sign up** Create your account using the same email you used during payment. 3 **Once logged in** Go to My Account → [ My Courses ](https://bluebyte.biz/courses-2/) to start learning. [ Go to My Account → ](https://bluebyte.biz/account) [ 🔒 Create a New Account ](https://bluebyte.biz/wp-login.php?action=register) Need help? [Contact Blue Byte Systems](https://bluebyte.biz/contact/) · Questions about your subscription? Reach out via Slack or Microsoft Teams as a subscriber. --- ### [Unlock Your Potential With The Best SOLIDWORKS API Course](https://bluebyte.biz/become-a-solidworks-api-developer/) **Published:** January 18, 2025 **Author:** Amen Jlili **Content:** ## THE BEST API COURSES ## Everything You Need To Automate Your SOLIDWORKS Workflow in One Place! Ready to take the step from SOLIDWORKS user to SOLIDWORKS developer? This SOLIDWORKS API course is your one-stop shop for mastering [SOLIDWORKS API automation](https://bluebyte.biz/blye-byes-testing-page/) and supercharging your designs. Created by industry expert Amen Jlili, this bundle of courses is designed to introduce you to, and make you proficient in, SOLIDWORKS programming concepts. No more “clueless copy-pasting” of code—you’ll learn in detail how to build your own custom solutions… *Awesome SolidWorks API Learning Course!! **Deepak Gupta**, **SOLIDWORKS Influencer*** ## Get The Best Out of SolidWorks Development With Our API Courses! ![SolidWorks API Course and Alt text: An image featuring four book covers related to SolidWorks and Microsoft Visual Basic programming. From left to right: 1) A blue book titled 'SolidWorks PDM API: Basics in VBA' priced at $50, with a Microsoft Visual Basic logo. 2) A blue book titled 'API: Write Add-ins in C#' priced at $50, with a Visual Studio logo. 3) A large red book titled 'Mastering the SolidWorks API: Automate Your Workflow with VBA' priced at $200, featuring a SolidWorks logo and mentioning a 10-hour SolidWorks course. 4) A book titled 'Tips & Tricks to Master the SolidWorks PDM API' priced at $50, with a SolidWorks PDM logo. Each book is displayed with its price tag prominently shown.](https://bluebyte.biz/wp-content/uploads/2025/01/bundle-no-button-no-header.png) ## THE OFFER TODAY: ## $1500 ## JUST $799! [ Become a SOLIDWORKS API Developer ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) ## UNDERSTAND GPT GENERATED CODE. NO MORE CLUELESS COPYPASTE. This learning package is designed with utmost care to make you understand and grasp GPT-Generated Code effortlessly. No More Guesswork or Fortunate Copypaste ![This is a interface of ChatGPT that shows how you can develop the code of solidworks API](https://bluebyte.biz/wp-content/uploads/2025/01/gpt-code-.gif) ## Get a special $50 eBook on SOLIDWORKS PDM API automation—totally free! ![An image featuring a book cover and digital devices displaying information about "50 Tips & Tricks of the SolidWorks PDM API." The book has a blue cover with a light bulb icon and the title "Tips & Tricks to Master the SolidWorks PDM API" prominently displayed. The book is accompanied by a smartphone and a tablet, both showing the same cover. Additional text highlights that this is an e-book and book compiling 50 useful tips and tricks for the SolidWorks PDM API, including PDM API code examples in C#, VB.NET, which can save hours of research and debugging, and help become a better API developer. The image is branded with the BlueByte logo at the bottom right.](https://bluebyte.biz/wp-content/uploads/2025/01/thumbnail-1.png) PROVIDED UPON REQUEST FOR PURCHASING CUSTOMERS ## THE OFFER = $ 799 LIMITED TIME OFFER. - Over 10 hours of training videos. - Mastering the SOLIDWORKS API: Automate Your Workflow with VBA - SOLIDWORKS PDM Professional API: Learn the basics in VBA - SOLIDWORKS PDM Professional API: Write PDM Add-ins in C# - Lifetime access. - Self-paced progress, no rush. - Technical support via Slack or Teams by author. - Our PDM API Tips and Tricks Guide (50 secrets of the SOLIDWORKS PDM API) [ ADD TO CART🛒 & CHECKOUT💳 ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) 💳SECURE PAYMENT PROCESSED BY STRIPE. YOUR PERSONAL INFORMATION IS PROTECTED. OFFER EXPIRES BY FEB 23TH. ## Individual Course Offerings You can also purchase the courses individually based on your own SOLIDWORKS development needs. ### = 🎓MASTERING THE SOLIDWORKS API $ 699 - Learn VBA and SOLIDWORKS API fundamentals. - VBA Fundamentals - Advanced VBA Concepts - VBA User Forms & Events - SOLIDWORKS API Object Model - Key SOLIDWORKS API Functionalities - Configurations & Document Templates - Part Automation - Assembly Automation - Drawing Automation [ GET THIS COURSE ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) 💳SECURE PAYMENT PROCESSED BY STRIPE. YOUR PERSONAL INFORMATION IS PROTECTED. OFFER EXPIRES BY FEB 23TH. ### + 🎓SOLIDWORKS PDM PROFESSIONAL API (1) $ 299 - Learning the basics of the SOLIDWORKS PDM API with VBA. - Introduction - Settings up your environment - Hello Vault in VBA - Logging into the Vault (IEdmVault5) - Working with files and folders (IEdmFile5 and IEdmFolder5) - Traversing folder structure (IEdmFile5 and IEdmFolder5) - Check-in and check-out operations - Reading and edit datacard variables [ GET THIS COURSE ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) 💳SECURE PAYMENT PROCESSED BY STRIPE. YOUR PERSONAL INFORMATION IS PROTECTED. OFFER EXPIRES BY FEB 23TH. ### + 🎓SOLIDWORKS PDM PROFESSIONAL API (2) $ 499 - Learn how to write PDM add-ins in Visual Studio with C#. - Introduction - PDM add-in requirements - Creating Visual Studio project - Implementing IEdmAddIn5::GetAddInInfo method - Implementing IEdmAddIn5::OnCmd method - How to build and add a PDM add-in to vault - How to debug a PDM add-in in Visual Studio - Closing Remarks [ GET THIS COURSE ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) 💳SECURE PAYMENT PROCESSED BY STRIPE. YOUR PERSONAL INFORMATION IS PROTECTED. OFFER EXPIRES BY FEB 23TH. After finishing your courses, celebrate your achievement and show industry experts with a BlueByte authorized certificate of completion! A free preview from **SOLIDWORKS PDM API:** Write Add-ins in C# ## HOW TO IMPLEMENT IEDMADDIN5 INTERFACE C#? ![](https://bluebyte.biz/wp-content/uploads/2024/12/solidowrks-pdm-api-thumbnail.png) [ Youtube ](https://www.youtube.com/@BlueByteSystemsInc?sub_confirmation=1) **FREE PREVIEW FROM MASTERING THE SOLIDWORKS API** ## THREE WAYS TO WRITE HELLO WORLD IN VBA? ![](https://cdn-ilacncj.nitrocdn.com/RtZAOJSIpUfqnjeuokJknkjieDmOhMZE/assets/images/optimized/rev-6f06a21/excelchamps.com/wp-content/uploads/2021/07/vba-varaiable-messagebox.png) Name \*First Last Email Name Email \*Professional email required. SEND ME![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) ## CELEBRATE YOUR ACHIEVEMENT WITH A CERTIFICATE 🏆 ![](https://bluebyte.biz/wp-content/uploads/2024/12/certificate_sample-1024x784.png) ## WHAT OUR STUDENTS SAID ![Alt text: A screenshot of an X post by Roberto Bocchini, an engineer at TELEG sri, dated February 2025, showcasing achievements. The post includes an image of two certificates for completing the "Mastering the SolidWorks API Course," one from BlueByte and one from SolidWorks, featuring Roberto Bocchini's name, a QR code, and official stamps. The post has 12 likes and 4 comments. Comments include: Amen Jili congratulating Roberto on his SolidWorks API course completion and inviting connection; Roberto Bocchini responding to Amen Jili about a mind-blowing video on Tetris in SolidWorks, with Amen Jili replying positively. Options to love, comment, repost, and send are visible below the post.](https://bluebyte.biz/wp-content/uploads/2025/03/testomonal-solidworks-api-vba.png) ## Get Instruction From The Industry Expert Instructor of this course, Amen Jlili, is a well-accepted SOLIDWORKS development expert with field experience to boost your productivity. Also— ![](https://bluebyte.biz/wp-content/uploads/2024/12/Ajay-Randhawa-Photography-7-Small.jpg) ##### **Amen Jlili** - Technical Director and Founder, Blue Byte Systems Inc., a Vancouver, Canada-based software company. - Created a variety of courses and open-source frameworks on the [SOLIDWORKS API](https://www.youtube.com/watch?v=D0HywJrycBQ&t=385s) and [PDM API](https://pdmsdk.bluebyte.biz/). - Amen Jlili authored the SOLIDWORKS PDM Best Practices Guide for Dassault Systèmes SOLIDWORKS Corp. - He also created the CSWP-API certification exam, creating a benchmark for knowledge in SOLIDWORKS API programming. - Chairman of the SOLIDWORKS APIs Usergroup. - Owner of [cadoverflow.com](https://www.cadoverflow.com/), the Q/A discussion board for SOLIDWORKS API programmers. [Follow on LinkedIn](https://www.linkedin.com/comm/mynetwork/discovery-see-all?usecase=PEOPLE_FOLLOWS&followMember=jliliamen) ## REVIEWS📢 ### ⭐⭐⭐⭐⭐ Probably the best SOLIDWORKS API course on the internet ***Garrett Klein, Technical Account Manager at a US-Canada SOLIDWORKS Reseller*** ### ⭐⭐⭐⭐⭐ This course is a well-rounded introduction to automating tasks in SOLIDWORKS using VBA. With its strong emphasis on both programming fundamentals and SOLIDWORKS-specific automation, it is ideal for engineers or designers looking to streamline their workflows and boost productivity. ***Deepak Gupta**, **SOLIDWORKS Influencer*** ### ⭐⭐⭐⭐⭐ *I like this course… it will help many of us who want to build careers in this field. keep it up… **Rutik Bhume, Senior Applications Engineer at*** **[*Best Engineering Aids & Consultancies (BEACON), India.*](https://beacon-india.com/company/)** ## THE OFFER TODAY: ## $1500 ## JUST $799! [ ADD TO CART🛒 & CHECKOUT💳 ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) ## FREQUENTLY ASKED QUESTIONS ## Invest in Your Skills with This SOLIDWORKS API Course Don’t miss out on these amazing SOLIDWORKS offers and start your SOLIDWORKS development right away. This SOLIDWORKS API course is a valuable investment in your professional life, enabling you to automate difficult tasks and make yourself stand out in your field. ![The SOLIDWORKS APIs](https://bluebyte.biz/wp-content/uploads/2024/07/Red-Icon-32-Pixel.svg) SOLIDWORKS 3D\* ![](https://blog-assets.solidworks.com/uploads/sites/15/2021/10/pdm20logo.png) SOLIDWORKS PDM Professional\* ![](https://bluebyte.biz/wp-content/uploads/2024/12/VBA-LOGO.svg) Visual Basic for Applications ![](https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Visual_Studio_Icon_2022.svg/290px-Visual_Studio_Icon_2022.svg.png) Visual Studio Community\* **💳SECURE PAYMENT PROCESSED BY STRIPE. YOUR PERSONAL INFORMATION IS PROTECTED.** ## NOT READY TO BUY? We understand. Sometimes, it doesn’t make any sense to commit to a purchase until you know for sure who you are to buy from. What’s the wait then? Let’s connect and get to know each other. Feel free to reach out anytime! [Follow on LinkedIn](https://www.linkedin.com/comm/mynetwork/discovery-see-all?usecase=PEOPLE_FOLLOWS&followMember=jliliamen) BLUE BYTE SYSTEMS INC. What Our Clients Say 4.37 rating (19 reviews) *The API programming package is offered exclusively by **Blue Byte Systems Inc**., a BC-based corporation located at 422 Richards St, Vancouver, BC, V6B 2Z4, Canada. **Blue Byte Systems Inc**. is an independent software solutions provider and is not affiliated, endorsed, or sponsored by **SOLIDWORKS or Dassault Systèmes**. **[bluebyte.biz](https://bluebyte.biz)** and [**bluebytesystemsinc.com** ](https://bluebyte.biz)are owned and operated by Blue Byte Systems Inc.* \* We recommend SOLIDWORKS Professional or higher, SOLIDWORKS PDM Professional, Visual Studio Community (Pursuant to applicable Microsoft licensing requirement) --- ### [Blye Byes Testing Page](https://bluebyte.biz/blye-byes-testing-page/) **Published:** September 1, 2025 **Author:** Shahmeer **Content:** SOLIDWORKS API Mastery – Blue Byte Systems [![Blue Byte Systems](https://bluebyte.biz/wp-content/uploads/2026/02/Blue-Byte-Inc-Fest-286x126-01.png)](https://bluebyte.biz) [Courses](#courses) [Pricing](#pricing) [Reviews](#reviews) [Instructor](#instructor) [Get All Courses — $50/mo](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) All-Access Subscription — Live Now # Stop Copy-Pasting. *Start Building* Real SOLIDWORKS Automation. Master SOLIDWORKS API & PDM automation with VBA and C#. Built by the engineer who created the CSWP-API certification exam. One subscription. Every course. Cancel anytime. [🛒 Get Full Access — $50/month](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) [See What's Included](#courses) $50 / month · Cancel anytime 160+ Engineers Enrolled 10+ Hours of Content 6+ Courses Included 4.8★ Udemy Rating PDMAutomation.vba — Blue Byte Systems 1 ' Connect to SOLIDWORKS PDM Vault 2 Dim vault As IEdmVault5 3 Set vault = New EdmVault5 4 5 vault.LoginAuto "MyVault", Me.hWnd 6 7 ' Traverse files in a folder 8 Dim folder As IEdmFolder5 9 Set folder = vault.RootFolder 10 11 Dim pos As IEdmPos5 12 Set pos = folder.GetFirstFilePosition 13 14 Do While Not pos.IsNull 15 Dim file As IEdmFile5 16 Set file = folder.GetNextFile(pos) 17 Debug.Print file.Name 18 Loop Dim swApp As SldWorks.SldWorks swApp.ActiveDoc.SaveAs("output.dxf") IEdmVault5 vault = new EdmVault5() vault.LoginAuto("VaultName", hwnd) public class MyAddin : IEdmAddIn5 { } swModel.RebuildAndSave2(swRebuildAll) Sub ExportDXF() ' Automate drawings dataCard.SetVar("Description", "", value) Dim swApp As SldWorks.SldWorks swApp.ActiveDoc.SaveAs("output.dxf") IEdmVault5 vault = new EdmVault5() vault.LoginAuto("VaultName", hwnd) public class MyAddin : IEdmAddIn5 { } swModel.RebuildAndSave2(swRebuildAll) Sub ExportDXF() ' Automate drawings dataCard.SetVar("Description", "", value) 🔒 Secure Checkout via Stripe ♻️ Cancel Anytime 🎓 On Udemy + Our Website 📜 Certificate of Completion 💬 Expert Support via Slack ⭐ Trusted by 160+ Engineers Why Blue Byte## From SOLIDWORKS User to *API Developer* Everything you need to automate your workflow, build production-ready custom tools, and stop doing the same thing twice. ⚡ ### Automate Repetitive Tasks Write macros that handle model exports, drawing generation, and BOM updates — freeing you for real engineering. 01 🤖 ### Understand GPT-Generated Code No more clueless copy-paste. Learn the API deeply enough to read, fix, and improve AI-generated SOLIDWORKS code. 02 🔧 ### Build Real PDM Add-ins Connect to the vault, manage files, read data card variables, and deploy C# add-ins used by real engineering teams. 03 📜 ### Earn a Verifiable Certificate Each certificate has a unique ID and QR code — verifiable by employers, resellers, and hiring managers worldwide. 04 💬 ### Direct Expert Support Get answers from Amen Jlili — the author of the CSWP-API exam — directly via Slack or Microsoft Teams. 05 🚀 ### Self-Paced, No Deadline Access all content on your own schedule. New courses and updates included at no extra cost while subscribed. 06 Everything Inside## All Courses. *One Subscription.* Free courses available on Udemy. Premium deep-dives accessible instantly with your $50/month membership. FREE — Udemy#### VBA for Non-Programmers Variables, conditions, loops, functions and your first macros. Zero prior experience required. VBABeginner —Starter FREE — Udemy#### SOLIDWORKS PDM API: Basics with VBA Connect to a PDM vault, work with files and folders, and read data card values using VBA. PDMVBA 3hIncluded FREE — Udemy#### SOLIDWORKS PDM API: Write Add-ins in C# Build, deploy, and debug PDM add-ins in Visual Studio using C# and the IEdmAddIn5 interface. C#PDMAdd-ins 2hIncluded PREMIUM#### Mastering the SOLIDWORKS API with VBA Deep dive: API Object Model, Part/Assembly/Drawing automation, configurations, templates. Includes full DXF exporter project. VBASOLIDWORKS APIPartsDrawings 10hFlagship PREMIUM#### SOLIDWORKS PDM API: VBA Advanced Vault login, configurations, data cards, and safe file operations. Production-ready VBA beyond the basics. PDMVBAAdvanced 4hPremium PREMIUM#### PDM API: Data Card Add-in Development Build a C# add-in that automatically transfers 3D model metadata into drawing data cards. Start to finish. C#Data CardsAdd-ins 3hPremium \+ **Bonus:** 50 Tips & Tricks of the SOLIDWORKS PDM API — a $50 eBook, included free with your subscription. Simple Pricing## One Plan. *Everything Included.* No tiers. No upsells. Every course, every update, expert support — one flat monthly rate. Best Value Individual courses: $1,500+ total value $50 per month — cancel anytime [ 🛒 Get Full Access Now ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) Access to ALL free + premium courses 10+ hours of training video content VBA, C#, and PDM API courses New courses added at no extra cost Certificate of completion per course PDM API Tips & Tricks eBook (free) Technical support via Slack or Teams Available on Udemy & our website 🔒 Secure payment processed by Stripe — your data is protected [ Start Learning Today → ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) Udemy & Student Reviews## 160+ Engineers *Already Automating* 4.8 ★★★★★ Average Rating on Udemy GK Garrett Klein Technical Account Manager, SOLIDWORKS Reseller Udemy ★★★★★ " Probably the best SOLIDWORKS API course on the internet. Amen knows the API inside and out — and he can actually teach it in a way that sticks. DG Deepak Gupta SOLIDWORKS Influencer Direct ★★★★★ " Awesome SolidWorks API Learning Course!! This is exactly what engineers looking to step into API development need to get started properly. RB Roberto Bocchini Engineer, TELEG sri LinkedIn ★★★★★ " Completed the course and earned my BlueByte certificate. The progression from VBA basics all the way to full PDM add-in development is incredibly well structured. AK A. Kowalski Mechanical Design Engineer Udemy ★★★★★ " A well-rounded introduction to automating tasks in SOLIDWORKS using VBA. The DXF exporter project alone was worth the subscription price. MS M. Santos PDM Administrator Udemy ★★★★★ " Finally a course that explains the PDM API properly. No copy-paste tutorials — you actually understand why every line of code works. JL J. Lindqvist CAD Developer, Manufacturing Udemy ★★★★★ " The C# PDM add-in module changed how our team works. We automated our entire file release process in one week after finishing this course. Your Instructor## Built by the Engineer Who *Set the Standard* Amen Jlili isn't just another online instructor. He literally wrote the SOLIDWORKS API certification exam and the official PDM Best Practices Guide for Dassault Systèmes. **CSWP-API Exam Creator**The global benchmark for SOLIDWORKS API knowledge **Dassault Systèmes Author**Wrote the official SOLIDWORKS PDM Best Practices Guide **SOLIDWORKS APIs Usergroup**Chairman of the global developer community **cadoverflow.com**Owner of the #1 SOLIDWORKS API Q&A platform Instructor Profile Amen Jlili Technical Director & Founder — Blue Byte Systems Inc., Vancouver, BC **Created the CSWP-API Certification Exam** — the benchmark for SOLIDWORKS API knowledge worldwide **Authored SOLIDWORKS PDM Best Practices Guide** for Dassault Systèmes SOLIDWORKS Corp. **Chairman, SOLIDWORKS APIs Usergroup** — leads the global community of SW developers **Owner of cadoverflow.com** — the premier Q&A platform for SOLIDWORKS API developers **Thousands of custom macros and add-ins** deployed by engineering teams worldwide Recommended Learning Path## From Zero to *API Developer* in 6 Steps A clear step-by-step progression — beginner to building production automation tools. 1 Learn VBA Basics Start with VBA for Non-Programmers. 2 Automate SOLIDWORKS Master the SOLIDWORKS API with VBA. 3 PDM Basics Start with PDM API using VBA. 4 Build Add-ins Create PDM add-ins in C#. 5 Data Cards Automate model-to-drawing data tools. 6 Task Add-ins Advanced PDM task automation in C#. [ Start Your Journey — $50/month → ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) Questions Answered## Frequently Asked Do I need programming experience to start? +No. The VBA for Non-Programmers course is built for complete beginners — starting with variables, conditions, loops, and functions. Zero coding experience required. What version of SOLIDWORKS do I need? +SOLIDWORKS 2017 or newer (Student, Standard, Professional, or Premium). The API concepts apply across versions, and Amen notes version-specific differences inside the course material. Can I cancel anytime? +Yes. Cancel directly from your account — no penalties, no questions asked. Your access continues until the end of the current billing period. Are the free Udemy courses part of the subscription? +The free courses are available on Udemy at no cost to anyone. Your $50/month subscription unlocks all premium courses, the PDM API eBook bonus, and direct technical support from Amen. What kind of support is included? +Subscribers get technical support directly from Amen Jlili via Slack or Microsoft Teams — covering course content, your own code, and real-world PDM automation challenges. Are new courses added regularly? +Yes. New courses and updates are continuously added. As a subscriber, all new content is included at no extra cost. Is there a certificate at the end? +Yes. Each course comes with a Blue Byte certificate of completion featuring a unique ID and QR code for authenticity verification. Shareable on LinkedIn or with your employer. ## Ready to Build *Real Automation?* Join 160+ engineers who stopped guessing and started building. [ 🛒 Get Full Access — $50/month ](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) [ Browse Free Courses ](https://bluebyte.biz/courses/) No setup fees · Cancel anytime · Secure payment by Stripe · Instant access ![Blue Byte](https://bluebyte.biz/wp-content/uploads/2026/02/Blue-Byte-Inc-Fest-286x126-01.png) All Courses — $50/month · Cancel Anytime 🔒 Secure via Stripe [🛒 Get Full Access](https://bluebyte.biz/checkout/?add-to-cart=18982&quantity=1) --- ### [Elementor #29793](https://bluebyte.biz/elementor-29793/) **Published:** May 24, 2026 **Author:** Shahmeer **Content:** ## SOLIDWORKS® PARTNER SOLUTION [ ![](https://bluebyte.biz/wp-content/uploads/2025/09/PDMPublisher-01.svg) ](https://pdmpublisher.com) - [SOLIDWORKS® Add-inLicensed per SOLIDWORKS Seat SOLIDWORKS](https://bluebyte.biz/product/pdmpublisher-solidworks/) - [Task VersionPDM task licensed per vault PDM Professional ](https://bluebyte.biz/product/pdmpublisher/) - [Case StudiesPDMPublisher](https://bluebyte.biz/case-study/) ## Data Migration and Management - [PDMShellCommandline for PDM Professional, licensed per machine. PDM Professional](https://bluebyte.biz/product/pdmshell/) - [PDMShell portal ↗Visit our product website for demos and documentation](https://pdmshell.com) ## STORE - [BROWSE PRODUCTS](https://bluebyte.biz/shop) - [CART](https://bluebyte.biz/cart) - [CHECKOUT](https://bluebyte.biz/checkout) --- ### [TASKSCRIPT](https://bluebyte.biz/taskscript/) **Published:** May 2, 2026 **Author:** Shahmeer **Content:** Free Plugin Ships with PDMShell ## Task Script A custom PDM task add-in that lets you execute PDMShell scripts the same way you’d use the built-in Convert task — configurable, dynamic, and deeply integrated with your vault. [ Get TaskScript Free ](#) [ View Documentation ](#) ### SOLIDWORKS PDM Professional only ### Requires PDMShell installed ### Instant setup, zero config taskscript — example.pdmshell \# TaskScript: Export to PDF on approval \# Runs automatically on PDM task trigger --- $ checkout -filePath "$localPath" $ export -filePath "$localPath" -format PDF $ setvar -filePath "$localPath" -variableName ExportDate -Value "$date" $ checkin -filePath "$localPath" -comment "Auto-export by $userName" $ quit --- ✓ Task completed — 3 files processed in 1.4s $ Compatible with [ SOLIDWORKS PDM Professional ](#) [ PDMShell Free & Premium ](#) [ .pdmshell scripts ](#) [ pdmcli engine ](#) [ PDM Task Triggers ](#) How It Works ## From Script to Task in Minutes TaskScript bridges the gap between your PDMShell scripts and the PDM task system — no custom coding required, just configure and run. 1 ### Install TaskScript Download and register the TaskScript add-in inside your SOLIDWORKS PDM Administration tool — just like any other task add-in. 2 ### Write Your Script Author a .pdmshell script using any PDMShell commands. Use dynamic placeholders like $localPath and $fileName for per-file context. 3 ### Configure the Task In the PDM Administration panel, create a TaskScript task, point it to your script, set file extension filters, and configure the Command Menu tab. 4 ### Trigger & Run Attach the task to any PDM workflow trigger. TaskScript runs your pdmcli session automatically on every selected file with detailed logging. Key Features ## Everything You Need to Automate Tasks TaskScript bridges the gap between your PDMShell scripts and the PDM task system — no custom coding required, just configure and run. ### Execute Scripts via PDM Task Triggers Run any .pdmshell script automatically in response to PDM task triggers — approvals, state changes, manual runs, or scheduled tasks. ### Dynamic Variable Binding at Runtime Placeholders like $localPath, $fileName, $userName, and $date are substituted per file at runtime — making one script handle any file in the vault. ### Reuse Your Existing Scripts Point TaskScript at scripts stored locally or pulled from your network — no duplication, no migration. Your existing PDMShell library works as-is. ### File Extension Filtering Control exactly which file types TaskScript processes per task. Default is sldprt;sldasm;slddrw — fully customizable. PDMShell Script auto-export.pdmshell \# Dynamic per-file export with PDM vars \# File info from TaskScript placeholders checkout -filePath "$localPath" \# Read PDM variable for this file getvar -filePath "$localPath" -variableName Description \# Export to PDF output folder export -filePath "$localPath" -format PDF -outputPath "$folderPath\\output" \# Stamp export timestamp on file setvar -filePath "$localPath" -variableName LastExport -Value "$timestamp" checkin -filePath "$localPath" -comment "Auto-export $yyyy-$MM-$dd" quit #### Setup Notes - Default extension filter: **sldprt;sldasm;slddrw** - Always set the **Command Menu tab** in task config - Scripts run one PDMShell session per affected file - Use **$(Description.@)** for the @ configuration tab ## Get TaskScript For Free TaskScript ships free with PDMShell. Enter your details and we’ll send the download link directly to your inbox — same delivery flow as all our free plugins. - Free for all PDMShell users (Free & Premium) - No credit card, no trial period - Instant confirmation email with download link - Includes setup instructions and example scripts - Requires SOLIDWORKS PDM Professional Email Name Company Name \*First Last Email \*Professional email required. Company Get TaskScript For Free![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) --- ### [Courses](https://bluebyte.biz/courses-2/) **Published:** December 27, 2024 **Author:** Amen Jlili **Content:** Library Student Enrolled [ ![SOLIDWORKS PDM API: VBA Advanced](https://bluebyte.biz/wp-content/uploads/2026/05/1000011759-300x169.png) ](https://bluebyte.biz/courses/pdm-api-vba-advanced/)### SOLIDWORKS PDM API: VBA Advanced This course teaches you how to configure the VBA environment, add the required API references, connect to a PDM vault, build a user interface, securely log in, browse folders, work with file configurations, read data card variables, and safely update files using proper check-out and check-in logic. [ See more ](https://bluebyte.biz/courses/pdm-api-vba-advanced/) 0% Complete 0/16 Steps Enrolled [ ![SOLIDWORKS PDM API: Data Card Add-in](https://bluebyte.biz/wp-content/uploads/2026/05/SOLIDWORKS-PDM-API-Data-Card-Add-In-1-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/)### SOLIDWORKS PDM API: Data Card Add-in In this course we show you how to make a new button for your PDM. This button is special because it takes information from a 3D model and puts it into a drawing. You will learn how to write simple code using C# to move this data fast. This tool helps you work better and not make mistakes. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) 0% Complete 0/18 Steps Enrolled [ ![VBA for Non-Programmers](https://bluebyte.biz/wp-content/uploads/2026/04/unnamed-300x169.png) ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/)### VBA for Non-Programmers This course is about the basics of programming with VBA. It focuses on core concepts such as variables, data types, conditions, loops, functions, and simple macros to help build a strong foundation. [ See more ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) 0% Complete Last activity on April 4, 2026 2:38 pm Enrolled [ ![SOLIDWORKS PDM Task Add-in Development (C#)](https://bluebyte.biz/wp-content/uploads/2026/03/1000010872-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/)### SOLIDWORKS PDM Task Add-in Development (C#) The SOLIDWORKS PDM Task Add-in Development course from Blue Byte Systems Inc. is a specialized, technical deep-dive designed for developers and automation leads who want to master the art of vault automation. This intensive program empowers you to build high-performance custom add-ins using C# or VB.NET, enabling you to design, implement, and deploy sophisticated tools that handle complex engineering processes—from seamless file conversions and data extraction to advanced, workflow-driven operations. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) 0% Complete Last activity on March 2, 2026 4:43 am Completed [ ![SOLIDWORKS PDM Professional API Bootcamp (3 days)](https://bluebyte.biz/wp-content/uploads/2024/12/solidowrks-pdm-api-thumbnail-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/)### SOLIDWORKS PDM Professional API Bootcamp (3 days) The SOLIDWORKS PDM API Bootcamp from Blue Byte Systems Inc. is a three-day, in-person immersive course designed for developers, engineers, and automation leads who want to master the PDM API, build real-world custom tools, and integrate advanced workflows into your PDM environment. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/) 100% Complete Last activity on October 2, 2025 3:04 pm Enrolled [ ![SOLIDWORKS PDM API: Write PDM Add-ins in C#](https://bluebyte.biz/wp-content/uploads/2024/12/solidowrks-pdm-api-thumbnail-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/)### SOLIDWORKS PDM API: Write PDM Add-ins in C# This course provides an introduction to creating and implementing SOLIDWORKS PDM add-ins using C# and the SOLIDWORKS PDM API. Designed for PDM administrators and developers, this course focuses on automating tasks within the SOLIDWORKS PDM environment, improving workflow efficiency, and integrating custom add-ins into the vault. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) 0% Complete Last activity on September 30, 2025 5:30 pm Completed [ ![SOLIDWORKS PDM API: Basics with VBA](https://bluebyte.biz/wp-content/uploads/2024/12/vba-solidworks-pdm-api-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/)### SOLIDWORKS PDM API: Basics with VBA This course provides a comprehensive introduction to SOLIDWORKS PDM automation using VBA and the SOLIDWORKS PDM API. It is designed for those interested in automating tasks within the SOLIDWORKS PDM environment, such as managing files, folders, and data cards in the vault, and improving efficiency in PDM workflows. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) 100% Complete Last activity on May 18, 2026 5:37 pm Enrolled [ ![Master The SOLIDWORKS API Course To Automate Your Workflow with VBA](https://bluebyte.biz/wp-content/uploads/2024/12/solidworks-vba-course-thumbnail-300x169.png) ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/)### Master The SOLIDWORKS API Course To Automate Your Workflow with VBA This comprehensive course provides a foundational understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency. [ See more ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) 0% Complete Last activity on September 30, 2025 5:01 pm ![](https://secure.gravatar.com/avatar/eb1d34a5532535774f7525ab9d281f728fa3795852213b5784b26eaae9272a0f?s=150&r=g) ## Shahmeer [Edit profile](https://bluebyte.biz/wp-admin/profile.php) ### Your Stats **8** Courses **2** Completed **2** Certificates ### Your Courses Expand All Courses close #### Search Your Courses Course Name [ SOLIDWORKS PDM API: VBA Advanced ](https://bluebyte.biz/courses/pdm-api-vba-advanced/) Expand SOLIDWORKS PDM API: VBA Advanced Expand SOLIDWORKS PDM API: VBA Advanced Course Progress 0% Complete 0/16 Steps [ SOLIDWORKS PDM API: Data Card Add-in ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) Expand SOLIDWORKS PDM API: Data Card Add-in Expand SOLIDWORKS PDM API: Data Card Add-in Course Progress 0% Complete 0/18 Steps [ VBA for Non-Programmers ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) Expand VBA for Non-Programmers Expand VBA for Non-Programmers Course Progress 0% Complete 0/10 Steps [ SOLIDWORKS PDM Task Add-in Development (C#) ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) Expand SOLIDWORKS PDM Task Add-in Development (C#) Expand SOLIDWORKS PDM Task Add-in Development (C#) Course Progress 0% Complete 0/16 Steps [ SOLIDWORKS PDM Professional API Bootcamp (3 days) ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/) [](https://bluebyte.biz/certificate-verification/12D08E519-12D5495AD-312D131/)Complete Expand SOLIDWORKS PDM Professional API Bootcamp (3 days) Expand SOLIDWORKS PDM Professional API Bootcamp (3 days) Course Progress 100% Complete 48/48 Steps [ SOLIDWORKS PDM API: Write PDM Add-ins in C# ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) Expand SOLIDWORKS PDM API: Write PDM Add-ins in C# Expand SOLIDWORKS PDM API: Write PDM Add-ins in C# Course Progress 0% Complete 0/8 Steps [ SOLIDWORKS PDM API: Basics with VBA ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) [](https://bluebyte.biz/certificate-verification/12D08E519-12D090F46-312D131/)Complete Expand SOLIDWORKS PDM API: Basics with VBA Expand SOLIDWORKS PDM API: Basics with VBA Course Progress 100% Complete 9/9 Steps [ Master The SOLIDWORKS API Course To Automate Your Workflow with VBA ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) Expand Master The SOLIDWORKS API Course To Automate Your Workflow with VBA Expand Master The SOLIDWORKS API Course To Automate Your Workflow with VBA Course Progress 0% Complete 0/40 Steps --- ### [Newsletter](https://bluebyte.biz/newsletter/) **Published:** November 25, 2018 **Author:** Amen Jlili **Content:** # SUBSCRIBE TO OUR NEWSLETTER Stay connected with the latest updates, news, and insights from Blue Byte Systems Inc **Visible only to administrators**. [Edit this content](https://bluebyte.biz/wp-admin/admin.php?page=newsletter_subscription_options). Email - Insights from over a decade of experience in [SOLIDWORKS automation](https://bluebyte.biz/). - Case studies and real-world examples of how to solve complex problems. - Be part of a growing community of like-minded professionals in engineering and CAD automation. - Gain in-depth knowledge of PDM customization and advanced features. [Blue Byte Systems Inc. respects your privacy and is committed to protecting your personal data, ensuring it is used responsibly and securely.](https://bluebyte.biz/privacy/) --- ### [SOLIDWORKS PDM Professional API Bootcamp 2026](https://bluebyte.biz/solidworks-pdm-professional-api-3-day-bootcamp-2026/) **Published:** July 1, 2025 **Author:** michaelezeani246 **Content:** ![](https://bluebyte.biz/wp-content/uploads/2024/12/Ajay-Randhawa-Photography-7-Small.jpg) — Jan 28th – 30th, 2026 in Houtson, Texas # SOLIDWORKS PDM Professional API Bootcamp 2026 BLUE BYTE SYSTEMS is planning a 3-day in-person intensive bootcamp in North America (before 3DX26) focused entirely on the SOLIDWORKS PDM Professional API — hands-on, real-world training with everything you need to build powerful customizations and automation. [ SIGN UP ](/contact) ## CLASS IN A NUTSHELL - **VBA basics** and fundamentals. - **[PDM API object Model](https://bluebyte.biz/solidworks-pdm-api-3-day-bootcamp/)** and how to navigate the documentation. - Automate **workflows, transitions,** and notifications. - Build standalone tools with Winforms and Console application. - Create custom tasks and add-ins and **datacards** add-ins. - Best practices for debugging and deployment. - [ Blue Byte Systems Inc's courseware (10 hours). ](https://bluebyte.biz/courses-2/) - [ Free one year license of PDMShell to automate your PDM daily tasks (US$1999 value) ](https://pdmshell.com) # About the instructor Led by [Amen Jlili](https://www.linkedin.com/in/jliliamen/), founder of BLUE BYTE SYSTEMS INC. and creator of multiple SOLIDWORKS API training programs, this course is built on over a decade of real-world PDM automation experience. - Author of the **official CSWP-API exam** - Author of **Dassault Systèmes’ PDM Best Practices Guide** - Developer of **1,000+ custom macros** & add-ins used globally ![](https://bluebyte.biz/wp-content/uploads/2024/12/IMG-20251023-WA0001.jpg) # COURSE OUTLINE PDM API Training Course Day 1 Session 0 Programming Fundamentals (VBA) Topics: What's API? • Macro Recorder and VBE Editor • Data Types • Functions and Subroutines • Conditionals, Loops • Arrays/Collections/Dictionaries • Debugging • Best Practices and Error Handling Session 1 Easy intro into the PDM API from within SOLIDWORKS (VBA) Topics: Hello Vault in VBA • IEdmVault5 object • Login Methods • IEdmEnumeratorVariable5 read/write Lab: Macro retrieves Part Number, updates Description, commits changes; log before/after values Day 2 Session 2 Standalone Tools (Visual Studio, C#) Topics: Setting your Visual Studio Environment • Login methods • The iterator pattern • Usual operations: Check-ins, out, undo and get latest Lab: Console app logs in, lists folder files, performs check-in or undo checkout Session 3 Variable Access & Metadata Control Topics: Working with cards: IEdmEnumeratorVariable5 • Editing sequences: SetVar → CloseFile • SetVar VS GetVarFromDB Lab: WinForms app lists .sldprt, shows and update the Description Session 4 Batch Interfaces & Utilities Topics: IEdmBatchAdd • IEdmBatchUnlock • IEdmBatchGet • IEdmBatchUpdate Day 3 Session 5 Writing & Deploying Add-ins Topics: Setting up your environment • Add-in architecture: IEdmAddIn5 • GetAddInInfo • OnCmd • Deploying and debugging • Packaging (CEX), updating (best practices) Lab: Context-menu and datacard add-in that transfers variables values from the model to the drawing Session 6 Automating with Tasks & Scripts Topics: Task lifecycle: TaskSetup • TaskSetupButton • TaskLaunch • TaskRun Lab: Conversion of the previous lab into a task addin Final Project Session 7 NeoConvert A simple rewrite of the convert_gb task in VB.NET ## What they said ![](https://bluebyte.biz/wp-content/uploads/2025/10/tigercat.png) Thanks again for the training this week. I learned a great deal and I have a million ideas floating around in my head. My level of confidence in creating add-ins with the PDM API is significantly increased, and the large volume of sample code we produced will be a great reference moving forward. Learning where to look for answers and how to look for those answers, along with the specifics of the API itself, was a huge benefit. I also greatly appreciate the offer of ongoing communication and assistance in the form of a code review of my first add-in. I look forward to both of those things. Michael Webster Tigercat Industries Inc. ![](https://bluebyte.biz/wp-content/uploads/2025/10/soundronic.png) I just wanted to let you know that I’ll try to repeat the exercises several times a week for a few hours. I particularly liked the PDM add-in with the button. I was also able to take the first steps, such as outputting the path from the selected file. I copied a few things, some of which came from me. I thought of the ‘partial’ from the beginning — much tidier. When you’re back in Vancouver at the end of the week, we can exchange ideas. Until then, I wish you a great time in Europe. Jan CanTech GmbH # LIMITED SPOTS (3-5) Days Hours Minutes Seconds [ CONTACT TO RESERVE SPOT ](/contact) ## FROM OUR YOUTUBE 6 Videos ![Update Datacards with PDMShell - SOLIDWORKS PDM](https://img.youtube.com/vi/ukm2nzCKeZ0/maxresdefault.jpg) #### Update Datacards with PDMShell - SOLIDWORKS PDM 3:46 ![SOLIDWORKS PDM API: How to Write C# Add-ins [Course Free Preview]](https://img.youtube.com/vi/NwFKY0ZWmU8/maxresdefault.jpg) # SOLIDWORKS PDM API: How to Write C# Add-ins \[Course Free Preview\] 5:26 ![SOLIDWORKS PDM in VBA: Check Files In and Out of the Vault](https://img.youtube.com/vi/GAnPb9u9_nc/maxresdefault.jpg) #### SOLIDWORKS PDM in VBA: Check Files In and Out of the Vault 20:55 ![SOLIDWORKS PDM: Edit datacard variables in VBA](https://img.youtube.com/vi/xWJWwVt5-_c/maxresdefault.jpg) #### SOLIDWORKS PDM: Edit datacard variables in VBA 10:20 ![How to force restart SOLIDWORKS PDM Professional (and standard too)](https://img.youtube.com/vi/VQQ8ufByJvQ/maxresdefault.jpg) #### How to force restart SOLIDWORKS PDM Professional (and standard too) 1:20 ![The ULTIMATE Time-Saver: Roll Forward Old Files in SOLIDWORKS PDM with This Add-In!](https://img.youtube.com/vi/DpiyafoYB4Y/maxresdefault.jpg) #### The ULTIMATE Time-Saver: Roll Forward Old Files in SOLIDWORKS PDM with This Add-In! 41:54 ## BLOG POSTS [ VIEW ALL POSTS ](/blog) [![Folder pane listing numeric ranges from 3000-3999 up to 8000-8999 in 1000-step folders.](https://bluebyte.biz/wp-content/uploads/2026/08/image.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/)### [ Why Serial Numbers and Folder Number Ranges Keep Your SOLIDWORKS PDM Vault Fast ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) [![](https://bluebyte.biz/wp-content/uploads/2025/09/PDMPublisher-01-1.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/)### [ How to Get a Free PDMPublisher Trial License ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) [![Host with a microphone in the foreground; a dark screen shows a SolidWorks PDM window and an orange starburst logo in the background, with the title 'SOLIDWORKS PDM WITH CLAUDE'](https://bluebyte.biz/wp-content/uploads/2026/08/claude.png) ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/)### [ Using Claude with SOLIDWORKS PDM through the PDMShell MCP Server ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) [![PDMShell workflow editor showing a dark IDE interface with a flowchart: Begin circle → Check out → Navigate to a vault folder → Run SOLIDWORKS Macro → Check in → + Add a new action; right panel labeled Command Parameters with fields for directory and id; bottom purple console line reading 'Good evening, jilili! Welcome to PDMShell.'](https://bluebyte.biz/wp-content/uploads/2026/06/visual-code-editor-templated-macro-run.png) ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/)### [ PDMShell vs. PowerShell: The CAD Admin’s Guide to Engineering Automation ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) ###### SUBSCRIBE TO OUR NEWSLETTER Name Email Subscribe --- ### [SOLIDWORKS PDM API 3-Day Bootcamp](https://bluebyte.biz/solidworks-pdm-api-3-day-bootcamp/) **Published:** June 30, 2025 **Author:** michaelezeani246 **Content:** # SOLIDWORKS PDM Professional API Bootcamp 2025 BLUE BYTE SYSTEMS is planning a **3-day in-person intensive bootcamp in Europe (Amsterdam, NL in September 2025)** focused entirely on the **SOLIDWORKS PMD API** — hands-on, real-world training with everything you need to build powerful customizations and automation. To ensure a focused, hands-on learning experience, we’re limiting the session to a maximum of 10 participants. Please note it is subject to change based on feedback from attendees — our goal is to keep the content relevant, practical, and aligned with real-world use cases. ## Class In A Nutshell - **VBA basics** and fundamentals. - **PDM API object Model** and [how to navigate the documentation](https://bluebyte.biz/solidworks-pdm-professional-api-3-day-bootcamp-2026/). - Automate **workflows, transitions,** and notifications. - Build standalone tools with Winforms and Console application. - Create custom tasks and add-ins and **datacards** add-ins. - Best practices for debugging and deployment. - [ Blue Byte Systems Inc's courseware (10 hours). ](https://bluebyte.biz/courses-2/) - [ Tips & Tricks to Master the SOLIDWORKS PDM API Guide ($50 value) ](https://bluebyte.biz/product/master-the-solidworks-pdm-api-expert-tips-tricks/) - [ Free one year license of PDMShell to automate your PDM daily tasks (US$1999 value) ](https://pdmshell.com) ## Write a SOLIDWORKS PDM Add-in (Preview from course) ## From Our YouTube Channel ## FROM OUR YOUTUBE 6 Videos ![Update Datacards with PDMShell - SOLIDWORKS PDM](https://img.youtube.com/vi/ukm2nzCKeZ0/maxresdefault.jpg) #### Update Datacards with PDMShell - SOLIDWORKS PDM 3:46 ![SOLIDWORKS PDM API: How to Write C# Add-ins [Course Free Preview]](https://img.youtube.com/vi/NwFKY0ZWmU8/maxresdefault.jpg) # SOLIDWORKS PDM API: How to Write C# Add-ins \[Course Free Preview\] 5:26 ![SOLIDWORKS PDM in VBA: Check Files In and Out of the Vault](https://img.youtube.com/vi/GAnPb9u9_nc/maxresdefault.jpg) #### SOLIDWORKS PDM in VBA: Check Files In and Out of the Vault 20:55 ![SOLIDWORKS PDM: Edit datacard variables in VBA](https://img.youtube.com/vi/xWJWwVt5-_c/maxresdefault.jpg) #### SOLIDWORKS PDM: Edit datacard variables in VBA 10:20 ![How to force restart SOLIDWORKS PDM Professional (and standard too)](https://img.youtube.com/vi/VQQ8ufByJvQ/maxresdefault.jpg) #### How to force restart SOLIDWORKS PDM Professional (and standard too) 1:20 ![The ULTIMATE Time-Saver: Roll Forward Old Files in SOLIDWORKS PDM with This Add-In!](https://img.youtube.com/vi/DpiyafoYB4Y/maxresdefault.jpg) #### The ULTIMATE Time-Saver: Roll Forward Old Files in SOLIDWORKS PDM with This Add-In! 41:54 ## Training Comparison ### PDM API Training Your SOLIDWORKS Reseller US$\* 2500 Limited training, mostly online. - 2 DAY Class - Most resellers moved to online - Code examples provided - No technical support - Standardized with no regular updates - Does **not** cover programming fundamentals - Covers add-ins but does **not** cover custom tasks - Does **not** cover debugging add-ins and custom add-ins [ Reach out to reseller ](https://www.solidworks.com/how-to-buy/find-solidworks-reseller/) Cost of reseller training an estimate. ### PDM API Bootcamp BLUE BYTE SYSTEMS INC. US$ 3199 In-person training with excellent support. - 3-DAY Class - In-person classroom - Code examples provided - Technical support via Slack (after class) - Custom curriculum for every class - VBA Basics and fundamentals - 10h dedicated to learning how to write add-ins and custom tasks - Each student can choose VB.NET or C# - Learn how to debug add-ins and custom add-ins - **Perpetual access to courseware (+10h)** - Delivered by industry expert - One year license of PDMShell [ SIGN UP ](https://bluebyte.biz/contact/) Spots are limited. Class size may vary 6-10. BEST DEAL! ### PDM API Training my.SOLIDWORKS.com (SOLIDWORKS Corp.) US$ 3K/year SOLIDWORKS or PDM subscription required. - 5h 25 mins - Online - Access requires active subscription - No technical support - Standardized with no regular updates - Does **not** cover programming fundamentals - 1h20min lesson about add-ins and custom tasks - Does **not** cover debugging add-ins and custom add-ins [ More information ](https://my.solidworks.com/training/elearning/75/api-fundamentals-of-solidworks-pdm-professional) The course is led by Amen Jlili, founder of **[BLUE BYTE SYSTEMS INC](https://bluebyte.biz/)**. and author of several SOLIDWORKS API training programs. With over a **decade of experience** automating **PDM** for companies around the world, Amen brings real-world insight, proven practices, and a focus on delivering tools that actually solve engineering problems. - Contributed to the official CSWP-API certification exam - Written the Best Practices Guide for SOLIDWORKS PDM for ***Dassault Systèmes*** - Developed thousands of custom macros and add-ins used by engineering teams worldwide - Founded and leads the ***[SOLIDWORKS API User Group](https://community.swugn.org/apis-solidworks-user-group/)***, bringing together developers and automation specialists from across the globe. **Schedule a call with Amen to ask more questions👇** [ SCHEDULE A CALL ](https://calendly.com/bluebyte/consulting-work?back=1) ![](https://bluebyte.biz/wp-content/uploads/2024/12/Ajay-Randhawa-Photography-7-Small.jpg) ## Interested? Whether you’re managing a vault, writing macros, or building full-scale solutions — **this is your chance to level up** with expert guidance. Click the button below to get access to the full agenda. Spots are limited to 10. Cost: **€2699 EUR | $3199 USD** [ GET THE CLASS AGENDA ](https://bluebyte.biz/wp-content/uploads/2025/06/BLUE-BYTE-SYSTEMS-SOLIDWORKS-PDM-API-September-25.pdf) [ SIGN UP ](mailto:amen@bluebyte.biz) --- ### [Case Study](https://bluebyte.biz/case-study/) **Published:** April 28, 2025 **Author:** **Content:** # AUTOMATING DRAWING DOCUMENT RELEASE PROCESS: INCREASE EFFICIENCY WTH PDMPUBLISHER ## INTRODUCTION **BLUE BYTE SYSTEMS INC.** specializes in SOLIDWORKS PDM automation, streamlining engineering and manufacturing workflows. Our flagship tool, **PDMPublisher**, automates **PDF, DXF, STEP files generation**, **merging**, and [**adding custom notes**](https://docs.bluebyte.biz/src/annotations.html), eliminating manual steps for efficient, error-free, and cost-effective document management. ![](https://bluebyte.biz/wp-content/uploads/2025/04/blue-byte-people-1.png) ![](https://bluebyte.biz/wp-content/uploads/2025/04/BLUE-BYTE-ENGINEERING-LOOKING-AT-SCREEN-1.png) ## CHALLENGE A Pacific North West Manufacturing faced time-consuming PDF printing, merging, and quantity management. Their manual workflow involved: - Printing documents individually. - Adding production quantities to the printed documents using Adobe Acrobat. - Merging printed documents into manufacturing packages. Between 2023-2024, they processed **tens of thousands of PDFs** and merged **several thousands packages.** ## SOLUTION To address these challenges, Pacific North West Manufacturing Company implemented **PDMPublisher**, enabling: - Automated PDF generation from one single click from the top-level assembly. - Smart document selection via **[conditions.](https://docs.bluebyte.biz/src/conditions.html)** - Automated PDF merging. - Placement of custom notes in all documents, such as **Bill of Materials quantities**. ![](https://bluebyte.biz/wp-content/uploads/2025/04/BLUE-BYTE-ENGINEERING-LOOKING-AT-SCREEN-1024x683.png) ## RESULTS By leveraging **PDMPublisher**, Pacific North West Manufacturing company achieved. ### Manual Process Finding Drawings Filtering Documents Print & Merging PDFs Adding Bill Of Materials Quantities Total Time Per Package Total Annual Time Annual Cost 1-5 min 5-10 min 10-15 min 3-5 min 19-35 min +1000 hours +$50,000 ### With PDM Publisher - Automated - Automated - < 3 min - Automated - < 3 min - 250 hours - $3,000 # How Much Can You Save? How long to find (search) documents per project? (minutes) How long to convert/print documents per project? (minutes) How long to add custom notes per project? (minutes) Do you merge printed PDFs? If so, how long does it take per project? (minutes) How many projects per month? Calculate Estimated Savings: $${savings.toFixed(2)} `; } ## CONCLUSION **The Return On Investment with PDMPublisher** By automating the document selection, merging, and manufacturing quantity addition process, **PDMPublisher** has transformed the company’s workflow. The solution has saved **hundreds of hours per year**, reduced operational costs, and improved accuracy. For **manufacturing** companies managing **high volumes** of engineering documents, **PDMPublisher** provides a scalable, error-free, and cost-effective automation tool, allowing teams to focus on higher-value engineering and production tasks rather than repetitive administrative work. ![](https://bluebyte.biz/wp-content/uploads/2025/04/qtq80-u8MbJn.jpeg) ## Interested in Automating Your PDM Workflow? **[If your company faces similar challenges with engineering document management, contact BLUE BYTE SYSTEMS INC. to learn how PDM Publisher can help streamline your processes, save time, and reduce costs.](https://calendly.com/bluebyte/pdm-convert-extended-demo-and-qa?back=1)** ## Fill the form below to get the full Case Study Email Name Name \*First Last Email \* Get Full Case Study![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) --- ### [Career](https://bluebyte.biz/jobs/) **Published:** April 25, 2026 **Author:** Shahmeer **Content:** ## Build the future of Engineering automation. Join Blue Byte Systems and help engineering teams worldwide eliminate manual work, standardize workflows, and scale their SOLIDWORKS and PDM environments. ## Current Openings // 02 positions ## Product Manager — PDMPublisher and PDMShell Full-time / Contract On-site / Hybrid / Remote [ APPLY NOW ](https://bluebyte.biz/jobs/product-manager-pdmpublisher-and-pdmshell/) ## SOLIDWORKS API Developer Full-time / Contract On-site / Hybrid / Remote [ APPLY NOW ](https://bluebyte.biz/jobs/solidworks-api-developer/) --- ### [Transition PDM File As Administrator](https://bluebyte.biz/transition-pdm-file-as-administrator/) **Published:** December 31, 2024 **Author:** Amen Jlili **Content:** # Transition PDM File As Administrator - Ideal for a PDM administrator who needs to quickly transition a blocked file on another PDM user's computer. ![](https://bluebyte.biz/wp-content/uploads/2024/10/window.png) Email Company Name Name \*First Last Email \*Professional email required. Company Get Transition As Admin Add-in![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) ## Overview Transition As Administrator is an innovative PDM add-in designed for efficient file management. This tool empowers users to transition files while utilizing another user’s credentials, eliminating the need to log out and back in. --- ### [Privacy Policy](https://bluebyte.biz/privacy/) **Published:** February 2, 2026 **Author:** Amen Jlili **Content:** ## Privacy Policy This privacy policy describes how we collect, use, and protect your personal information when you use our website and services. ### 1. Information We Collect We collect information that you provide directly to us, such as when you create an account, make a purchase, or contact us for support. This may include your name, email address, mailing address, phone number, and payment information. ### 2. How We Use Your Information We use the information we collect to: - Process and fulfill your orders - Send you order confirmations and updates - Respond to your comments and questions - Improve our website and services - Send you marketing communications (with your consent) ### 3. Information Sharing We do not sell, trade, or rent your personal information to third parties. We may share your information with service providers who assist us in operating our website and conducting our business, as long as those parties agree to keep this information confidential. ### 4. Data Security We implement appropriate security measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction. ### 5. Your Rights You have the right to access, update, or delete your personal information at any time. You may also opt out of receiving marketing communications from us. ### 6. Cookies We use cookies to enhance your experience on our website. You can choose to disable cookies through your browser settings, though this may affect the functionality of the site. ### 7. Changes to This Policy We may update this privacy policy from time to time. We will notify you of any changes by posting the new policy on this page. ### 8. Contact Us If you have any questions about this [Privacy Policy](https://bluebyte.biz/privacypolicy/), please contact us. --- ### [3DExperience World / API UserGroup Assets](https://bluebyte.biz/3dx/) **Published:** January 31, 2026 **Author:** Amen Jlili **Content:** ## 3DXW26 (Houston, TX) You can download the **DEVELOPER’S GUIDE: 60 TIPS OF THE SOLIDWORKS PDM API IN 45 MINUTES** presentation using the following link: [**Download Presentation**](https://u.pcloud.link/publink/show?code=kZ3CPK5ZsJNXpTltKoj5ViUKrusqOHfaIzH7). --- ### [DATA MIGRATION](https://bluebyte.biz/data-migration/) **Published:** May 22, 2025 **Author:** michaelezeani246 **Content:** # DATA MIGRATION AND TRANSFORMATION SERVICES FOR SOLIDWORKS PDM We specialize in high-volume PDM automation with the ability to update variables in bulk, apply intelligent renaming rules across entire datasets, and perform large-scale sheet-format cleanup. Our tooling handles thousands of files per operation while maintaining vault integrity, predictable performance, and uninterrupted workflow availability. ## CHALLENGE - CASE STUDY The customer needed to rename more than 60,000 files inside their SOLIDWORKS PDM vault, and the work involved far more than simply changing filenames. Every CAD file in a PDM environment is tightly connected to references, configurations, versions, and workflow states. A high-volume rename must protect assembly links, maintain revision history, retain all metadata, preserve drawing relationships, and keep approval records intact. Manual renaming through Windows Explorer or the PDM client is extremely risky for a dataset of this size. Many of the files were linked across assemblies, shared across multiple projects, and required a structured naming logic that integrated serial numbers and ERP rules. Without automation, this type of project can take several weeks, and a single mistake can lead to extensive rework. ## GOAL The goal was to remove extra revision information from the filenames to standardize and clean up their data. ## SOLUTION Blue Byte Systems executed the full migration in four hours, scheduled outside business hours, and the vault remained fully available throughout the process. This was achieved using PDMShell, our internally developed command-line automation tool that handles large PDM workloads efficiently and safely. The project was driven by an Excel spreadsheet provided by the customer. The sheet listed more than 60,000 entries with existing names, new names, and relevant metadata. We performed a full validation of the spreadsheet against the live vault to confirm that all source files were present, that no duplicates or naming conflicts would occur, and that all assembly and drawing references would remain preserved. ## TESTIMONIAL ## CUSTOMER FEEDBACK Amen was given a short timeline and was requested to work outside of Ideal Pase hours. Both were adhered to and surpassed. ![](https://bluebyte.biz/wp-content/uploads/2025/05/star.png) ![](https://bluebyte.biz/wp-content/uploads/2025/05/star.png) ![](https://bluebyte.biz/wp-content/uploads/2025/05/star.png) ![](https://bluebyte.biz/wp-content/uploads/2025/05/star.png) ![](https://bluebyte.biz/wp-content/uploads/2025/05/star.png) Wesley D. ## Data Migration & Transformation Support [Need help with data migration or transforming large datasets? Reach out to us for fast, reliable assistance.](https://bluebyte.biz/contact/) ![](https://bluebyte.biz/wp-content/uploads/2025/11/Blye-byte-Inc-Final-01-1536x604-removebg-preview-e1764455912920.png) #### Prefer email? You can also reach us at **** --- ### [Course Completion](https://bluebyte.biz/course-completion/) **Published:** October 2, 2025 **Author:** Shahmeer **Content:** Congrats! You’ve completed the course. --- ### [Certificate Verification](https://bluebyte.biz/certificate-verification/) **Published:** October 2, 2025 **Author:** Shahmeer **Content:** Search Certificate by ID Search --- ### [Privacy Policy](https://bluebyte.biz/privacypolicy/) **Published:** May 5, 2019 **Author:** Amen Jlili **Content:** # Privacy Policy - [ Published On May 5, 2019 ](https://bluebyte.biz/2019/05/05/) - Last modified on May 7, 2025 **1. Introduction** At **Blue Byte Systems Inc.,** we respect your privacy and are committed to protecting your personal information. This Privacy Policy outlines how we collect, use, and protect your information when you visit our website, sign up for an account, purchase a service, comment on our site, or contact us. **2. Information We Collect** When you interact with us, we may collect the following information: - **Personal Information:** This includes your name, email address, and any other details you provide when signing up for an account, purchasing services, commenting on our website, or contacting us. **3. How We Use Your Information** We use the information we collect in the following ways: - **To Provide Services:** We use your personal information to deliver the services you have requested, including processing transactions and managing your account. - **To Communicate:** We may use your email address to send you newsletters, updates, and promotional materials related to our services. You can opt out of receiving these communications at any time by following the unsubscribe link in the emails or by contacting us directly. - **To Improve Our Services:** We may use your information to understand your needs better and enhance the functionality of our website and services. **4. Opting Out** You have the right to opt out of receiving our newsletter and promotional emails. You can do this by: - Clicking the “unsubscribe” link at the bottom of any email you receive from us. - Contacting us directly at **amen@bluebyte.biz**. Please note that even if you opt out of receiving marketing communications, we may still send you transactional or account-related communications. **5. Data Security** We implement a variety of security measures to protect your personal information. However, no method of transmission over the internet or electronic storage is 100% secure. Therefore, while we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security. **6. Changes to This Policy** We may update this Privacy Policy from time to time. Any changes will be posted on this page, and we encourage you to review this policy periodically to stay informed about how we are protecting your information. **7. Contact Us** If you have any questions about this Privacy Policy or our practices, please contact us at: Blue Byte Systems Inc. 422 Richards St Vancouver, BC V6B 2Z4 Canada --- ### [SOLIDWORKS VBA Macros Library](https://bluebyte.biz/solidworks-vba-macros-library/) **Published:** September 12, 2024 **Author:** Amen Jlili **Content:** --- ### [SOLIDWORKS and PDM blog](https://bluebyte.biz/solidworks-and-pdm-engineering-blogspots/) **Published:** March 3, 2018 **Author:** Amen Jlili **Content:** # SOLIDWORKS and PDM blog - [ Home ](https://bluebyte.biz) --- ### [McMaster Cleanup Macro](https://bluebyte.biz/mcmaster-cleanup-macro/) **Published:** December 31, 2024 **Author:** Amen Jlili **Content:** ## McMaster Cleanup Macro The MacMaster Cleanup Macro is a powerful VBA Macro for SOLIDWORKS designed to automate the process of organizing, cleaning your McMaster parts. - Clears all properties from McMaster parts - Reduces errors by cleaning up data consistently. - Minimizes human mistakes in cleanup. - Ensures clean, polished documents. - Works with all versions of SOLIDWORKS Name \*First Last Company Email Name Email \*Professional email required. Company Send Me McMaster Macro by E-mail![Loading](https://bluebyte.biz/wp-content/plugins/wpforms/assets/images/submit-spin.svg) --- ### [Profile](https://bluebyte.biz/profile/) **Published:** December 6, 2024 **Author:** Amen Jlili **Content:** ![](https://secure.gravatar.com/avatar/eb1d34a5532535774f7525ab9d281f728fa3795852213b5784b26eaae9272a0f?s=150&r=g) ## Shahmeer [Edit profile](https://bluebyte.biz/wp-admin/profile.php) ### Your Stats **8** Courses **2** Completed **2** Certificates 0 Points ### Your Courses Expand All Courses close #### Search Your Courses Course Name [](https://bluebyte.biz/courses/pdm-api-vba-advanced/) SOLIDWORKS PDM API: VBA Advanced Expand SOLIDWORKS PDM API: VBA Advanced Expand SOLIDWORKS PDM API: VBA Advanced Course Progress 0% Complete 0/16 Steps [](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) SOLIDWORKS PDM API: Data Card Add-in Expand SOLIDWORKS PDM API: Data Card Add-in Expand SOLIDWORKS PDM API: Data Card Add-in Course Progress 0% Complete 0/18 Steps [](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) VBA for Non-Programmers Expand VBA for Non-Programmers Expand VBA for Non-Programmers Course Progress 0% Complete 0/10 Steps [](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) SOLIDWORKS PDM Task Add-in Development (C#) Expand SOLIDWORKS PDM Task Add-in Development (C#) Expand SOLIDWORKS PDM Task Add-in Development (C#) Course Progress 0% Complete 0/16 Steps [](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/) SOLIDWORKS PDM Professional API Bootcamp (3 days) [](https://bluebyte.biz/certificate-verification/12D08E519-12D5495AD-312D131/) Complete Expand SOLIDWORKS PDM Professional API Bootcamp (3 days) Expand SOLIDWORKS PDM Professional API Bootcamp (3 days) Course Progress 100% Complete 48/48 Steps [](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) SOLIDWORKS PDM API: Write PDM Add-ins in C# Expand SOLIDWORKS PDM API: Write PDM Add-ins in C# Expand SOLIDWORKS PDM API: Write PDM Add-ins in C# Course Progress 0% Complete 0/8 Steps [](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) SOLIDWORKS PDM API: Basics with VBA [](https://bluebyte.biz/certificate-verification/12D08E519-12D090F46-312D131/) Complete Expand SOLIDWORKS PDM API: Basics with VBA Expand SOLIDWORKS PDM API: Basics with VBA Course Progress 100% Complete 9/9 Steps [](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) Master The SOLIDWORKS API Course To Automate Your Workflow with VBA Expand Master The SOLIDWORKS API Course To Automate Your Workflow with VBA Expand Master The SOLIDWORKS API Course To Automate Your Workflow with VBA Course Progress 0% Complete 0/40 Steps --- ### [Reset Password](https://bluebyte.biz/reset-password/) **Published:** December 6, 2024 **Author:** Amen Jlili **Content:** ## You're Already Logged In You're currently logged in as . Want to sign in as a different user? [Log Out](https://bluebyte.biz/wp-login.php?action=logout&redirect_to=https%3A%2F%2Fbluebyte.biz%2Freset-password%2F&_wpnonce=37f25360f8) --- ### [Registration Success](https://bluebyte.biz/registration-success/) **Published:** December 6, 2024 **Author:** Amen Jlili **Content:** Welcome --- ### [Registration](https://bluebyte.biz/registration/) **Published:** December 6, 2024 **Author:** Amen Jlili **Content:** ## You're Already Logged In You're currently logged in as shahmeer. Want to sign in as a different user? [Log Out](https://bluebyte.biz/wp-login.php?action=logout&redirect_to=https%3A%2F%2Fbluebyte.biz%2Fregistration%2F&_wpnonce=37f25360f8) --- ### [Login Customizer](https://bluebyte.biz/login-customizer/) **Published:** November 27, 2024 **Author:** Amen Jlili **Content:** This page is used for Login Customizer plugin. It will not be visible to your readers. Do not delete it. --- ### [Shop](https://bluebyte.biz/shop/) **Published:** November 11, 2019 **Author:** Amen Jlili --- ## Jobs ### [Product Manager — PDMPublisher and PDMShell](https://bluebyte.biz/jobs/product-manager-pdmpublisher-and-pdmshell/) **Published:** April 25, 2026 **Author:** Shahmeer --- ### [SOLIDWORKS API Developer](https://bluebyte.biz/jobs/solidworks-api-developer/) **Published:** April 24, 2026 **Author:** Shahmeer --- ## Products ### [PDMPublisher (SOLIDWORKS)](https://bluebyte.biz/product/pdmpublisher-solidworks/) **Published:** May 7, 2025 **Author:** Amen Jlili **Excerpt:**

PDMPublisher for SOLIDWORKS is a powerful automation tool that streamlines the export, conversion, and publishing of SOLIDWORKS drawings. It automates complex tasks such as saving to PDF, merging drawings into master PDFs, adding manufacturing quantities, and inserting custom notes — all in one step. PDMPublisher also integrates seamlessly with SOLIDWORKS PDM Professional, SharePoint, and file servers, enabling automatic document routing, archiving, and publishing to external systems.

**Content:** window.addEventListener("message", function (event) { if (event.origin !== "https://docs.bluebyte.biz") return; if (!event.data || event.data.type !== "pdmpublisher-height") return; iframe.style.height = (Number(event.data.height) + 40) + "px"; }); })(); **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** PDMPublisher (SOLIDWORKS), SOLIDWORKS Add-in --- ### [PDMPublisher](https://bluebyte.biz/product/pdmpublisher/) **Published:** September 26, 2024 **Author:** Amen Jlili **Excerpt:** PDMPublisher is a sophisticated tool designed to streamline the export and conversion of SOLIDWORKS documents. This advanced task offers the following key capabilities. Over 100,000 PDFs saved and combined into master PDFs, each annotated with manufacturing quantities and custom notes saving customers tens of thousands of dollars annually. **Content:** window.addEventListener("message", function (event) { if (event.origin !== "https://docs.bluebyte.biz") return; if (!event.data || event.data.type !== "pdmpublisher-height") return; iframe.style.height = (Number(event.data.height) + 40) + "px"; }); })(); **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** SOLIDWORKS PDM Add-in (Task) --- ### [Mastering SOLIDWORKS API: Automate Your Design Workflow With VBA](https://bluebyte.biz/product/mastering-solidworks-api-automate-your-design-workflow-with-vba/) **Published:** December 28, 2024 **Author:** Amen Jlili **Excerpt:** This comprehensive course provides a foundational understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency. **Content:** - This comprehensive course provides a foundational understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency. This course is for: - SOLIDWORKS Design Engineers / Drafters - University students in STEM fields. - Developers learning about SOLIDWORKS automation Course Details: - 10 HOURS of instruction time. - Hands-on teaching style. - Fixed-price course available in perpetuity. - Achievement certificate when you finish the course. System Requirements: - Windows 7, 8, 10 or 11. - SOLIDWORKS 3D Desktop (Student, Standard, Professional, Premium) *or*; - SOLIDWORKS Connected. - VBA component installed with SOLIDWORKS. Material: - Sample files are in SW 2017—instructor using SOLIDWORKS 2023. Overall Objectives: This course equips learners with the necessary knowledge and skills to: - Automate repetitive tasks within the SOLIDWORKS environment, significantly improving productivity and efficiency. - Develop custom VBA macros to streamline complex design processes. - Enhance the functionality of SOLIDWORKS through custom user interfaces and tools. - Gain a deeper understanding of the SOLIDWORKS API and its capabilities. - Write robust, maintainable, and error-free VBA code. - Become proficient in automating various aspects of the SOLIDWORKS design process, including part modeling, assembly, and drawing creation. Core Concepts: - VBA Fundamentals: - Introduction: History, evolution, and diverse applications of VBA across various fields. - Macro Recorder: Practical guidance on utilizing the macro recorder to automate repetitive tasks and subsequently adding custom buttons to the SOLIDWORKS user interface for easy access. - VBA Editor: Navigating the VBA editor interface, understanding its workspace, and customizing it for optimal workflow. - Programming Basics: Essential programming concepts, including variables, data types, and control structures (if statements, loops, operators, and expressions). - Subroutines & Functions: Defining and utilizing subroutines and functions within the VBA environment. - Data Structures: Exploring various data structures available in VBA to organize and manage data effectively. - Modules & Classes: Understanding the distinction between standard modules and class modules, and their respective roles in VBA development. - Code Quality: Emphasizing the importance of writing clean, maintainable code through proper naming conventions, comprehensive code comments, and thorough documentation. - Debugging: Identifying and resolving common errors in VBA code using debugging tools and techniques. - Error Handling: Implementing robust error handling techniques to prevent unexpected program failures and ensure code stability. - Option Explicit: Understanding the significance of `Option Explicit` in enforcing variable declaration and improving code reliability. - Events: Learning how to create and utilize events within the VBA environment to trigger specific actions. - User Forms: Designing and creating user forms with interactive elements (buttons, text boxes, etc.) to enhance user interaction with VBA applications. - SOLIDWORKS API: - API Documentation: Comparing offline and online API documentation and mastering the navigation of offline documentation for efficient reference. - SldWorks Interface: Gaining a thorough understanding of the SldWorks interface, its key features, and functionalities. - Common Functionalities: Mastering essential API functionalities: - Opening, activating, and closing SOLIDWORKS documents. - Accessing and modifying system options and document properties. - Managing custom properties at both document and configuration levels. - Navigating and manipulating the feature manager tree. - Utilizing the selection manager to efficiently select and interact with objects within the SOLIDWORKS environment (e.g., `GetSelectedObject`, `GetSelectedObjectType`, `GetSelectedObjectCount`). - Working with configurations, including listing, creating, activating, and deleting configurations. - Creating new documents using templates. - Parts Automation: - Accessing and manipulating bodies. - Traversing the geometry tree (entities, faces, edges, vertices). - Creating and editing references (e.g., reference planes). - Sketching and utilizing sketches for operations like extrusion and cutting. - Suppressing features. - Assembly Automation: - Traversing the assembly component tree. - Working with referenced configurations within components. - Inserting components within assemblies. - Advanced selection techniques for creating mates. - Mating components using the API. - Drawing Automation: - Creating drawings with pre-defined views. - Generating Bills of Materials (BOM) tables. - Traversing drawing annotations. - Mini-Project: - DXF Exporter for sheet metal parts in an assembly **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Course --- ### [PDMPublisher (SOLIDWORKS)](https://bluebyte.biz/product/pdmpublisher-solidworks-large-teams/) **Published:** September 8, 2025 **Author:** Shahmeer **Excerpt:**

PDMPublisher for SOLIDWORKS is a powerful automation tool that streamlines the export, conversion, and publishing of SOLIDWORKS drawings. It automates complex tasks such as saving to PDF, merging drawings into master PDFs, adding manufacturing quantities, and inserting custom notes — all in one step. PDMPublisher also integrates seamlessly with SOLIDWORKS PDM Professional, SharePoint, and file servers, enabling automatic document routing, archiving, and publishing to external systems.

**Content:** ### How to Export Each SOLIDWORKS Configuration as a Separate File Automatically split and export your SOLIDWORKS configurations with PDMPublisher 2025. Each configuration can be published as a separate file, complete with custom naming rules and output folders. ### How to Export Each SOLIDWORKS Part and Assembly as HTML Share your SOLIDWORKS models in any browser. PDMPublisher exports parts and assemblies as lightweight HTML files — perfect for quick design reviews and vendor communication. ### Add Annotations to Exported PDFs in SOLIDWORKS Add smart annotations automatically to your exported PDFs with PDMPublisher. Pull property data, part numbers, or revisions directly from your drawings and place them anywhere on the final file. ### Export All Assembly References to STEP in SOLIDWORKS Automate your STEP exports in PDM Professional. PDMPublisher can export files and check them into your PDM Vault — or export locally without PDM — all with smart file naming. ### Export Sheet Metal Flat Pattern in SOLIDWORKS Automate your sheet metal exports with PDMPublisher 2025. Generate precise 1:1 DXFs for every sheet metal part — no manual saves, renaming, or missed files. ### Run PDM Publisher as a PDM Task Automate exports directly from your PDM vault. PDMPublisher handles PDFs, DXFs, STEP, and more with smart folder routing, automatic file naming, and full assembly support. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** PDMPublisher (SOLIDWORKS), SOLIDWORKS Add-in --- ### [SOLIDWORKS PDM Task Add-in Development (C#)](https://bluebyte.biz/product/solidworks-pdm-task-add-in-development-c/) **Published:** March 18, 2026 **Author:** Shahmeer **Excerpt:** The SOLIDWORKS PDM Task Add-in Development course from Blue Byte Systems Inc. is a specialized, technical deep-dive designed for developers and automation leads who want to master the art of vault automation. This intensive program empowers you to build high-performance custom add-ins using C# or VB.NET, enabling you to design, implement, and deploy sophisticated tools that handle complex engineering processes—from seamless file conversions and data extraction to advanced, workflow-driven operations. **Content:** The course begins with an introduction to **SOLIDWORKS PDM Task Add-ins** and an overview of how task automation works inside the vault. Participants will review the standard Convert Task and learn how custom task add-ins extend its capabilities to automate engineering processes. Next, we will cover the development environment setup, including system requirements, project templates, and how to correctly add the **SOLIDWORKS PDM PIAs** as references. This section ensures participants can successfully build and run a task add-in locally. The implementation portion focuses on the core architecture of PDM add-ins. We will walk through the **GetAddInInfo** method, explore the Command Manager (CmdMgr), and examine how task hooks work inside the PDM task framework. Participants will also learn how partial classes are used to organize add-in code and improve maintainability. From there, the course moves into building and debugging the add-in. We will demonstrate how to compile and register the add-in in the vault, how to attach the debugger to the PDM processes, and how to troubleshoot common issues during development. The course then focuses on building user interaction for tasks, including creating custom task dialog pages and persisting settings using **EdmTaskSetupPage**. We will also cover the **TaskSetupButton** implementation for saving configuration settings and adding custom commands. Finally, participants will learn how tasks execute within PDM by exploring the **TaskLaunch** and **TaskRun** hooks, understanding the execution flow, and implementing real task logic. The course concludes with final testing and deployment best practices to ensure the add-in runs reliably in a production vault environment. **Product categories:** Free **Product tags:** Course --- ### [PDMPublisher](https://bluebyte.biz/product/pdmpublisher-trial/) **Published:** April 1, 2026 **Author:** Amen Jlili **Excerpt:** PDMPublisher is a sophisticated tool designed to streamline the export and conversion of SOLIDWORKS documents. This advanced task offers the following key capabilities. Over 100,000 PDFs saved and combined into master PDFs, each annotated with manufacturing quantities and custom notes saving customers tens of thousands of dollars annually. This product is a trial version. **Content:** WHAT YOU GET - ✅ **Premium Support:** Licensed users receive direct access to our experienced technical support team to ensure you get maximum value from PDMPublisher. - ✅**[Licensed per Vault](https://docs.bluebyte.biz/src/licensespdmpublisher.html):** A flexible, scalable licensing model designed to support teams of any size without per-user restrictions. - ✅**[Unlimited Users & Tasks](https://docs.bluebyte.biz/src/options.html):** Run unlimited automated tasks for unlimited users from a single vault license. - ✅ **Cloud-Based Logs:** Securely store and review detailed execution logs in the cloud for auditing, troubleshooting, and traceability. - ✅ **PDMDeploy Delivery:** Seamlessly install and update PDMPublisher using our continuous delivery platform, with full version control and rollback support. SUPPORTED OUTPUT FORMATS - ✅ **PDF:** Primary output format for sharing, manufacturing, and long-term archiving. - ✅**[2D Engineering Documents](https://docs.bluebyte.biz/src/pdmpublisher.html):**DXF, DWG, and PDF outputs for drawings and manufacturing documentation. - ✅ **3D Engineering Documents:**Export STEP, IGES, and X\_T files directly from SOLIDWORKS PDM. - ✅ **eDrawings Professional:**Publish eprt, edrw, and easm files for lightweight collaboration and review. - ✅ **HTML:**Generate HTML outputs for browser-based viewing([eDrawings Professional required](https://bluebyte.biz/macros/delete-all-dangling-dimensions-from-drawing-vba-macro/)). SMART FOLDER & FILE NAME GENERATION - ✅ Export files inside or outside the SOLIDWORKS PDM vault. - ✅ Automatically create folder structures when they do not exist. - ✅ Use data card variables in folder paths and file names. - ✅Incorporate workflow, state, version, revision, configuration name, and SQL-based variables. - ✅ Leverage host machine and launching user information. - ✅ Target root folders or top-level assembly folders automatically. ADVANCED PUBLISHING CONDITIONS - [✅ Create powerful, workflow-like conditions to control exactly which files, configurations, and references are processed. Conditions can evaluate configuration-specific data for assemblies, parts, and drawings.](https://docs.bluebyte.biz/src/conditions.html) DYNAMIC PDF ANNOTATIONS - [✅Combine static text with dynamic data to create intelligent, context-aware PDF annotations.](https://docs.bluebyte.biz/src/annotations.html)[✅ Place annotations anywhere on the drawing sheet.](https://docs.bluebyte.biz/src/annotations.html) ✅ Use data card variables, configuration values, and custom text together. ✅Built-in dynamic variables include user, launch user, date/time, workflow state, and top-level assembly metadata. SPECIALIZED SHEET METAL FUNCTIONALITY - ✅ Automatically export 1:1 DXF flat patterns for sheet metal parts, including advanced options to control bend lines, layers, and removal of counterbore outer geometry for cleaner manufacturing outputs. COMMON ENGINEERING AUTOMATION TASKS - ✅Automate repetitive engineering and release processes directly from SOLIDWORKS PDM. - ✅Print and combine PDFs for top-level assemblies and referenced components into a single, structured document. - ✅Add manufacturing quantities, revision information, and custom metadata directly onto published PDFs. - ✅Automatically archive, watermark, and version-control published outputs for compliance and traceability. - ✅Process individual parts and drawings or entire assemblies using the same flexible task framework. **[FAQ](https://docs.bluebyte.biz/src/pdmpublisherfaq.html)** **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** SOLIDWORKS PDM Add-in (Task), Trial --- ### [PDMShell](https://bluebyte.biz/product/pdmshell-trial/) **Published:** April 1, 2026 **Author:** Amen Jlili **Excerpt:**

PDMShell is a scripting and automation platform for SOLIDWORKS PDM Professional that simplifies complex vault operations. Designed as a modern alternative to Dispatch, it enables administrators and developers to automate file management, metadata updates, workflow transitions, version control, and other PDM tasks through a powerful scripting engine and command-line interface.

⚠️ SOLIDWORKS Reseller/Partner Notice If you are a SOLIDWORKS reseller or partner, please contact us directly . The licensing and pricing on this page apply only to SOLIDWORKS PDM end-customer companies.
**Content:** PDMShell is a SOLIDWORKS PDM automation tool that helps teams run cleanup, validation, batch processing, workflow, and data card tasks through simple commands and reusable scripts. ## Download Options Choose the installer or deployment option that matches your environment. OptionUse This WhenDownload**PDMShell Installer**Install the standalone PDMShell desktop application on a workstation.[Download Installer](https://bluebyte.biz/wp-json/slm_custom/downloadpdmshell)**PDMDeploy**Deploy Blue Byte Systems add-ins into a SOLIDWORKS PDM vault.[Download PDMDeploy](https://docs.bluebyte.biz/pdmdeploy/PDMDeploy31.cex)**PDMShell PDM Add-in**Download the PDMShell add-in .cex file for deployment through the SOLIDWORKS PDM Administration Tool.[Open Download Center](https://bluebytebiz-my.sharepoint.com/:f:/g/personal/amen_bluebyte_biz/IgC-eoPU0Z9XQpufSHG6IW0GAaCnMSVhuaZoUifopAZr6b0?e=0gMaF4)## PDMShell Editions Start with the Free edition, activate a 7-day Premium trial, or purchase Premium. ### Overview EditionBest For**Free**Evaluation, quick validation, and small command-line jobs.**7-Day Premium Trial**Testing Premium commands, unlimited scripts, workflow transitions, and PDM add-in automation before purchasing.**Premium**Production automation, unlimited scripting, workflow integration, and PDMShell add-in deployment.### Order PDMShell Premium Free for 7 Days Activate a 7-day trial to evaluate the complete PDMShell Premium feature set in your SOLIDWORKS PDM environment. - Full Premium command access - Unlimited RUNSCRIPT script length - Unlimited search results - Workflow transition support - PDMShell PDM add-in access - No purchase required to begin the trial ### Feature Comparison FeatureFree7-Day TrialPremiumSearch result limit5 itemsUnlimitedUnlimitedRUNSCRIPT script length5 linesUnlimitedUnlimitedCommand-line useYes, with limitsYesYesWorkflow transitionsNoYesYesPDMShell PDM add-inNoYesYesAutomation scriptingLimitedUnlimited for 7 daysUnlimitedPriority supportNoNoYesCommercial useYes, non-resellers onlyEvaluation onlyYesReseller useNoEvaluation onlyYesCostFreeFree for 7 daysSeat-based annual pricing ### Premium Licensing Premium licensing is seat-based. A seat can be activated on a single machine through the standalone PDMShell application or managed through the PDMShell add-in license manager for pooled vault access. OptionActivation LocationBest For**Single Machine**Standalone PDMShell application installed on the workstationOne workstation or one administrator**License Pool**PDMShell add-in license manager in the SOLIDWORKS PDM Administration ToolTeams using PDMShell add-in automation from a shared PDM vault **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Program, Trial --- ### [SOLIDWORKS PDM API: Data Card Add-in](https://bluebyte.biz/product/solidworks-pdm-api-data-card-add-in/) **Published:** May 9, 2026 **Author:** Shahmeer **Excerpt:**
Learn how to develop a custom SOLIDWORKS PDM Data Card add-in using C# and the SOLIDWORKS PDM API. This advanced course covers metadata extraction, debugging, PDM events, triggering logic from data card buttons, adding menus to File Explorer, and storing settings in the vault database.
**Content:** #### **Course Overview** Learn how to build a custom SOLIDWORKS PDM Data Card add-in using C# and the SOLIDWORKS PDM API. This advanced course walks you through creating a custom data card button that transfers metadata from SOLIDWORKS models into drawings, helping reduce manual work and improve data accuracy. You’ll gain hands-on experience developing PDM add-ins from scratch, configuring your Visual Studio environment, working with core PDM API interfaces, debugging add-ins, handling PDM events, triggering logic from data card buttons, adding custom menus to File Explorer, and storing add-in settings in the vault database. This course is designed for developers, PDM administrators, and advanced SOLIDWORKS users who want to automate PDM processes and build custom integrations inside SOLIDWORKS PDM Professional. #### What You’ll Learn: - Create a SOLIDWORKS PDM add-in using C# - Configure Visual Studio for PDM API development - Work with `IEdmVault5`, `IEdmAddIn5`, and command managers - Trigger custom logic from data card buttons - Add custom right-click menus to File Explorer - Handle PDM events and command hooks - Extract and write PDM metadata programmatically - Pair SOLIDWORKS models with their related drawings - Store and retrieve add-in settings from the vault database - Debug PDM add-ins using multiple methods **Product categories:** Free **Product tags:** Course --- ### [SOLIDWORKS PDM API: Advanced VBA](https://bluebyte.biz/product/solidworks-pdm-api-advanced-vba/) **Published:** May 23, 2026 **Author:** Amen Jlili **Excerpt:**

This comprehensive course provides a advanced understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency.

**Content:** SOLIDWORKS PDM API VBA Advanced is a hands-on course designed for users who already understand the basics of SOLIDWORKS PDM and want to start building real automation tools using the SOLIDWORKS PDM API with VBA. This course walks you through the full process of creating a practical PDM automation utility from the ground up. You will configure your VBA development environment, connect to the PDM API, understand the vault object hierarchy, build a user interface, securely log in to a vault, browse folders, read file configurations, access data card variables, and safely update files through proper check-out and check-in logic. Rather than focusing only on isolated API calls, this course teaches the complete workflow required to build reliable automation inside a real SOLIDWORKS PDM environment. ## What You Will Learn You will learn how to configure the VBA editor for SOLIDWORKS PDM API development, add the required API references, and understand how the main PDM API objects relate to each other. The course then moves into vault access, including creating the vault instance, retrieving local vault views, implementing secure login, validating user access, and handling common login errors. From there, you will build a practical user interface and expand it with configuration selectors and dynamic selection logic. You will learn how to browse PDM folders, use iterator patterns, loop through file configurations, and read data card variables from selected files. The advanced portion of the course focuses on file automation workflows, including smart file locking logic, safely updating variable values, and completing the update and check-in cycle without leaving files in an inconsistent state. ## Course Content - Introduction and environment setup - Configuring the VBA editor - Adding SOLIDWORKS PDM API references - Understanding the PDM API hierarchy - Creating the vault instance - Retrieving local vault views - Building the user interface - Implementing secure login - Login validation and error handling - Browsing folders and using the iterator pattern - Expanding the UI with configuration selectors - Building dynamic selection logic - Iterating file configurations - Reading data card variables - Implementing smart file locking logic - Updating files and completing the check-in cycle ## Who This Course Is For This course is ideal for SOLIDWORKS PDM administrators, CAD managers, engineers, automation specialists, and VBA developers who want to create custom tools for SOLIDWORKS PDM Professional. It is especially useful for users who want to automate repetitive PDM tasks, reduce manual data entry, improve file update workflows, and better understand how to interact with the PDM vault programmatically. ## By the End of This Course By the end of this course, you will have a stronger understanding of the SOLIDWORKS PDM API and how to use VBA to build practical automation tools. You will know how to connect to a vault, browse files and folders, work with configurations, read and update data card variables, manage file locking, and safely complete automated check-in workflows. This course gives you the foundation needed to start building more advanced SOLIDWORKS PDM automation utilities for real engineering and production environments. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Course --- ### [Enterprise Support Services](https://bluebyte.biz/product/enterprise-support-services/) **Published:** June 10, 2026 **Author:** Amen Jlili **Excerpt:** An 8-hour block of Enterprise Support Services for Blue Byte Systems products, billed at $150/hour. Hours may be used for PDMShell, PDMPublisher, troubleshooting, scripting support, implementation guidance, and SOLIDWORKS PDM automation assistance. **Content:** Blue Byte Systems Enterprise Support Services are designed for organizations that need direct technical assistance with Blue Byte Systems products and SOLIDWORKS PDM automation workflows. These support hours can be used for troubleshooting, scripting help, implementation planning, product configuration, workflow automation, and general technical guidance for PDMShell and PDMPublisher. This service is ideal for teams that want expert support without committing to a large custom development project. ## Common Use Cases - Help writing or debugging PDMShell scripts - Assistance configuring PDMPublisher - Troubleshooting PDM automation issues - Reviewing implementation plans - Guidance for PDM tasks, workflows, and automation logic - Support during deployment or rollout - Technical Q&A for administrators and engineering teams ## Important Notes Enterprise Support Services are limited to Blue Byte Systems products and related SOLIDWORKS PDM automation support. Custom development, large integrations, migrations, and new product features may require a separate estimate or project agreement. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Enterprise Support Services --- ### [PDMShell](https://bluebyte.biz/product/pdmshell/) **Published:** November 6, 2024 **Author:** Amen Jlili **Excerpt:**
PDMShell is a scripting and automation platform for SOLIDWORKS PDM Professional that simplifies complex vault operations. Designed as a modern alternative to Dispatch, it enables administrators and developers to automate file management, metadata updates, workflow transitions, version control, and other PDM tasks through a powerful scripting engine and command-line interface.
**Content:** PDMShell is a SOLIDWORKS PDM automation tool that helps teams run cleanup, validation, batch processing, workflow, and data card tasks through simple commands and reusable scripts. [![Get PDMShell from Microsoft Store](https://bluebyte.biz/wp-content/uploads/2024/11/microsoftstore-300x108.png)](https://apps.microsoft.com/detail/xpffxttjdcw85c?hl=en-US&gl=CA&ocid=pdpshare) or [DOWNLOAD IT FROM PDMSHELL.COM](https://pdmshell.com) ## Download Options Choose the installer or deployment option that matches your environment. OptionUse This WhenDownloadPDMShell InstallerInstall the standalone PDMShell desktop application on a workstation.[Download installer](https://bluebyte.biz/wp-json/slm_custom/downloadpdmshell)PDMDeployDeploy Blue Byte Systems add-ins into a SOLIDWORKS PDM vault.[Download PDMDeploy](https://docs.bluebyte.biz/pdmdeploy/PDMDeploy31.cex)PDMShell PDM Add-inDownload the PDMShell add-in .cex file from the Microsoft-hosted SharePoint Download Center.[Open Download Center](https://bluebytebiz-my.sharepoint.com/:f:/g/personal/amen_bluebyte_biz/IgC-eoPU0Z9XQpufSHG6IW0GAaCnMSVhuaZoUifopAZr6b0?e=0gMaF4)## PDMShell Free vs Premium PDMShell comes in two editions: Free for evaluation and lightweight command-line use, and Premium for production automation in SOLIDWORKS PDM. ### Overview EditionBest ForFreeEvaluation, quick validation, and small command-line jobs.PremiumProduction automation, unlimited scripting, workflow integration, and PDMShell add-in deployment.### Feature Comparison FeatureFreePremiumSearch result limit5 itemsUnlimitedRunscript script length5 linesUnlimitedCommand-line useYes, with Free limitsYes, without Free limitsWorkflow transitionsNoYesPDMShell add-inNoYesAutomation scriptingLimited to 5 script linesUnlimitedPriority supportNoYesCommercial useYes, non-resellers onlyYesReseller useNoYesCostFreeSeat-based annual pricing### Premium Licensing Premium licensing is seat-based. A seat can be activated on a single machine through the standalone PDMShell application, or managed through the PDMShell add-in license manager when you want pooled vault access. OptionActivation LocationBest ForSingle machineStandalone PDMShell application installed on the workstationOne workstation or one administratorLicense poolPDMShell add-in license manager in the SOLIDWORKS PDM Administration ToolTeams using PDMShell add-in automation from a shared PDM vault **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Program --- ### [Blue Byte All-Access Online Course Library (Yearly)](https://bluebyte.biz/product/blue-byte-all-access-online-course-library-yearly/) **Published:** May 31, 2026 **Author:** Amen Jlili **Excerpt:** Get access to the full Blue Byte online course library for SOLIDWORKS VBA macros, PDM VBA macros, PDM data card add-ins, and PDM task add-ins. Includes course files, certificates, and technical support while your subscription is active. **Content:** The Blue Byte All-Access Online Course Library gives you one subscription for the complete online training library focused on SOLIDWORKS and PDM automation. Learn how to build practical automation tools used in real engineering workflows, including SOLIDWORKS VBA macros, PDM VBA macros, PDM data card add-ins, PDM task add-ins, debugging, deployment, and production-ready automation patterns. Included with your subscription: - Access to all included online courses - SOLIDWORKS VBA macro training - PDM VBA macro training - PDM data card add-in development - PDM task add-in development - Course source code and project files - Certificates with unique IDs and QR verification - Technical support for course content and automation questions - Access to future online courses added to the library **Important Notes** Prices are charged in U.S. dollars. Local currency amounts shown on the landing page are estimates only and may vary based on exchange rates and payment provider fees. Canadian customers who want to be charged in Canadian dollars should contact Blue Byte Systems before purchasing. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Course --- ### [Blue Byte All-Access Online Course Library (Monthly)](https://bluebyte.biz/product/api-bundle/) **Published:** December 30, 2024 **Author:** Amen Jlili **Excerpt:** Get access to the full Blue Byte online course library for SOLIDWORKS VBA macros, PDM VBA macros, PDM data card add-ins, and PDM task add-ins. Includes course files, certificates, and technical support while your subscription is active. **Content:** The Blue Byte All-Access Online Course Library gives you one subscription for the complete online training library focused on SOLIDWORKS and PDM automation. Learn how to build practical automation tools used in real engineering workflows, including SOLIDWORKS VBA macros, PDM VBA macros, PDM data card add-ins, PDM task add-ins, debugging, deployment, and production-ready automation patterns. Included with your subscription: - Access to all included online courses - SOLIDWORKS VBA macro training - PDM VBA macro training - PDM data card add-in development - PDM task add-in development - Course source code and project files - Certificates with unique IDs and QR verification - Technical support for course content and automation questions - Access to future online courses added to the library The subscription is billed monthly at US$19.99/month. Cancel anytime. Individual premium courses are available separately for US$299 each. **Important Notes** Prices are charged in U.S. dollars. Local currency amounts shown on the landing page are estimates only and may vary based on exchange rates and payment provider fees. Canadian customers who want to be charged in Canadian dollars should contact Blue Byte Systems before purchasing. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Course --- ### [SOLIDWORKS PDM API: Write PDM Add-ins in C#](https://bluebyte.biz/product/solidworks-pdm-api-write-pdm-add-ins-in-c/) **Published:** December 30, 2024 **Author:** Amen Jlili **Excerpt:**

This course provides an introduction to creating and implementing SOLIDWORKS PDM add-ins using C# and the SOLIDWORKS PDM API. Designed for PDM administrators and developers, this course focuses on automating tasks within the SOLIDWORKS PDM environment, improving workflow efficiency, and integrating custom add-ins into the vault.

**Content:** #### **Course Overview** This SolidWorks PDM course introduces basic concepts of developing and leveraging SOLIDWORKS PDM add-ins using the C# programming language and the SOLIDWORKS PDM API. It is designed for PDM administrators and developers, as the course material will describe ways to automate tasks in their SOLIDWORKS PDM environment, extend the workflow process, and incorporate custom add-ins into the vault. #### **This Course is For:** - SOLIDWORKS PDM Administrators - Developers #### **Course Details:** - Course Duration: 30 minutes of instructional time. - Teaching Style: Hands-on with practical examples. - Pricing: Fixed-price course available indefinitely. - Certification: Achievement certificate upon completion. #### **Technical Support:** 🧑‍💻 **Premium Technical Support for Subscription Members:** Gain access to Blue Byte Systems’ internal resources for quick answers to your SOLIDWORKS PDM API questions. This service is a paid add-on for course participants. #### **System Requirements:** - Operating System: Windows 7, 8, 10, or 11. - SOLIDWORKS PDM Professional. - VBA Component installed with SOLIDWORKS. #### **Overall Objectives:** By the end of this course, students will be able to: - [Set up a Visual Studio project](https://code.visualstudio.com/docs/setup/setup-overview) for creating SOLIDWORKS PDM add-ins using C#. - Use the IEdmAddIn5 interface to add custom functionality to the PDM vault. - Add and test the PDM add-in in the SOLIDWORKS PDM environment. - Debug and troubleshoot add-ins in Visual Studio to ensure proper functionality. #### **Core Concepts:** ##### *Creating Visual Studio Project Files* - **Building the Visual Studio Class Library Project** You will build the [Visual Studio project for the add-in](https://marketplace.visualstudio.com/items?itemName=BlueByteSystemsInc.ID), including setting project properties and project references. ##### *Implementing the IEdmAddIn5 Interface* - **Implementing the IEdmAddIn::GetAddInInfo Method:** You will learn how to implement the `GetAddInInfo` method to provide information about the add-in. - **Implementing the IEdmAddIn::OnCmd Method:** You will learn how to implement the `OnCmd` method to handle commands in PDM. ##### *Testing the PDM Add-In* - **How to Add a PDM Add-in to the Vault:** Instructions for adding your developed add-in to a [SOLIDWORKS PDM](https://bluebyte.biz/product/pdmpublisher/) vault. - **How to Debug a PDM Add-In in Visual Studio:** Learn how to debug and troubleshoot the add-in within Visual Studio. **Product categories:** Free **Product tags:** Course --- ### [SOLIDWORKS PDM API: Basics in VBA](https://bluebyte.biz/product/solidworks-pdm-api-vba/) **Published:** December 28, 2024 **Author:** Amen Jlili **Excerpt:**

This comprehensive course provides a foundational understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency.

**Content:** This course provides is introduction to **SOLIDWORKS PDM** automation using **VBA** and the **SOLIDWORKS PDM API**. It is designed for those interested in automating tasks within the SOLIDWORKS PDM environment, such as managing files, folders, and data cards in the vault, and improving efficiency in PDM workflows. This course is for: - ⚙️ **SOLIDWORKS PDM Administrators**. ### **Course Details:** - ⏱️ **30 mins** of instructional time. - 🎓 **Hands-on teaching style** with practical examples. - 💰 **Fixed-price course available in perpetuity.** - ✅ **Achievement certificate** upon completion. ### **Technical Support:** 🧑‍💻 **Premium technical support** for subscription-based members: Gain access to **Blue Byte Systems’ internal resources** for quick answers to your SOLIDWORKS PDM API questions. This is a separate, paid service available to course participants. ### **System Requirements:** - Windows 7, 8, 10, or 11. - SOLIDWORKS PDM Professional. - VBA component installed with SOLIDWORKS. ### **Overall Objectives:** By the end of this course, students will be able to: - Automate file and folder management in [**SOLIDWORKS PDM**](https://bluebyte.biz/service/pdm-automation-integration/) using the **VBA API**. - Work with **SOLIDWORKS PDM vaults** by logging in and interacting with files and folders. - Read and edit **datacard variables** using PDM API interfaces to automate data handling. - Develop efficient solutions to automate day-to-day tasks, improving PDM workflow and data management. ### **Core Concepts:** #### **The Vault Object (IEdmVault5):** - **Hello Vault Program in VBA**: Writing a simple program to connect to a **SOLIDWORKS PDM vault** using the **IEdmVault5** interface. - **Logging into the Vault**: Understanding how to use `LoginAuto` and `Login` to authenticate and connect to a vault. #### **Working with Files and Folders (IEdmFile5 and IEdmFolder5):** - **Getting the IEdmFile5 Interface**: Extracting the file interface to work with files stored in the PDM vault. - **Traversing the Folder Tree**: Using the PDM API to navigate the folder structure within a vault programmatically. - **Checking Files In and Out**: Automating the file check-in and check-out process using the [**PDM API**](https://bluebyte.biz/pdm-api-tips/a-quickstart-guide-with-the-solidworks-pdm-web-api/). #### **Read and Edit Datacard Variables (IEdmVariableEnumerator5):** - **Reading and Editing Data Variables**: Learn how to use the [**IEdmVariableEnumerator5**](https://help.solidworks.com/2020/english/api/epdmapi/epdm.interop.epdm~epdm.interop.epdm.iedmenumeratorvariable5.html) interface to access and modify data card variables for files stored in the vault. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** Course --- ### [PDMPublisher (SOLIDWORKS)](https://bluebyte.biz/product/pdmpublisher-solidworks-small-teams/) **Published:** September 8, 2025 **Author:** Shahmeer **Excerpt:**

PDMPublisher for SOLIDWORKS is a powerful automation tool that streamlines the export, conversion, and publishing of SOLIDWORKS drawings. It automates complex tasks such as saving to PDF, merging drawings into master PDFs, adding manufacturing quantities, and inserting custom notes — all in one step. PDMPublisher also integrates seamlessly with SOLIDWORKS PDM Professional, SharePoint, and file servers, enabling automatic document routing, archiving, and publishing to external systems.

**Content:** ### How to Export Each SOLIDWORKS Configuration as a Separate File Automatically split and export your SOLIDWORKS configurations with PDMPublisher 2025. Each configuration can be published as a separate file, complete with custom naming rules and output folders. ### How to Export Each SOLIDWORKS Part and Assembly as HTML Share your SOLIDWORKS models in any browser. PDMPublisher exports parts and assemblies as lightweight HTML files — perfect for quick design reviews and vendor communication. ### Add Annotations to Exported PDFs in SOLIDWORKS Add smart annotations automatically to your exported PDFs with PDMPublisher. Pull property data, part numbers, or revisions directly from your drawings and place them anywhere on the final file. ### Export All Assembly References to STEP in SOLIDWORKS Automate your STEP exports in PDM Professional. PDMPublisher can export files and check them into your PDM Vault — or export locally without PDM — all with smart file naming. ### Export Sheet Metal Flat Pattern in SOLIDWORKS Automate your sheet metal exports with PDMPublisher 2025. Generate precise 1:1 DXFs for every sheet metal part — no manual saves, renaming, or missed files. ### Run PDM Publisher as a PDM Task Automate exports directly from your PDM vault. PDMPublisher handles PDFs, DXFs, STEP, and more with smart folder routing, automatic file naming, and full assembly support. **Product categories:** SOLIDWORKS & PDM Plugins **Product tags:** PDMPublisher (SOLIDWORKS), SOLIDWORKS Add-in --- ## Courses ### [SOLIDWORKS PDM Task Add-in Development (C#)](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) **Published:** March 2, 2026 **Author:** Maher Mehiri **Content:** The **SOLIDWORKS PDM Task Add-in Development** course from **Blue Byte Systems Inc**. is a specialized, technical deep-dive designed for developers and automation leads who want to master the art of vault automation. This intensive program empowers you to build high-performance custom add-ins using **C# or VB.NET**, enabling you to design, implement, and deploy sophisticated tools that handle complex engineering processes—from seamless file conversions and data extraction to advanced, workflow-driven operations. **Course Tags:** C#, PDM Professional, Visual Studio --- ### [SOLIDWORKS PDM API: Data Card Add-in](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) **Published:** May 2, 2026 **Author:** Maher Mehiri **Content:** Learn how to develop a custom SOLIDWORKS PDM Data Card add-in using C# and the SOLIDWORKS PDM API. In this course, you’ll build a custom button that extracts metadata from 3D models and automatically transfers it into drawings. The course covers metadata extraction, PDM events, debugging, triggering logic from data card buttons, adding custom menus to File Explorer, and storing settings in the vault database — helping you automate workflows, improve efficiency, and reduce manual errors. **Course Tags:** C#, PDM, SOLIDWORKS --- ### [SOLIDWORKS PDM API: VBA Advanced](https://bluebyte.biz/courses/pdm-api-vba-advanced/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This course teaches you how to configure the VBA environment, add the required API references, connect to a PDM vault, build a user interface, securely log in, browse folders, work with file configurations, read data card variables, and safely update files using proper check-out and check-in logic. The course focuses on real-world workflows used by PDM administrators, CAD managers, engineers, and automation developers who want to reduce repetitive tasks and build reliable tools for SOLIDWORKS PDM Professional. By the end of the course, you will understand how to interact with the PDM vault programmatically and build VBA-based utilities that support engineering and production environments. The curriculum is structured to provide the foundational knowledge required to develop custom automation scripts and modify the standard convert task within the platform. **Course Categories:** SOLIDWORKS PDM **Course Tags:** Datacards, SOLIDWORKS, SOLIDWORKS PDM API, VBA --- ### [VBA for Non-Programmers](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** This course is about **the basics of programming with VBA**. It focuses on core concepts such as **variables, data types, conditions, loops, functions**, and simple macros to help build a strong foundation. **Course Tags:** PDM, SOLIDWORKS, VBA --- ### [SOLIDWORKS PDM API: Basics with VBA](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** This course provides an introduction to **SOLIDWORKS PDM** automation using **VBA** and the **SOLIDWORKS PDM API**. It is designed for those interested in automating tasks within the SOLIDWORKS PDM environment, such as managing files, folders, and data cards in the vault, and improving efficiency in PDM workflows. **Course Categories:** SOLIDWORKS **Course Tags:** PDM Professional, SOLIDWORKS, VBA --- ### [Master The SOLIDWORKS API Course To Automate Your Workflow with VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** If you ever find yourself stuck doing the same bland repetitive tasks in SOLIDWORKS over and over, then you’ve probably been thinking to yourself, “There’s a more efficient way of doing this, isn’t there?” Well, we have some exciting news for you: there is! And we’re here to guide you through all you’d want to know to be an expert in automating these tedious tasks with this comprehensive SOLIDWORKS API Course. This course will guide you through the VBA basics and then on to how to use it to automate SOLIDWORKS programmatically. This is a practical SOLIDWORKS API training course, specifically aimed at individuals who need to automate processes in the SOLIDWORKS platform in order to optimize productivity and efficiency. **Course Categories:** SOLIDWORKS **Course Tags:** SOLIDWORKS, VBA --- ### [SOLIDWORKS PDM Professional API Bootcamp (3 days)](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/) **Published:** September 29, 2025 **Author:** Amen Jlili **Content:** The SOLIDWORKS PDM API Bootcamp from Blue Byte Systems Inc. is a three-day, in-person immersive course designed for developers, engineers, and automation leads who want to master the PDM API, build real-world custom tools, and integrate advanced workflows into your PDM environment. **Course Tags:** C#, PDM Professional, SOLIDWORKS, VB.NET, VBA, Visual Studio --- ### [SOLIDWORKS PDM API: Write PDM Add-ins in C#](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** This is your entrance to creating SOLIDWORKS add-ins using the SOLIDWORKS PDM API and C#. It’s for every PDM administrator and developer wanting to automate tasks, streamline workflow, and add their own functionality. Whether you’re an experienced engineer or a student, in this course, you will see how to begin with SOLIDWORKS plugin development and make something truly productive. **Course Categories:** SOLIDWORKS **Course Tags:** C#, PDM Professional, VB.NET, VBA, Visual Studio --- ## Lessons ### [The Update and Check-In Cycle](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/the-update-and-check-in-cycle/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson concludes the course by demonstrating how to **write updated data card variables back to a SOLIDWORKS PDM file** and check it back into the vault. It walks through utilizing the **SetVar method,** correcting a common null reference exception by switching from string validation to ID tracking, and resolving file lock violations by properly closing the data stream using the API’s file lifecycle rules. **Key Takeaways:** - **Variable Modification:** Utilizing the **SetVar method** on the **IEdmEnumeratorVariable8** interface to assign new string values directly to specific data card fields and configuration layouts. - **Null-Safe Identity Validation:** Avoiding runtime object exceptions during multi-user checks by validating numeric identifiers like **LockedByUser.ID** instead of referencing nested string objects on files that may not be checked out. - **Stream Closure Mandate:** Applying the critical **CloseFile method** after a variable modification to release the API’s exclusive hook, allowing downstream routines or the **UnlockFile (check-in)** method to access the file without generating access errors. --- ### [Smart File Locking Logic](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/smart-file-locking-logic/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson covers how to safely manage the checkout state of a file using the SOLIDWORKS PDM API before modifying data. It demonstrates how to use **the user management utility (IEdmUserManager5)** to evaluate ownership, compare the local environment against the vault state, and leverage conditional tracking to ensure files are only checked back in if the macro initiated the checkout. **Key Takeaways:** - **Ownership Validation:** Utilizing **IEdmVault5.CreateUtility** with the **UserMgr enumeration** to dynamically fetch the active username and compare it alongside the system’s **Environ(“COMPUTERNAME”)** against the file’s current lock status. - **State Conflict Prevention:** Implementing defensive guard rails to inspect **LockedOnComputer** and **LockedByUser,** intercepting operations with clear user warnings if a file is already checked out by a different person or machine. --- ### [Reading Data Card Variables](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/reading-data-card-variables/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson details **how to read and retrieve specific data card variables from a SOLIDWORKS PDM file** using the file’s configuration name. It introduces the **variable enumerator interface (IEdmEnumeratorVariable5),** demonstrates how to pass dynamic configuration strings to pull localized data, and outlines the logic required to prepare a file for data modification. **Key Takeaways:** - **Variable Enumeration:** Utilizing the **GetEnumeratorVariable method** on an **IEdmFile5 object** to access the underlying data card data layout. - **Targeted Variable Retrieval:** Employing the **GetVar method** alongside a Variant data type to fetch a configuration-specific variable value (such as “Description”) without modifying file geometry. --- ### [Iterating File Configurations](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/iterating-file-configurations-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson details how to **extract file configurations using the SOLIDWORKS PDM API** and display them in a drop-down menu. It demonstrates how to handle data lists using the string list interface **(IEdmStrList5),** applies the cursor-based iterator pattern to process variable configuration names, and begins the setup for a custom variable data card editor interface. **Key Takeaways:** - **String List Interfaces:** Recognizing that file configurations are returned as an **IEdmStrList5 collection,** which requires structural traversal rather than standard array indexing. - **Double-Iterator Realization:** Applying the familiar **IEdmPosition5 head-and-next sequence (GetHeadPosition and GetNext)** to dynamically pull configuration strings out of a PDM file object. --- ### [UI Expansion: Config Selectors](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/ui-expansion-config-selectors-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson focuses on expanding the **UserForm layout** to handle file-specific metadata like configurations. It demonstrates how to **reposition and size existing controls for a more intuitive user experience, add descriptive text labels**, and integrate a new ComboBox dedicated to displaying individual file configurations based on list selections. **Key Takeaways:** - **Relational UI Design:** Structuring the interface layout sequentially **(Path→ File List → Configurations)** to establish a clear visual hierarchy for the user. --- ### [Dynamic Selection Logic](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/dynamic-selection-logic-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson demonstrates how to capture user selections from a file list box and use the resulting file path to **retrieve an IEdmFile5 object from the vault.** It introduces change-event handling in VBA, object validation, and preparing secondary controls to display fresh, file-specific configuration data. **Key Takeaways:** - **Selection State Management:** Utilizing the **ListBox Change event** to capture the absolute file path immediately whenever a user selects a different item in the UI. - **Direct File Retrieval:** Leveraging the **GetFileFromPath** method of the vault object to instantly transform a UI text path into a fully programmable **IEdmFile5 interface.** --- ### [Browsing Folders and The Iterator Pattern](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/browsing-folders-and-the-iterator-pattern-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson demonstrates how to traverse and **display the contents of a SOLIDWORKS PDM folder inside a VBA ListBox.** It covers setting root folder paths automatically upon login, validating target folder existence, and using the API’s cursor-based iterator pattern to extract and display detailed file properties. **Key Takeaways:** - **Automated Path Resolution:** Using the **RootFolderPath** property of the vault object to instantly establish a reliable baseline path inside the **UserForm text field** upon authentication. - **The PDM Iterator Pattern:** Leveraging **IEdmPosition5** along with **GetFirstFilePosition** and **GetNextFile** inside a **While loop** to systematically step through folder items without risking out-of-bounds index exceptions. --- ### [Login Validation and Error Handling](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/login-validation-and-error-handling-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson addresses **handling redundant API** states by checking an object’s current status before executing actions. It walks through identifying explicit **SOLIDWORKS PDM runtime errors caused by duplicate login attempts** and utilizing built-in state verification properties to bypass unneeded operations. **Key Takeaways:** - **Error Mitigation:** Preventing application crashes by utilizing the **IsLoggedIn** property to check the current connection state before initiating authentication. - **Conditional Exits:** Implementing an immediate exit routine **(Exit Sub)** if a valid vault session is already active, ensuring smoother macro execution. --- ### [Implementing Secure Login](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/implementing-secure-login-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson details how to implement a **secure user login interface** using the SOLIDWORKS PDM API. It covers the **critical security reasons for choosing automatic Windows authentication over manual credential handling**, explains how to extract the host application’s window handle via the SOLIDWORKS API, and shows how to **add robust input validation to the login workflow.** **Key Takeaways:** - **Authentication Security:** Utilizing **LoginAuto** instead of standard login methods to leverage existing system connections, eliminating the need to store hazardous plain-text usernames or passwords. - **Window Handle Acquisition:** Interrogating the host SOLIDWORKS application to access its **Frame object** and extract the unique application window handle **(GetHWND).** --- ### [Building the User Interface](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/building-the-user-interface-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson covers how to enhance a macro by **building a custom UserForm graphical interface in VBA.** It walks through creating and naming a **ComboBox control,** shifting PDM API data retrieval into the form’s **initialization cycle, populating the UI dynamically, and modifying control properties** to prevent unauthorized user input. **Key Takeaways:** - **Event-Driven Initialization:** Utilizing the **UserForm Activate event handler to run SOLIDWORKS PDM API queries automatically** when the interface loads. - **UI Data Binding:** Populating a drop-down control dynamically using the **AddItem** method combined with PDM view metadata **(mbsVaultName).** --- ### [Retrieving Local Vault Views](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/retrieving-local-vault-views-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson demonstrates how to **retrieve and list the local SOLIDWORKS PDM vault views configured on a client machine.** It covers the necessity of using higher-version vault interfaces to access newer API methods, details how to declare and populate arrays of vault information structures, and shows how to iterate through the results to print vault names and local folder paths. **Key Takeaways:** - **Interface Versioning:** Understanding that accessing advanced methods like **GetVaultViews** requires casting the base vault object to a higher-version interface, specifically **IEdmVault8**. - **Metadata Extraction:** Ability to loop through retrieved vault views using **LBound** and **UBound** to extract specific properties such as **mbsVaultName** and **mbsLocalPath** --- ### [Creating the Vault Instance](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/creating-the-vault-instance-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson explains the **critical distinction between an interface and a class** when working with the SOLIDWORKS PDM API in VBA. It covers the theoretical **reason why a specific object type must be instantiated in memory,** provides the exact syntax for declaring and creating the vault object, and demonstrates a basic debugging test to verify the object’s initial state. **Key Takeaways:** - **Instantiation Rules:** Memory cannot instantiate an interface (**IEdmVault5**); developers must call the new instance using the class (**EdmVault5**). - **Status Verification:** Understanding that a newly instantiated vault object defaults to an unauthenticated (**IsLoggedIn = False**) state until an explicit login command is executed --- ### [Understanding the API Hierarchy](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/understanding-the-api-hierarchy-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson introduces **the foundational structure of the SOLIDWORKS PDM API,** focusing on its primary **root object: IEdmVault5.** The lesson demonstrates how to navigate the official **SOLIDWORKS PDM Professional API documentation** within the **EPDM.interop.epdm Namespace** **Key Takeaways:** - **API Root Identification:** Recognition of **IEdmVault5** as the absolute entry point and highest-level object in the **SOLIDWORKS PDM API hierarchy.** --- ### [Adding API References](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/adding-api-references-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson details the **critical initial step of linking external software libraries to the VBA environment.** It covers how to locate and activate the necessary type library required to enable **communication between the development editor and the SOLIDWORKS PDM API.** **Key Takeaways:** - **Library Linking:** Understanding how to **connect external PDM libraries to a VBA project** to expose API objects. - **Troubleshooting Availability:** Ability to diagnose whether a **system supports PDM automation** based on the presence of the Enterprise type library. --- ### [Introduction and Environment Setup](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/introduction-and-environment-setup-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This course covers the fundamental structure and command hierarchy of the **Solidworks PDM API.** The curriculum is structured to provide the foundational knowledge required to develop custom automation scripts and modify the standard convert task within the platform. **Key Takeaways:** - **API Hierarchy:** Understanding the structural organization of the **Solidworks PDM API.** - **Workflow Automation:** The ability to write custom automation scripts and modify existing convert tasks. --- ### [Configuring the VBA Editor](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/configuring-the-vba-editor-2/) **Published:** May 20, 2026 **Author:** Maher Mehiri **Content:** This lesson provides a **step-by-step guide** to initializing a development environment and configuring the user interface within the VBA Editor. It covers the creation of a macro file and details the specific interface panels required to effectively **monitor, test, and debug code during development.** **Key Takeaways :** - **Macro Creation:** Process for initiating and naming a new macro project within the editor. - **Workspace Optimization:** Knowledge of which specific **diagnostic windows (Immediate, Locals, Project Explorer)** are mandatory for debugging API code. --- ### [Lesson](https://bluebyte.biz/lessons/lesson-7/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Lesson](https://bluebyte.biz/lessons/lesson-6/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Lesson](https://bluebyte.biz/courses/pdm-api-vba-advanced/lessons/lesson-5/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Iterating File Configurations](https://bluebyte.biz/lessons/iterating-file-configurations/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Dynamic Selection Logic](https://bluebyte.biz/lessons/dynamic-selection-logic/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [UI Expansion: Config Selectors](https://bluebyte.biz/lessons/ui-expansion-config-selectors/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Browsing Folders and The Iterator Pattern](https://bluebyte.biz/lessons/browsing-folders-and-the-iterator-pattern/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Login Validation and Error Handling](https://bluebyte.biz/lessons/login-validation-and-error-handling/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Implementing Secure Login](https://bluebyte.biz/lessons/implementing-secure-login/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Building the User Interface](https://bluebyte.biz/lessons/building-the-user-interface/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Retrieving Local Vault Views](https://bluebyte.biz/lessons/retrieving-local-vault-views/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Creating the Vault Instance](https://bluebyte.biz/lessons/creating-the-vault-instance/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Understanding the API Hierarchy](https://bluebyte.biz/lessons/understanding-the-api-hierarchy/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Adding API References](https://bluebyte.biz/lessons/adding-api-references/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Configuring the VBA Editor](https://bluebyte.biz/lessons/configuring-the-vba-editor/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Introduction and Environment Setup](https://bluebyte.biz/lessons/introduction-and-environment-setup/) **Published:** May 20, 2026 **Author:** Maher Mehiri --- ### [Navigate the SOLIDWORKS API Documentation](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/navigate-the-solidworks-api-documentation/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description**: In this lesson, you will explore how to access and use the **SOLIDWORKS API documentation** both online and offline. The SOLIDWORKS API provides comprehensive resources for developers to interact programmatically with **SOLIDWORKS**. Understanding where and how to access these resources is crucial for efficient development and troubleshooting. ### 1. **Online Documentation** **SOLIDWORKS Online Documentation** is readily available through the official SOLIDWORKS website and provides the most up-to-date information on the **SOLIDWORKS API**. It offers detailed references, examples, and guides for using the API in a wide variety of tasks. - **Accessing the Online Documentation**: - Go to the official **SOLIDWORKS API Help** page: SOLIDWORKS API Documentation. - This documentation is continuously updated, offering access to the latest API features, functions, and methods. - It is organized by topics, such as **SOLIDWORKS Application Programming**, **Automation**, **Custom Commands**, and more. - **Features of Online Documentation**: - **Search Functionality**: Easily search for specific functions, properties, or objects. - **Code Examples**: See practical code snippets for commonly used API tasks. - **Versioning**: The online docs typically provide the documentation relevant to the latest release of SOLIDWORKS, including any new features or functions. - **SOLIDWORKS API Forum**: The **SOLIDWORKS API Forum** is another valuable online resource where you can ask questions, find solutions to common problems, and engage with the community. You can access the forum from the official SOLIDWORKS website. ### 2. **Offline Documentation** For developers who need to work without an internet connection, SOLIDWORKS provides **offline documentation** options. These can be helpful when working in areas with limited or no internet access. - **Accessing Offline Documentation**: - When you install **SOLIDWORKS** on your computer, it includes an **offline API Help** file that you can access locally. - The offline help is essentially a copy of the API documentation bundled with the installation of SOLIDWORKS. You can access it by pressing **F1** in the **SOLIDWORKS VBA Editor** or navigating to the **Help** menu in SOLIDWORKS and selecting **SOLIDWORKS Help** or **API Help**. - **Benefits of Offline Documentation**: - **Available Anytime**: Once downloaded, offline documentation is accessible at any time without needing an internet connection. - **Integrated with SOLIDWORKS**: Offline documentation is integrated into the SOLIDWORKS environment, allowing for seamless access while working within the application. - **Offline API Help Topics**: - The offline help includes similar sections as the online documentation, such as **API methods**, **properties**, **objects**, and more. It also provides context-sensitive help to assist with debugging and using specific API calls. ### 3. **Choosing Between Online and Offline Documentation** - **Use Online Documentation**: - When you need the **latest information** and updates for your version of **SOLIDWORKS**. - For **advanced code examples** and **community-driven discussions** in the **SOLIDWORKS API Forum**. - **Use Offline Documentation**: - When you’re working in an environment where you have no internet access. - When you prefer having **quick, local access** to API references while writing code within the **SOLIDWORKS VBA Editor**. ### 4. **Other SOLIDWORKS API Resources** - **SOLIDWORKS API SDK**: The **Software Development Kit (SDK)** is a collection of resources that includes API libraries, documentation, and example code. It can be downloaded from the **SOLIDWORKS Customer Portal**. - **SOLIDWORKS API Help via VBA**: Inside the **VBA editor** of SOLIDWORKS, pressing **F1** provides access to detailed API references directly related to the editor you’re working in. - Community-led websites like **[cadoverflow.com](http://cadoverflow.com)**: It’s a free QA website for SOLIDWORKS API enthusiasts. - The **3DSwym** application is at the heart of the **3DEXPERIENCE platform** and is the gateway to collaboration within your business: it allows users to interact with each other, engage with the wider community, generate ideas, and follow them as they progress from a mere proposal to an implemented reality. ### 5. **Summary** - The **online SOLIDWORKS API documentation** is the most comprehensive and up-to-date resource, ideal for developers who need the latest information and examples. - The **offline SOLIDWORKS API documentation** is included with SOLIDWORKS installation, providing local access for development without an internet connection. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Navigate the SOLIDWORKS API Documentation --- ### [UI and Userforms in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/ui-and-userforms-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description**: In this lesson, you will learn how to create and manage **User Interface (UI)** elements and **User Forms** within **VBA**. User Forms provide an interactive way for users to input data, interact with macros, and visualize results in a more intuitive manner. ### 1. **What Are User Forms?** - **User Forms** are customizable dialog boxes that allow users to interact with your **VBA** macros in a structured way. You can add various UI controls like text boxes, buttons, labels, and dropdowns to collect and display information. - User Forms are a key part of creating **user-friendly** automation solutions in **VBA**, as they enable users to easily enter data and control the behavior of the macro. ### 2. **Creating a User Form** - To create a **User Form** in **VBA**, you need to open the VBA editor, which can be accessed via `Alt + F11` in **SOLIDWORKS**. - Once in the VBA editor, you can insert a new User Form and begin adding controls to it, such as text boxes, buttons, and labels. - The **UserForm** is essentially a container for your interface components and provides an easy way to collect inputs or display information to users. ### 3. **Common Controls in User Forms** User Forms in **VBA** can contain various controls, each serving a different function: - **TextBox**: Used for entering text, such as part names or dimensions. - **ComboBox**: Provides a dropdown list for selecting predefined options. - **CheckBox**: Allows users to select or deselect an option (True/False). - **OptionButton (Radio Button)**: Lets users choose one option from a set of predefined options. - **CommandButton**: Executes an action or submits data when clicked. - **Label**: Displays static text to describe or guide users. - **ListBox**: Allows users to select multiple items from a list. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** UI and Userforms in VBA --- ### [Events in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/events-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, you will explore the concept of **events** in **VBA** and how they can be used to create responsive macros. Events allow your code to be triggered by specific actions such as opening a document, modifying a part, or interacting with the user interface. ### **What Are Events?** **Events** in VBA are built-in mechanisms that allow your code to respond automatically to specific actions that occur during the execution of your program. These actions can be system-generated or user-triggered events like clicking a button, opening a document, or changing a model. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Events in VBA --- ### [Debugging VBA Code](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/debugging-vba-code/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** **Note: The error dialogs are suppressed in this video lesson. Your VBA Editor will show those dialogs when an error occurs.** ## **Lesson Description** In this lesson, you’ll learn how to debug your **SOLIDWORKS VBA** code efficiently, helping you identify and resolve issues within your macros. Debugging is a crucial skill that enables you to troubleshoot errors, optimize your code, and ensure smooth automation when working with **SOLIDWORKS**. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Debugging VBA Code --- ### [Option Explicit](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/option-explicit/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, you will learn about the **`Option Explicit`** statement in **SOLIDWORKS VBA** and its role in improving code quality, reducing errors, and enhancing debugging. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Option Explicit --- ### [Advanced VBA Error Handling](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/error-handling-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description**: In this lesson, you will learn advanced error handling techniques in **SOLIDWORKS VBA** to manage runtime issues effectively. By understanding and implementing these methods, you can ensure that your macros run smoothly, provide useful feedback, and recover gracefully from errors. ### 1. **Using `On Error` Statements** - **`On Error GoTo`**: Directs the program to a specified line when an error occurs. - **`On Error Resume Next`**: Ignores the error and continues executing the next line of code. ### 2. **Using the `Err` Object for Detailed Error Information** The `Err` object provides properties that give detailed error information, such as: - **Err.Number**: Error code. - **Err.Description**: Description of the error. ### 3. **Raising Custom Errors** Use **`Err.Raise`** to generate custom error codes and messages when specific conditions are met, such as an invalid file path or an object that hasn’t been initialized. ### Best Practices for Error Handling: - **Graceful Recovery**: Ensure your code can continue or fail gracefully when an error occurs. - **Meaningful Error Codes**: Use custom error numbers to provide more clarity and context. - **Logging**: Always log critical errors for future analysis or debugging. By mastering these techniques, you’ll be able to build **SOLIDWORKS VBA** macros that are more robust and resilient to errors. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Advanced VBA Error Handling --- ### [Naming Conventions and Code Comments in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/naming-conventions-and-code-comments-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description** In this lesson, you’ll learn about the importance of **comments** and **naming conventions** in **SOLIDWORKS VBA**. Adopting proper commenting and naming standards improves the readability, maintainability, and collaboration of your code, making it easier to manage as your projects grow in complexity. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Naming Conventions and Code Comments in VBA --- ### [Data Structures in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/data-structures-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description**: In this lesson, you’ll learn about **data structures** in **SOLIDWORKS VBA**, which are essential for organizing and managing large amounts of data within your macros. You’ll explore arrays, collections, and dictionaries, and understand when and how to use them to enhance the efficiency of your **SOLIDWORKS VBA** automation. 1. **Arrays in SOLIDWORKS VBA** - Learn how to declare and work with **arrays**, which store multiple values of the same data type. Arrays are ideal for organizing data such as dimensions, part names, or material properties when automating **SOLIDWORKS** tasks. - Understand how to create one-dimensional and multi-dimensional arrays, and how to access array elements using indices. - Example: Using an array to store the names of parts in an assembly and then loop through the array to perform operations on each part. 2. **Dynamic Arrays** - Discover how to use **dynamic arrays** to create arrays that can change in size during runtime. This is particularly useful when the number of items you need to store isn’t known ahead of time. - Learn how to resize arrays using the `ReDim` and `ReDim Preserve` statements to accommodate new data while preserving existing values. - Example: Automatically resizing an array to store component information as you add or remove parts from an assembly. 3. **Collections in SOLIDWORKS VBA** - Understand how to use **Collections**, which are more flexible than arrays as they allow you to store different data types (objects, numbers, strings) and automatically resize as needed. - Learn how to add, remove, and retrieve items from a collection, and how to loop through collections to manipulate **SOLIDWORKS** objects like components, features, or sketches. - Example: Storing **SOLIDWORKS** parts or features in a collection to automate modifications or property updates. 4. **Dictionaries in SOLIDWORKS VBA** - Learn how to use **Dictionaries** (via `Scripting.Dictionary`), which allow you to store key-value pairs. This structure is ideal when you need to associate specific keys (e.g., part numbers or feature names) with corresponding values (e.g., material properties or dimensions). - Discover how to add, remove, and retrieve items from a dictionary and how to use keys for fast lookups and data manipulation. - Example: Using a dictionary to store and retrieve material properties based on part numbers or names in a **SOLIDWORKS** assembly. 5. **When to Use Each Data Structure** - Learn how to choose between arrays, collections, and dictionaries based on the complexity and requirements of your **SOLIDWORKS VBA** macro. - Example: Use arrays for fixed, simple data; collections for heterogeneous data that may grow dynamically; and dictionaries for associating unique keys with specific values. By the end of this lesson, you’ll be able to effectively use arrays, collections, and dictionaries in **SOLIDWORKS VBA** to manage and manipulate large datasets, making your macros more efficient and scalable. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Data Structures in VBA --- ### [Modules and Classes in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/modules-and-classes-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, you’ll learn about **Modules** and **Classes** in **SOLIDWORKS VBA**, key concepts that help organize and structure your code for better reusability, maintainability, and scalability when automating **SOLIDWORKS** tasks. You’ll explore how to use standard modules, create custom classes, and implement object-oriented principles in **SOLIDWORKS VBA**. 1. **Modules in SOLIDWORKS VBA** - **What is a Module?**: Understand the purpose of a **Module** in **SOLIDWORKS VBA**—a container for your subroutines, functions, and variables. Modules help to organize your code logically, making it easier to manage and maintain. - **Standard Modules**: Learn how to create and use **standard modules** to store general-purpose code that can be called from anywhere within your **SOLIDWORKS VBA** project. 2. **Creating and Using Classes in SOLIDWORKS VBA** - **What is a Class?**: Learn about **Classes**, which allow you to define your own custom objects with properties, methods, and events. Classes enable you to implement **object-oriented programming (OOP)** principles in **SOLIDWORKS VBA**, making your code more modular and reusable. - **Creating a Class**: Discover how to create a custom class in **SOLIDWORKS VBA** using the `Class Module` feature. Learn how to define **properties** (data members) and **methods** (procedures) that will perform specific tasks related to your custom object. - **Instantiating Objects**: Learn how to create instances of your custom class and use them to interact with **SOLIDWORKS** objects or store related data in an organized way. 3. **Using Properties, Methods, in Classes** - **Properties**: Learn how to define **properties** in your class to hold data and how to create **getters** and **setters** to manipulate these properties. Properties allow you to encapsulate data, controlling how it is accessed and modified. - **Methods**: Understand how to define **methods** in your class to perform actions related to the object (e.g., performing calculations, updating **SOLIDWORKS** features, or modifying part properties). 4. **Benefits of Using Modules and Classes** - **Code Reusability**: Learn how to use **modules** and **classes** to reuse code across multiple macros, saving time and reducing the potential for errors. - **Organization and Maintenance**: Discover how organizing your code into distinct modules and custom classes helps keep your **SOLIDWORKS VBA** projects clean and maintainable, especially as they grow in size and complexity. ## **Code Samples:** **Person.vb** (Person class) ``` Private pName As String Private pAge As Integer Public Property Get Name() As String Name = pName End Property Public Property Let Name(value As String) pName = value End Property Public Property Get Age() As Integer Age = pAge End Property Public Property Let Name(value As Integer) pAge = value End Property Public Sub DisplayDetails() Debug.Print pName Debug.Print pAge End Sub ``` **Print person details** ``` Sub RunExample() Dim myPerson As Person Set myPerson = New Person myPerson.DisplayDetails End Sub ``` **car.vb (car class)** ``` Private pMake As String Private pModel As String Public Property Get Make() As String Make = pMake End Property Public Property Let Make(value As String) pMake = value End Property Public Property Get Model() As String Model = pModel End Property Public Property Let Model(value As String) pModel = value End Property ``` **garage.vb (class)** ``` 'Class Module: Garage Private pCars As Collection 'Constructor to initialize the collection Private Sub Class_Initialize() Set pCars = New Collection End Sub 'method to add a car to the garage Public Sub AddCar(car As car) pCars.Add car End Sub 'Method to add a car to the garage Public Sub DisplayCars() Dim car As car For Each car In pCars Debug.Print "Make: " & car.Make & ", Model: " & car.Model Next car End Sub ``` **Final Example** ``` Sub RunExample() Dim car1 As car Dim car2 As car Set car1 = New car car1.Make = "Toyota" car1.Model = "Corolla" Set car2 = New car car2.Make = "Honda" car2.Model = "Civic" Dim myGarage As garage Set myGarage = New garage myGarage.AddCar car1 myGarage.AddCar car2 myGarage.DisplayCars End Sub ``` **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Modules and Classes in VBA --- ### [Variables and Data Types](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/variables-and-data-types/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description** In this lesson, you’ll learn how to declare variables in VBA and explore the different data types available. Understanding how to work with variables and knowing the size of each data type is crucial for efficient memory management and performance optimization. 1. **Declaring Variables in VBA** - Learn how to declare variables using the `Dim` keyword. - Explore the importance of meaningful variable names for better readability and maintenance of your code. 2. **VBA Data Types** - Discover the different data types in VBA, including `Integer`, `Long`, `Single`, `Double`, `String`, `Boolean`, `Variant`, and more. - Learn when to use each data type based on the kind of data you need to store (e.g., numbers, text, logical values). 3. **Size and Memory of Data Types** - Understand the size (in bytes) of each data type, and how this affects memory usage and performance. For example: - `Integer` (2 bytes) - `Long` (4 bytes) - `Single` (4 bytes) - `Double` (8 bytes) - `String` (depends on length) - `Variant` (16 bytes) - Learn how to choose the right data type for your variables to avoid unnecessary memory usage and improve the efficiency of your code. By the end of this lesson, you’ll have a solid understanding of how to declare and use variables effectively in VBA, as well as how to choose the most appropriate data type based on your needs. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** VBA Variables and Data Types --- ### [Subroutines and Functions in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/subroutines-and-functions-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description** In this lesson, you’ll learn how to create and use **Subroutines** and **Functions** in **SOLIDWORKS VBA** to organize and modularize your code. These building blocks are essential for making your macros more efficient, reusable, and easier to maintain. 1. **Subroutines in SOLIDWORKS VBA** - Understand the purpose of a **Subroutine** (`Sub`) in **SOLIDWORKS VBA**: a block of code that performs a specific task without returning a value. - Learn how to declare and call subroutines in your **SOLIDWORKS VBA** macros to break your code into manageable sections. - Example: Automating the creation of a specific part feature or updating the properties of a component in an assembly. 2. **Functions in SOLIDWORKS VBA** - Learn the role of a **Function** in **SOLIDWORKS VBA**, which returns a value after performing an operation. - Explore how to declare and call functions to simplify your code and allow for calculations or checks that produce output (e.g., returning the surface area of a part or checking if a certain feature exists). - Example: Writing a function to calculate the volume of a part or to return the name of the active document. 3. **Passing Arguments to Subroutines and Functions** - Discover how to pass **arguments** (parameters) to both subroutines and functions to make your code more flexible and reusable. - Learn how to use **ByVal** (passing a copy of the value) and **ByRef** (passing a reference to the original value) to control how variables are passed between your main macro and your subroutines or functions. - Example: Passing a part name to a function to check if that part is present in an assembly or passing an array of part dimensions to a subroutine for batch modification. 4. **Returning Values from Functions** - Understand how to return values from functions to be used later in your macro. - Learn how to handle the returned value and use it in subsequent code (e.g., storing the returned value in a variable or using it directly in a decision-making process). - Example: Using a function that calculates the total weight of an assembly based on the parts’ material properties and dimensions. By the end of this lesson, you’ll have a strong understanding of how to use **Subroutines** and **Functions** in **SOLIDWORKS VBA** to modularize your code, pass data between procedures, and return useful information to improve the efficiency and flexibility of your macros. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Subroutines and Functions in VBA --- ### [Control Structures](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/control-structures/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, you’ll learn how to use control structures in SOLIDWORKS VBA to control the flow of your macros. These structures are essential for decision-making, looping, and repeating tasks based on conditions, helping you create dynamic and flexible SOLIDWORKS automation. 1. **If…Then…Else Statements** - Learn how to use `If`, `ElseIf`, and `Else` to perform conditional checks and execute different blocks of code based on certain criteria. - Discover how to combine multiple conditions using logical operators (`And`, `Or`, `Not`) to create more complex decision-making logic. - Example: Automate actions in SOLIDWORKS depending on part properties or assembly conditions (e.g., checking if a part exists or if a certain feature is present). 2. **Select Case Statements** - Understand how the `Select Case` statement can simplify multiple conditional checks, making your code more readable and organized. - Learn how to apply `Select Case` when dealing with multiple possible values or conditions in your SOLIDWORKS automation tasks. - Example: Perform different actions based on the type of SOLIDWORKS document (part, assembly, or drawing). 3. **For, For Each, and While Loops** - Learn how to use loops such as `For`, `For Each`, and `While` to iterate through collections of SOLIDWORKS objects (e.g., looping through components in an assembly or features in a part). - Understand when and how to use each type of loop for efficient and effective iteration, ensuring your code is both compact and clear. - Example: Automate repetitive actions, like changing properties of all parts in an assembly. 4. **Do While and Do Until Loops** - Explore `Do While` and `Do Until` loops for situations where you need to perform actions until a certain condition is met. - Learn how to control the flow of your macro by looping through SOLIDWORKS documents, features, or faces until a specific condition is satisfied. ## **Correction:** ``` Dim Counter as integer counter = 1 ``` Missing er at the end of count. This should not affect the flow of the lesson. If a variable is not defined, VBA will define it implicitly set the default value (which 0 in this case). **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Control Structures in VBA --- ### [Advanced Selection with SelectById2](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/advanced-selection-with-selectbyid2/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to use the **SelectByID2** method in **SOLIDWORKS** with **VBA** (Visual Basic for Applications) to select entities within a part or assembly document. This method provides a way to select objects like faces, edges, components, features, and other entities by their unique identifiers, making it an efficient way to automate selection in a model. The **SelectByID2** method allows you to select model entities by their **ID**, which can be an entity’s name, type, or unique identifier. This method is used to select faces, edges, components, or features programmatically, enabling you to automate interaction with specific parts of your model. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Advanced Selection with SelectById2 --- ### [Configuration Management (IConfigurationManager)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/configuration-management-iconfigurationmanager/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: In this lesson, you will learn about **Configuration Management** in **SOLIDWORKS** and how to use the **SOLIDWORKS API** with **VBA** to automate configuration tasks. Configurations allow you to create multiple variations of a part or assembly within a single document, making it easy to manage different sizes, features, or assembly setups without needing separate files. ### Key Concepts: 1. **What are Configurations?** **Configurations** in SOLIDWORKS allow a single part or assembly document to have multiple variations. Each configuration can have different dimensions, features, or components that are suppressed or unsuppressed. 2. **Configuration Access through VBA** You can programmatically interact with configurations using the **IConfigurationManager** and **IConfiguration** interfaces. These interfaces allow you to access, modify, and create configurations in a part or assembly document. 3. **Creating and Managing Configurations** You can create new configurations, suppress or unsuppress features, and change parameters such as dimensions or material properties across different configurations, all from within the same document. 4. **Switching Between Configurations** Through the API, you can switch between configurations, either manually or automatically, to reflect the changes in the model. This is useful for automated tasks that require working with different configurations. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Configuration Management (IConfigurationManager) --- ### [Selection Basics (ISelectionMgr)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/selection-basics-iselectionmgr/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### L**esson Description:** In this lesson, you will learn about the **Selection Manager** in **SOLIDWORKS** and how to use it with **VBA** (Visual Basic for Applications) to interact with models. The **Selection Manager** allows you to programmatically select entities like faces, edges, components, or sketches within SOLIDWORKS, providing a powerful way to automate selections and streamline your workflow. ### Key Concepts: 1. **What is the Selection Manager?** The **Selection Manager** is a feature in the SOLIDWORKS API that allows you to select specific entities in a model, such as parts, faces, edges, or features, during automation tasks. It can also handle multiple selections simultaneously. 2. **Accessing the Selection Manager** The **Selection Manager** is accessed via the **IModelDoc2** interface, allowing you to add or manipulate selections in a document programmatically. 3. **Selecting Entities** With the Selection Manager, you can select various model entities, including: - **Faces**: Planes or surfaces of parts or assemblies. - **Edges**: The boundaries of faces. - **Components**: Individual parts or sub-assemblies in an assembly. - **Sketches**: Entities within a sketch (lines, circles, etc.). 4. **Clearing Selections** You can clear selections using the **ClearSelection2** method, which removes any existing selections from the model before making new ones. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Selection Basics (ISelectionMgr) --- ### [Traversing the Feature Tree in SOLIDWORKS (Design Tree)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/traversing-the-feature-tree-in-solidworks-design-tree/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** In this lesson, you will learn how to programmatically navigate the **Feature Tree** (Design Tree) in **SOLIDWORKS** using the **SOLIDWORKS API**. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Traversing the Feature Tree in SOLIDWORKS (Design Tree) --- ### [Managing Custom Properties in VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/managing-custom-properties-in-vba/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to **manage custom properties** in **SOLIDWORKS** using **VBA (Visual Basic for Applications)**. Custom properties are essential for storing metadata in SOLIDWORKS documents, such as part numbers, descriptions, materials, or revisions. Automating the management of custom properties can enhance productivity, improve consistency, and streamline workflows, particularly in large projects or when handling multiple documents. ### 1. **What are Custom Properties in SOLIDWORKS?** **Custom properties** are user-defined attributes that can be assigned to SOLIDWORKS documents (parts, assemblies, or drawings). These properties are often used for tracking project-specific data like part numbers, descriptions, material types, revision numbers, and more. They can also be used to automate tasks such as generating BOMs (Bill of Materials) or integrating with external systems. Custom properties are available at the document level, and can also be specific to different configurations within parts and assemblies. By managing these properties programmatically, you can automate data entry, keep metadata consistent, and ensure that important document information is always up to date. ### 2. **Accessing Custom Properties** In VBA, you can interact with custom properties through the **CustomPropertyManager**. This manager allows you to retrieve, set, and delete custom properties for a given document. The **CustomPropertyManager** is accessed via the **ModelDoc2** object, which represents the currently open SOLIDWORKS document (e.g., part, assembly, or drawing). ### 3. **Getting Custom Properties** You can retrieve custom properties for a document by querying the **CustomPropertyManager**. This allows you to extract the value of a custom property by its name, enabling you to access important information such as material, part number, and description. ### 4. **Setting Custom Properties** The **CustomPropertyManager** also allows you to set or modify custom properties for a document. You can add new properties or update existing ones with relevant information such as part revisions, material specifications, or custom metadata related to your designs. These custom properties are stored within the document and can be accessed later, whether for reporting, BOM generation, or integration with other systems. ### 5. **Deleting Custom Properties** If a custom property is no longer needed or should be removed from a document, it can be deleted using the **CustomPropertyManager**. This ensures that outdated or incorrect information is not included in your documents. ### 6. **Managing Custom Properties for Configurations** SOLIDWORKS allows custom properties to be configuration-specific, meaning that different configurations of the same part or assembly can have different values for the same custom property. This is particularly useful for managing variations of a part or assembly that have distinct characteristics or attributes based on their configuration. When managing configuration-specific properties, you will reference the specific configuration within the document to retrieve or set the desired custom property. ### 7. **Best Practices for Managing Custom Properties** - **Standardize Naming Conventions**: To avoid confusion and ensure consistency across your designs, establish standardized names for custom properties (e.g., “Part Number”, “Material”, “Revision”). - **Automate Property Updates**: Automate the process of updating custom properties, particularly when working with large numbers of files or configurations. This can help maintain consistency and save time. - **Leverage Templates**: Use templates with pre-defined custom properties to streamline document creation and ensure that important metadata is always included. - **Use for Integration**: Custom properties can be used to integrate with other systems, such as ERP (Enterprise Resource Planning) software. By automating the updating and retrieval of these properties, you can sync your SOLIDWORKS documents with other business systems. - **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Managing Custom Properties in VBA --- ### [System Options and document settings in SOLIDWORKS](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/system-options-and-document-settings-in-solidworks/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to access and modify **System Options** and **Document Properties** using the **SOLIDWORKS API**. These settings control key aspects of how **SOLIDWORKS** behaves, both globally (system-wide) and for individual documents, making them essential for customizing and automating your workflow. ### 1. **System Options in SOLIDWORKS API** **System Options** in SOLIDWORKS define global preferences that affect how the application behaves across all documents. These settings can be customized to control how the software works, from user interface preferences to performance-related settings. ### 2. **Document Properties in SOLIDWORKS API** **Document Properties** define the settings for an individual document (part, assembly, or drawing). These properties control a wide range of behaviors and appearance settings specific to that document to streamline your workflow and enforce consistency across your documents and system configurations. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** System Options and document settings in SOLIDWORKS --- ### [Document Management](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/document-management/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to open and close documents in **SOLIDWORKS** programmatically using the **SOLIDWORKS API**. Understanding how to manage documents via the API is essential for automating tasks, such as batch processing, updating models, or controlling the user interface in a custom environment. ### 1. **Opening Documents in SOLIDWORKS** The **SOLIDWORKS API** allows you to open different types of documents, including parts, assemblies, and drawings. Using the **ISldWorks** object, you can open these documents automatically in SOLIDWORKS, perform operations on them, and then save or close them as needed. - **Open a Part, Assembly, or Drawing**: You can open any SOLIDWORKS document by specifying its file path. - **Methods for Opening Documents**: - The `OpenDoc6` method is commonly used to open SOLIDWORKS documents, and it allows you to specify the document type (Part, Assembly, or Drawing). - The method also accepts options such as whether to suppress features, open read-only, or open a specific configuration of an assembly. ### 2. **Using the OpenDoc6 Method** The `OpenDoc6` method is the most commonly used API call to open documents in **SOLIDWORKS**. It provides a way to automate opening files with specific parameters. - **Syntax**: - `OpenDoc6(FileName As String, DocType As Integer, Options As Long, Configuration As String, ConfigurationVariant As String, Errors As Long) As ModelDoc2` Where: - `FileName` is the path to the document. - `DocType` defines the type of document (e.g., part, assembly, or drawing). - `Options` specifies additional options (e.g., read-only mode). - `Configuration` and `ConfigurationVariant` allow you to specify which configuration of an assembly to open. - `Errors` returns any errors during the opening process. This method will return a `ModelDoc2` object, which you can use to interact with the opened document (e.g., modifying the model, creating features, etc.). ### 3. **Closing Documents in SOLIDWORKS** The **SOLIDWORKS API** provides the ability to close documents once operations are complete. You can close documents either programmatically or by prompting the user to confirm whether they want to save the changes. - **Close a Document**: - The `CloseDoc` method is used to close a document. You can pass the file name or the `ModelDoc2` object representing the open document to this method. Before closing a document, you can choose to save it or discard changes, depending on the status of the document. **Common Syntax**: - `CloseDoc(Document As ModelDoc2) As Boolean` This method will close the active document and return `True` if it is closed successfully. - **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Document Management --- ### [SldWorks Interface](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/sldworks-interface/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** # **Lesson Description:** In this lesson, we will delve into the **SOLIDWORKS interface** and understand its role as the top-level object in the **SOLIDWORKS API**. The interface provides the essential bridge for interacting with all aspects of the software, and understanding its structure is key to harnessing the full potential of the API. ### 1. **What is the SOLIDWORKS Interface?** The **SOLIDWORKS interface** refers to the graphical user interface (GUI) that users interact with while working in SOLIDWORKS. It includes menus, toolbars, workspaces, and other visual components, providing users access to various SOLIDWORKS tools and functionalities. From an API perspective, the **SOLIDWORKS interface** is also represented by the top-level object that serves as the entry point for all programmatic interactions with the software. This object, known as the **ISldWorks** interface in the API, acts as the central controller for initiating and managing the SOLIDWORKS application and its components. ### 2. **The ISldWorks Object in the API** The **ISldWorks** object is the central object that all other SOLIDWORKS API objects and commands are built around. It represents the SOLIDWORKS application itself and allows developers to access and control various parts of SOLIDWORKS programmatically ### 3. **Hierarchical Structure of the SOLIDWORKS API** - The **ISldWorks** object is **at the top of the API hierarchy**. Other important objects that are part of the **SOLIDWORKS application** are accessible through it, including: - **Documents**: Parts, assemblies, and drawings. - **System Settings**: Provides access to SOLIDWORKS system settings and preferences. By calling methods on the **ISldWorks** object, you can retrieve or manipulate these objects, enabling the automation of tasks like creating parts, assembling models, modifying features, and generating drawings. ### 5. **Working with the ISldWorks Object in Automation** - As the **top-level object**, **ISldWorks** is used to begin an interaction with **SOLIDWORKS** in VBA or other programming environments. You typically create an instance of this object to start automating tasks in SOLIDWORKS, such as: - **Creating a new part or assembly**. - **Opening an existing document**. - **Saving documents automatically**. - **Managing system settings**. This object allows you to harness the full power of SOLIDWORKS programmatically, making it essential for any **API-based** automation task. ### 6. **Accessing the ISldWorks Object** When working with **SOLIDWORKS VBA**, the **ISldWorks** object can be accessed after initializing SOLIDWORKS in your macro. It acts as the entry point for accessing all other parts of the software, providing the foundation for automation. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** SldWorks Interface --- ### [Sketching: How to create a sketch and make extrude features](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/sketching-how-to-create-a-sketch-and-make-extrude-features/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to **sketch** and create **extrude cuts** in **SOLIDWORKS** using the **SOLIDWORKS API** and **VBA** (Visual Basic for Applications). **Sketching** is the foundation for many features in SOLIDWORKS, and the **extrude cut** is one of the most common ways to remove material from a part. Understanding how to automate these processes using the API can significantly speed up your design workflow and allow you to integrate cuts and sketches into automated design scripts. ### Key Concepts: 1. **What is Sketching in SOLIDWORKS?** A **sketch** in SOLIDWORKS is a 2D geometry used to define the boundaries of features such as extrusions, cuts, or revolved shapes. Sketches are typically drawn on **planes** or **faces**, and consist of lines, arcs, circles, and other entities. 2. **Creating Sketches Programmatically** To create a sketch, you first need to access the **SketchManager** interface, which allows you to create and manage sketches. In the SOLIDWORKS API, you can: - **Activate a Plane**: Set a plane or face where the sketch will be created. - **Start a Sketch**: Use the `CreateSketch` method to begin sketching. - **Add Sketch Entities**: Add lines, arcs, circles, and other geometry to the sketch using the **SketchSegment** methods. 3. **What is an Extrude Cut?** An **extrude cut** is a feature used to remove material from a part. It is created by defining a 2D sketch on a plane and then extruding it in a negative direction to cut through the part. The **Extrude Cut** feature is one of the most common ways to create holes, slots, or other types of cutouts in a part. 4. **Creating Extrude Cuts Programmatically** Using the SOLIDWORKS API, you can create **extrude cuts** by following these steps: - **Create a Sketch**: Start by creating the sketch that defines the cut (e.g., a circle or rectangle). - **Extrude the Cut**: Once the sketch is created, use the **FeatureManager** to create the extrude cut feature. - **Set Parameters**: You can specify parameters such as the depth of the cut, the direction (normal or reverse), and other properties of the cut. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Sketching: How to create a sketch and make extrude features --- ### [Managing Features via suppression](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/managing-features-via-suppression/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description** In this lesson, you will learn how to **suppress** and **unsuppress** features in **SOLIDWORKS** using the **SOLIDWORKS API** and **VBA** (Visual Basic for Applications). Suppression is a powerful tool in SOLIDWORKS that allows you to temporarily hide or disable features without deleting them, making it useful for managing design variations, reducing model complexity, or testing different design configurations. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Managing Features via suppression --- ### [Reference Geometry](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/reference-geometry/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to work with **reference geometry** like **planes**, **axes**, **points**, and **coordinate systems** in the **SOLIDWORKS API** using **VBA** (Visual Basic for Applications). Reference geometry plays a crucial role in defining a part’s design space, and understanding how to programmatically interact with it allows you to automate tasks such as creating new features, controlling part positioning, and building complex geometry. ### **What is Reference Geometry in SOLIDWORKS?** **Reference geometry** is geometry used as a foundation for creating other features and parts. It includes: - **Planes**: 2D surfaces used to define a reference for sketching, features, or patterns. - **Axes**: Lines used to define rotational symmetry or reference points in the design. - **Points**: Specific locations in 3D space used to define positions or guide feature creation. - **Coordinate Systems**: Define the orientation of a part or assembly, used in positioning and mating. 1. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Reference Geometry --- ### [Traversing geometrical entities (IEntity, IEdge, IVertex, Face2)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/traversing-geometrical-entities-ientity-iedge-ivertex-face2/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to **traverse bodies**, **edges**, **faces**, and **vertices** in **SOLIDWORKS** using the **SOLIDWORKS API** and **VBA** (Visual Basic for Applications). By navigating these geometric entities, you can automate tasks such as analyzing, modifying, or extracting detailed information about a part or assembly’s geometry. Traversing these components is a key skill when automating design changes, conducting geometric analysis, or creating complex features. ### Key Concepts: 1. **What are Bodies, Edges, Faces, and Vertices?** - **Bodies**: The solid or surface volumes of a part or assembly. - **Edges**: The boundaries of faces in a model. An edge is a curve where two faces meet. - **Faces**: Flat or curved surfaces that make up the exterior of a part or assembly. - **Vertices**: Points where two or more edges meet, typically representing corners or intersections in a 3D space. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Face2), IEdge, IVertex, Traversing geometrical entities (IEntity --- ### [The IEntity Interface](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/the-ientity-interface/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how about the **edges**, **faces**, and **vertices** in **SOLIDWORKS** using the **SOLIDWORKS API** and **VBA** (Visual Basic for Applications). ## **Code:** ``` dim swApp as SldWorks.SldWorks dim Part as SldWorks.PartDoc dim Face as SldWorks.Face2 dim Model as SldWorks.ModelDoc2 dim SelMgr as SldWorks.SelectionMgr dim Entity as SldWorks.Entity dim faceName as String dim ret As Boolean ``` **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** The IEntity Interface --- ### [Working with Bodies (IBody2 amd IPartDoc)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/working-with-bodies-ibody2-amd-ipartdoc/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to work with **bodies** in the **SOLIDWORKS API** using **VBA** (Visual Basic for Applications). A body in SOLIDWORKS represents a distinct physical shape or volume within a part or assembly, which can be used to define solid features, surfaces, or components. Understanding how to access and manipulate bodies is essential for automating tasks related to part creation, modification, and analysis. ### Key Concepts: 1. **What is a Body in SOLIDWORKS?** A **body** in SOLIDWORKS refers to a part or component’s solid or surface geometry. Bodies can be of various types, including: - **Solid Bodies**: Represent the physical volume of a part. - **Surface Bodies**: Represent the surface of a part, often used for complex or sheet-metal designs. - **Multi-body Parts**: A part that contains multiple bodies, each of which can be treated individually or as a combined feature. 2. **Accessing Bodies in SOLIDWORKS API** You can access bodies using the **PartDoc** interface. By calling functions such as `GetBodies`, you can retrieve all the bodies within a part document. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Working with Bodies (IBody2 amd IPartDoc) --- ### [Document Creation with Templates](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/document-creation-with-templates/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description**: In this lesson, you will learn how to **create documents** in **SOLIDWORKS** using **templates** through **VBA** (Visual Basic for Applications). Templates in SOLIDWORKS are pre-defined files that store settings such as document properties, units, material properties, and custom templates for parts, assemblies, and drawings. By automating document creation with templates, you can ensure consistency across designs and speed up the modeling process. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Document Creation with Templates --- ### [Mating Components (IMate)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/mating-components-imate/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: In this lesson, students will learn how to **create mates** programmatically in SolidWorks using the **API**. The lesson covers how to apply various mate types (such as **Coincident**, **Distance**, and **Concentric**) between components in an assembly. Using methods like `AddMate` and `IMate2`, students will automate the mate creation process, improving efficiency when working with large assemblies and enabling precise control over component positioning. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Mating Components (IMate) --- ### [Advanced selection techniques for creating mates](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/advanced-selection-techniques-for-creating-mates/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: This lesson is about selecting entities in the context of an assembly in preparation for adding mates. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Advanced selection techniques for creating mates --- ### [Inserting Components into an Assembly](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/inserting-components-into-an-assembly/) **Published:** December 11, 2024 **Author:** Amen Jlili **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Inserting Components into an Assembly --- ### [Component Referenced Configuration](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/component-referenced-configuration/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** Learn how to change a **component configuration** in **SOLIDWORKS** using the **SOLIDWORKS API** with **VBA**. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Component Referenced Configuration --- ### [Traversing an assembly component tree](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/traversing-an-assembly-component-tree/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ### **Lesson Description:** In this lesson, you will learn how to **traverse the assembly component tree** in **SOLIDWORKS** using the **SOLIDWORKS API** and **VBA** (Visual Basic for Applications). The component tree represents the hierarchy of parts and subassemblies within an assembly, allowing you to access individual components, their properties, and their relationships. Traversing this tree programmatically enables automation tasks like analyzing, modifying, or extracting data about assembly components. ### Key Concepts: 1. **What is the Assembly Component Tree?** The **component tree** in SOLIDWORKS refers to the hierarchical structure that organizes components in an assembly. It lists all the parts, subassemblies, and mates involved in the assembly. The tree is visually represented in the **FeatureManager Design Tree** and forms the backbone of an assembly’s structure. 2. **Accessing the Assembly Document** To traverse the component tree, you must first access the **Assembly Document**. The `IAssemblyDoc` interface is used to interact with assemblies and their components. ## Code: ``` Private Sub LogComponentName(ByVal swComponent As Component2) Dim parentCount As Long Dim swParentComponent As Component2 Set swParentComponent = swComponent.GetParent() While Not swParentComponent Is Nothing parentCount = parentCount + 1 Set swParentComponent = swParentComponent.GetParent() Wend Dim indentation As String indentation = Replicate(" ", parentCount) Debug.Print indentation & Split(swComponent.GetPathName(), "\")(UBound(Split(swComponent.GetPathName(), "\"))) End Sub Public Function Replicate(RepeatString As String, ByVal NumOfTimes As Long) If NumOfTimes = 0 Then Replicate = "" Exit Function End If Dim s As String Dim c As Long Dim l As Long Dim i As Long l = Len(RepeatString) c = l * NumOfTimes s = Space$(c) For i = 1 To c Step l Mid(s, i, l) = RepeatString Next Replicate = s End Function ``` **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Traversing an assembly component tree --- ### [Drawing Annotations](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/drawing-annotations/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, students will learn how to **traverse drawing annotations** in SOLIDWORKS using the **API**. The lesson covers how to access, extract, and modify various types of annotations, including **dimensions**, **notes**, and **symbols**. Students will explore methods for iterating through annotations. ## Code: ``` Public Function EnumToString(ByVal enumValue As Long) As String Select Case enumValue Case 12: EnumToString = "swBlock" Case 15: EnumToString = "swCenterLine" Case 13: EnumToString = "swCenterMarkSym" Case 1: EnumToString = "swCThread" Case 9: EnumToString = "swCustomSymbol" Case 16: EnumToString = "swDatumOrigin" Case 2: EnumToString = "swDatumTag" Case 3: EnumToString = "swDatumTargetSym" Case 4: EnumToString = "swDisplayDimension" Case 10: EnumToString = "swDowelSym" Case 5: EnumToString = "swGTol" Case 11: EnumToString = "swLeader" Case 6: EnumToString = "swNote" Case 19: EnumToString = "swPMIOnly" Case 18: EnumToString = "swRevisionCloud" Case 7: EnumToString = "swSFSymbol" Case 14: EnumToString = "swTableAnnotation" Case 17: EnumToString = "swWeldBeadSymbol" Case 8: EnumToString = "swWeldSymbol" Case Else: EnumToString = "Unknown" End Select End Function ``` **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Drawing Annotations --- ### [Creating A Bill Of Materials](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/creating-a-bill-of-materials/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: This lesson teaches students how to automate the creation of a **Bill of Materials (BOM)** in SolidWorks using the **API**. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Creating A Bill Of Materials --- ### [Creating Drawing Documents with Pre-defined Views](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/creating-drawing-documents-with-pre-defined-views/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, students will learn how to automate the process of creating **drawing documents** in SolidWorks using the **API**. The lesson will cover generating drawing sheets from 3D models, inserting predefined standard. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Creating Drawing Documents with Pre-defined Views --- ### [Project: Assembly DXF Exporter](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/assembly-dxf-exporter/) **Published:** December 25, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description:** In this lesson, students will learn how to create a **DXF exporter** using the **SolidWorks API** to export assembly sheet metal parts as **flat patterns** into the DXF file format. The lesson covers how to extract sheet metal parts from an assembly, generate their 2D flat patterns, and export them to a DXF file. Students will explore how to automate the entire process, and how to configure the DXF output for use in manufacturing or CNC machines. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Assembly DXF Exporter --- ### [Writing Your First VBA Macro](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/writing-your-first-vba-macro/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: Learn how to display the message “Hello VBA” in SolidWorks using three different methods: 1. **Immediate Window with `Debug.Print`:** Understand how to use the Immediate Window and the `Debug.Print` statement for quick debugging and output. 2. **Message Box with `swApp.SendMsgToUser`:** Learn to display a user-friendly message box using the `swApp.SendMsgToUser` method. 3. **VBA `MsgBox` Function:** Explore the standard VBA `MsgBox` function for creating more versatile and customizable message boxes. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Hello World, Writing your first VBA Macro --- ### [Navigating The Visual Basic Editor (VBE)](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/navigating-the-vba-macro/) **Published:** December 11, 2024 **Author:** Amen Jlili **Content:** ## **Lesson Description** In this lesson, we’ll guide you through the **Visual Basic for Applications (VBA) Editor** interface, helping you understand how to navigate its various features in **SOLIDWORKS 3D**. 1. **Understanding the Workspace** - **VBA Editor Overview**: Introduction to the main components of the VBA editor interface, including the **Project Explorer**, **Properties Window**, **Code Window**, and **Immediate Window**. - **Project Explorer**: Learn how to access and manage the objects in your workbook or document, including modules, forms, and references. - **Code Window**: Understand how to write, edit, and debug your VBA code, including navigation tips for moving through your code and finding specific lines or sections. - **Immediate Window**: Explore how to use the Immediate Window to execute commands, check values, and test parts of your code quickly during debugging. 2. **Customizing the VBA Editor** - **Toolbar Customization**: Discover how to customize your toolbar by adding or removing buttons for faster access to frequently used tools or commands. - **Preferences and Settings**: Explore the VBA Editor’s settings and preferences, such as adjusting the font size, choosing color schemes, and enabling or disabling specific editor features. By the end of this lesson, you will have a thorough understanding of how to navigate the VBA editor, customize its interface for your workflow, and make your development environment as productive as possible. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Navigating The Visual Basic Editor (VBE) --- ### [Introduction to SOLIDWORKS API and VBA](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/introduction/) **Published:** December 7, 2024 **Author:** Amen Jlili **Content:** ## Lesson Description: This is the first lesson of “Mastering SOLIDWORKS API: Automate Your Workflow with VBA.” I’m [**Amen Jlili**](https://www.linkedin.com/in/jliliamen/), an API developer at Blue Byte Systems, and I’m thrilled to have you join this learning journey. This course is a culmination of years of experience and countless trials, and we’re grateful you’ve chosen to learn with us. **Who is this course for?** - **Industry Professionals:** CAD Designers, Drafters, PDM Administrators – This course will help you automate tedious tasks and streamline your workflows. - **STEM Students:** Gain valuable skills that will give you an edge in internships and job applications. - **Software Developers:** Learn to integrate SOLIDWORKS into third-party products and create customized solutions. **Prerequisites** - **Computer:** Running Windows 7, 8, 10, or 11. (Older systems may have limited compatibility) - **SOLIDWORKS:** 3D Desktop (Student, Standard, Professional, or Premium editions) or SOLIDWORKS Connected. - **VBA:** Ensure the VBA component is installed with your SOLIDWORKS version. **What is an API?** API stands for **Application Programming Interface**. It’s a set of tools, definitions, and protocols that allow different software applications to communicate and interact. **Analogy:** Imagine you’re at a restaurant. You (the developer) want to order food (from SOLIDWORKS). You don’t go directly to the kitchen. Instead, you use the waiter (the API) to convey your order to the kitchen, and the waiter brings you the food. - **You:** The developer. - **Waiter:** The API. - **Kitchen:** SOLIDWORKS. The API acts as an intermediary, translating your requests into actions that SOLIDWORKS can understand and returning the results to you. **Why use VBA for SOLIDWORKS API?** - **Built-in:** Included with SOLIDWORKS – no extra installation needed. - **Beginner-friendly:** Simple syntax, easy to learn. - **Seamless Integration:** Works directly with SOLIDWORKS for efficient automation. - **Ideal for quick automation tasks.** **In the next lesson, we’ll dive deeper and start exploring the SOLIDWORKS API using VBA.** **Make sure you have SOLIDWORKS open and ready to follow along!** This lesson provides a concise and informative overview of the course, its target audience, prerequisites, and a clear explanation of the SOLIDWORKS API using a relatable restaurant analogy. It effectively sets the stage for the subsequent lessons. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Introduction --- ### [VBA Macro Recorder](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/lessons/vba-macro-recorder/) **Published:** December 7, 2024 **Author:** Amen Jlili **Content:** This lesson will guide you through automating repetitive tasks within SOLIDWORKS using macros. You’ll learn how to: - **Record Macros:** Capture a series of actions performed in SOLIDWORKS and save them as a macro. This allows you to replay those actions automatically. - **Edit Macros:** Modify and customize recorded macros to suit your specific needs. This includes adding conditional statements, loops, and other programming logic. - **Create Custom Buttons:** Integrate your macros into the SOLIDWORKS user interface by creating custom buttons. This provides quick and easy access to your automated workflows. - **Customize Button Appearance:** Choose an icon for your custom button and assign tooltips for easy identification. - **Organize Macros:** Learn best practices for organizing and managing your macros for efficient workflow. **Lesson Categories:** SOLIDWORKSAPI **Lesson Tags:** Recorder, SOLIDWORKS VBA Macro --- ### [WIN 32 API](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/win-32-api/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we explore how to use **Win32 API** calls to extend the capabilities of your macros. Sometimes, the SOLIDWORKS or PDM API doesn’t have the specific command you need like maximizing a window and that is where the Windows operating system libraries come in to bridge the gap. **Key Takeaways:** - **Beyond the Host:** Use **Win32 APIs** to perform tasks not supported by **SOLIDWORKS or Office.** - **Window Handles (hWnd):** Every window has a unique ID used by Windows to identify it. - **PTRSafe Declarations:** Use Declare **PtrSafe** to ensure your API calls work on **64-bit systems.** - **External Libraries:** Access professional-grade functions from system files like **user32.dll.** - **ShowWindow Function:** Use this specific API to control window states like **Maximize or Minimize.** - **LongPtr Type:** Always use **LongPtr** for handles to stay compatible with modern hardware. --- ### [Error Handling](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/error-handling/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we explore **Error Handling,** a critical skill for building professional macros that don’t crash when they encounter the unexpected. Since bugs are an inevitable part of development, learning how to “catch” them ensures your tools remain reliable and user-friendly. **Key Takeaways:** - **Runtime Errors:** These occur during execution (e.g., division by zero) and stop your code unless handled. - **On Error GoTo:** Redirects the code to a specific “Handler” section when a bug occurs. - **The Err Object:** Use **Err.Number** and **Err.Description** to identify and explain the specific problem. - **Exit Sub:** Always place **Exit Sub** before your error handler to prevent it from running during normal execution. - **On Error Resume Next:** Tells VBA to ignore the error and immediately move to the very next line of code. - **Clean Up:** Use error handlers to ensure your macro closes files or turns settings back on even if it crashes. --- ### [VBA String](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/vba-string/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we explore **String Manipulation,** one of the most essential skills for VBA automation. Whether you are parsing file paths, cleaning user input, or generating reports, these functions allow you to slice, dice, and transform text with precision. **Key Takeaways:** - **Space Cleaning:** Use **Trim** to remove all leading and trailing spaces. - **Casing Control:** Use **UCase** for UPPERCASE and **LCase** for lowercase. - **Extraction (Start/End): Left** grabs characters from the start; **Right** from the end. - **Middle Extraction: Mid** pulls a substring starting from a specific position. - **Finding Text: InStr** finds a string’s position; returns 0 if not found. - **Reverse Search: InStrRev** searches from the end (perfect for file extensions). - **Search and Replace: Replace** swaps specific characters or words within a string. - **Arrays to Strings: Split** breaks text into an array; **Join** puts it back. --- ### [UserForms](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/userforms/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we build a fully functional calculator using **VBA UserForms.** This project is a great way to learn how to **design a User Interface (UI)** and connect those visual elements to the underlying logic (the “Code Behind”) to create interactive automation tools. **Key Takeaways:** - **UserForm Creation:** Insert a UserForm to build custom interactive windows. - **UI Controls:** Use the Toolbox to add **TextBoxes** and **CommandButtons.** - **Naming Conventions:** Rename controls (e.g., txtDisplay) for easier coding later. - **Event Handlers:** Write code that triggers when a user clicks a button. - **Initialize Event:** Set default values (like “0”) when the form opens. - **Shared Subroutines:** Use one “DigitPressed” routine to handle all number inputs. - **Mathematical Logic:** Use Select Case to manage operations like plus and minus. - **Data Conversion:** Convert Text (String) to numbers (Double) using **CDbl.** --- ### [Class Modules](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/class-modules/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we show you why **Class Modules** are much better than Arrays for storing your data. While arrays are okay for simple lists, they quickly become a mess when you try to store complex information. We will take a messy array example and refactor it into a **professional, organized class structure.** **Key Takeaways:** - **Data Structure:** Group related variables into organized, named objects instead of arrays. - **State vs. Behavior:** Define what an object is **(properties)** and what it does **(methods).** - **Dynamic Collections:** Use Collections to easily store, add, and loop through objects. - **Code Readability:** Use descriptive names like **Car.Model** to make code self-documenting. - **Reliable Refactoring:** Improve existing scripts by transforming them into **professional, scalable projects.** --- ### [Data Structures](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/data-structures/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we explore how to store and manage groups of information using **Data Structures.** We compare the three most common ways to hold data in VBA **Arrays, Collections, and Dictionaries** so you can choose the right tool for your specific automation task. **Key Takeaways:** - **Fixed Arrays:** Store a set number of items using specific index positions. - **Dynamic Arrays:** Change size during code execution using the **ReDim** keyword. - **Preserve Data:** Use **ReDim Preserve** to keep existing data when resizing. - **VBA Collections:** Store items flexibly without needing to manually resize them. - **One-Based Indexing:** Remember that Collections start counting at 1, not 0. - **Scripting Dictionaries:** Prevent duplicate entries by using unique “Keys” for data. - **Fast Retrieval:** Use Dictionaries for high-speed searching in large data sets. - **Early Binding:** Reference “Microsoft Scripting Runtime” for better coding support **(IntelliSense).** --- ### [Subroutines and functions](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/subroutines-and-functions/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** **Modular code** is the key to professional automation. By breaking your **SOLIDWORKS macros** into smaller, reusable pieces, you make your scripts **easier to debug, update, and share across different projects.** This lesson focuses on **Subroutines (Subs) and Functions** the two primary containers for your logic. **Key Takeaways:** - **Subroutines (Subs):** Use these to execute a series of actions (e.g. modifying a CAD property). They perform tasks but do not return a value. - **Functions:** Similar to Subs, but they return a specific value (e.g., calculating the sum of two numbers or checking if a file exists). - **Parameters & Arguments:** Make your code dynamic by passing data into your modules. You can use single or multiple parameters of any data type. - **Passing by Value vs. Reference:** **ByVal:** Passes a copy of the data. The original variable remains unchanged outside the module. **ByRef (Default):** Passes a reference to the actual variable. Changes made inside the module will affect the original variable. - **Scope & Visibility:** Use Public to make your modules accessible across the entire project or Private to restrict access to a single module. - **Early Exits:** Use **Exit Sub** or **Exit Function** to stop execution immediately if a certain condition is met, skipping any remaining code in that block. --- ### [Control Structures](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/control-structures-2/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** Mastering **control structures** is how you transform a simple script into an intelligent program. This lesson explores how to guide your code’s execution using **conditional logic** and various **looping mechanisms,** essential for **automating complex tasks in SOLIDWORKS.** **Key Takeaways:** - **Conditional Branching:** Master the If…Then…Else structure to execute specific code blocks based on whether a condition (like a release ratio) is met. - **Looping with Certainty:** Use For…Next and For Each loops when you know the number of iterations in advance, such as processing a specific list of files or an array of statuses. - **Conditional Looping:** Implement Do While and Do Until loops for situations where the code must repeat until a dynamic goal is reached, like a retry attempt counter. - **Flow Control & Safety:** Learn to use Exit For and Exit Do to break out of loops early and apply Option Explicit to prevent bugs caused by typos in variable names. - **Iterative Efficiency:** Understand the Step keyword in For loops to control the increment value (positive or negative) and use LBound/UBound to safely traverse arrays. - **Defining Enums:** Learn to create a Public Enum to represent distinct states. - **The Select Case Structure:** A cleaner, more efficient alternative to multiple If…ElseIf statements. - **Strategic Placement:** Understand where to place Enums and global variables within your module to ensure they are properly recognized by the VBA compiler. --- ### [Variable and DataTypes](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/variable-and-datatypes/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** Understanding **data types** is the most critical fundamental in programming. By choosing the correct variable type, you ensure your SOLIDWORKS macros are **faster, safer, and more reliable.** This lesson breaks down the built-in **VBA data types** , how much space they take up, and how to **avoid common coding errors.** **Key Takeaways:** - **Numeric Foundations:** Understand the hierarchy of numbers, from simple Bytes and Integers to high-capacity Long and LongLong types. - **Precision and CAD Math:** Learn when to use Single and Double for engineering calculations and Currency to prevent rounding errors in bills of materials. - **Text and Time Handling:** Master the String type for file paths and names, and the Date type for timestamps and scheduling. - **Memory Management:** Discover how different data types occupy computer memory (from 1 to 8 bytes) and why this impacts macro performance. - **Error Prevention:** Identify the causes of Overflow and Type Mismatch exceptions during implicit variable conversion. --- ### [Navigating the VBA Editor](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/navigating-the-vba-editor/) **Published:** April 3, 2026 **Author:** Maher Mehiri **Content:** Master the **Visual Basic for Applications (VBA) Editor** within **SOLIDWORKS** . This lesson covers the essential interface mechanics from managing **Project Explorer** to customizing your environment ensuring you have a professional foundation before writing a single line of automation code. **Key Takeaways:** - **Interface Navigation:** Master the “Big Four” windows: Project Explorer, Properties, Immediate, and Locals. - **Real-Time Debugging:** Use Debug.Print and Breakpoints to pause execution and inspect variable snapshots. - **UI Fundamentals:** Build simple User Forms with buttons and labels to create interactive macro tools. - **Pro Customization:** Optimize your IDE with specialized fonts like Cascadia Mono and custom syntax themes. - **Library References:** Learn to link external APIs (like Excel) to enable cross-platform automation. --- ### [Introduction](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/introduction-4/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course we show you how to make a **new button for your computer.** This button is special because it **takes information from a 3D model and puts it into a drawing.** You will learn how to write simple code to move this data fast. **This tool helps you work better and not make mistakes.** --- ### [OnCmd](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/oncmd-3/) **Published:** May 2, 2026 **Author:** Maher Mehiri **Content:** In this course, we teach our add-in how to react when a user **clicks a button** or a **menu item** by using the **OnCmd method.** We explore how to interpret the data sent by PDM, allowing our code to **identify the specific files and folders** involved in an event. Finally, we implement the logic to **trigger custom responses** like settings dialogs or message boxes ensuring they appear correctly layered over the vault interface. --- ### [OnCommand](https://bluebyte.biz/lessons/oncommand/) **Published:** May 2, 2026 **Author:** Maher Mehiri **Content:** In this course, we teach our add-in how to react when a user **clicks a button** or a **menu item** by using the **OnCmd method.** We explore how to interpret the data sent by PDM, allowing our code to **identify the specific files and folders** involved in an event. Finally, we implement the logic to **trigger custom responses** like settings dialogs or message boxes ensuring they appear correctly layered over the vault interface. --- ### [OnCmd](https://bluebyte.biz/lessons/oncmd-2/) **Published:** May 2, 2026 **Author:** Maher Mehiri **Content:** In this course, we teach our add-in how to react when a user **clicks a button** or a **menu item** by using the **OnCmd method.** We explore how to interpret the data sent by PDM, allowing our code to **identify the specific files and folders** involved in an event. Finally, we implement the logic to **trigger custom responses** like settings dialogs or message boxes ensuring they appear correctly layered over the vault interface. **Key Takeaways:** - **Decode Command Data:** Use the EdmCmdData structure to extract file IDs, folder IDs, and configuration names during an event. - **Filter User Actions:** Identify specific triggers by comparing the CmdType and CmdID within your logic. - **Access the Vault Object:** Correctly cast the PDM Vault object to gain full access to the API’s top-level functions. - **Windows Handle :** Use Window Handles to ensure your dialog boxes and messages pop up correctly on top of the File Explorer or Admin tool. --- ### [OnCmd](https://bluebyte.biz/lessons/oncmd/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, we teach our add-in how to react when a user **clicks a button** or a **menu item** by using the **OnCmd method.** We explore how to interpret the data sent by PDM, allowing our code to **identify the specific files and folders** involved in an event. Finally, we implement the logic to **trigger custom responses** like settings dialogs or message boxes ensuring they appear correctly layered over the vault interface. **Key Takeaways:** - **Decode Command Data:** Use the EdmCmdData structure to extract file IDs, folder IDs, and configuration names during an event. - **Filter User Actions:** Identify specific triggers by comparing the CmdType and CmdID within your logic. - **Access the Vault Object:** Correctly cast the PDM Vault object to gain full access to the API’s top-level functions. - **Windows Handle :** Use Window Handles to ensure your dialog boxes and messages pop up correctly on top of the File Explorer or Admin tool. --- ### [Adding Settings](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/adding-settings/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This final video in the series focuses on creating a **professional administration interface.** You will learn how to build a settings dialog that allows PDM administrators to configure which variables are transferred, ensuring the add-in is flexible and database-driven rather than hard-coded. **KeyTakeaway :** - **Dynamic Configuration:** Use a **Property Grid** to let users define settings without writing a single line of **custom UI code** for each field. - **Persistent Storage:** Store add-in settings in the **IEdmDictionary** so they are saved globally across the entire PDM vault. - **Admin Debugging:** Learn the specific workflow required to debug code that executes within the **PDM Admin console.** - **Scalable Logic:** By replacing hard-coded variable names with a dynamic list from the vault, your add-in can be used for Descriptions, Part Numbers, Costs, and more. - **Professional Finishing:** Wrap up the development by removing debug messages and preparing the tool for production use. --- ### [Trigger PDM Events](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/trigger-pdm-events/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This video demonstrates how to expand your add-in’s functionality by **connecting it to a physical button on a SOLIDWORKS PDM data card.** You will learn the technical **differences between menu-driven and button-driven commands,** including how to ensure data card changes are visible to the user instantly. **KeyTakeaway :** - **Event Handling:** Learn to differentiate between a right-click menu commandand a button click. - **UI Syncing:** Use the **mpoExtra** enumerator to make metadata changes appear immediately without requiring the user to click away. - **Code Reusability:** See how to **adapt existing sync logic for different trigger methods** by passing optional parameters. - **Direct Feedback:** Ensure a **professional user experience** by refreshing the data card live as the code executes. --- ### [Debugging logic](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/debugging-logic/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this video, you will see the final testing phase of the add-in as we troubleshoot real-world scenarios, such as **file locks and reference errors.** This lesson demonstrates how to **refine your code to ensure it runs smoothly** even when PDM encounters unexpected file states. **KeyTakeaway :** - **Real-World Debugging:** Learn to interpret confusing PDM API exceptions and resolve them using flags. - **Smart Unlocking:** Use **EdmUnlock\_IgnoreRefsNotLockedByCaller** to avoid errors with files you don’t own. - **Testing Tools:** Leverage **PDMShell** to verify your add-in’s actions (like checkouts) in real-time. --- ### [Complete PDM Sync](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/complete-pdm-sync/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This video explains how to complete the data transfer by **writing the stored metadata to the drawing file.** You will learn the **final steps of the coding process,** including how to **save changes and prepare the add-in** for a full diagnostic test. **KeyTakeaway :** - **Writing Data:** Use **setVar** to push values from your dictionary into the drawing’s data card. - **Commit Changes:** Always call **closeFile** after updating variables, or your changes will not be saved. - **Performance Tip:** Initialize your **enumerator once outside of loops** to keep the code running fast. --- ### [Writing PDM Metadata](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/writing-pdm-metadata/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This video demonstrates how to **complete the data transfer** by checking out the drawing files and writing the new metadata to them. You will learn how to **use the PDM API to safely lock and unlock files** while performing **programmatic updates to their data cards.** **KeyTakeaway :** - **API Locking:** Use **LockFile** to check out a file and **UnlockFile** to check it back in. - **Folder Navigation:** Learn to retrieve a **file’s parent folder** programmatically using folder positions. - **Traceability:** Always include the add-in name and version in check-in comments to help with troubleshooting --- ### [PDM Data Extraction](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/pdm-data-extraction/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This video moves into the core implementation of data extraction, focusing on how to programmatically **read information from a SOLIDWORKS PDM data card.** You will learn how to target specific variables and store them efficiently using dictionaries for later use. **KeyTakeaway :** - **Requirement Enforcement:** Confirming your add-in **only triggers on the intended file types** (Parts/Assemblies). - **Dictionary Mapping:** Using **string-based dictionaries** to manage PDM variable names and values. - **Variable Enumeration:** Leveraging **getEnumeratorVariable** to access data card content without opening the file. --- ### [PDM File Pairing](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/pdm-file-pairing/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** This video covers the essential **C#** coding logic required to handle data synchronization between different file types in **SOLIDWORKS PDM.** You will learn how to **organize your project for better readability** and how to **programmatically identify associated drawings for selected model files.** **KeyTakeaway :** - **Code Organization:** Use **partial classes** to keep your project clean and professional. - **Vault Interaction:** Access the **IEdmVault5** object to perform any PDM specific tasks. - **File Pairing:** Use **Path.ChangeExtension** to predict drawing names based on model names. --- ### [Debug addins (with pdmdebugger.exe)](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/debug-addins-with-pdmdebugger-exe/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this video, you will learn how to upgrade your development workflow by moving away from basic tools like Notepad to a more **professional setup.** This lesson focuses on using the **Bluebyte PDM Debugger** to streamline how you **test and fix your SOLIDWORKS PDM add-ins.** **KeyTakeaway :** - **Console Logging:** Use **Console.WriteLine** to see live updates from your code. - **Easy Selection:** Pick multiple vault files quickly for batch testing. - **Line-by-Line Debugging:** Stop the code at **breakpoints** to catch errors. --- ### [Debug addins (with notepad.exe)](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/debug-addins-with-notepad-exe/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, we move beyond the tedious **“rebuild and reload” cycle** by setting up a **professional debugging environment in Visual Studio.** We demonstrate how to use an **external program like Notepad** to host our add-in, allowing us to test code changes and menu hierarchies in real-time. Finally, we walk through creating nested submenus, ensuring your custom tools remain organized and professional within the **PDM interface.** **KeyTakeaway :** - **Fast Debugging:** Link an external program in Visual Studio to test code **without manual re-installs.Notepad Hack:** Use **Notepad’s File → Open dialog** to quickly trigger and test your add-in within the vault. - **Menu Organization:** Create clean, nested submenus using the **AddCmd method** for a better UI. - **Environment Tip:** Always debug on local drives to avoid **“Class Not Registered” errors.** --- ### [IEdmVault5](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/iedmvault5/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, we explore the **IEdmVault5 interface,** which serves as the **“trunk” of the PDM API tree.** We learn how to navigate the documentation to understand which objects can be accessed directly from the vault and which require a more indirect path through sub-interfaces.Finally, we look at the practical advantages of using the built-in PDM message box to ensure our UI always stays properly layered on top of the host application, whether it’s File Explorer or the Administration tool. **KeyTakeaway :** - **The API Trunk:** Use **IEdmVault5** as the mandatory starting point to reach all other PDM objects. - **Documentation Secrets:** Check the Remarks section for critical rules on method order and setup. - **Access Paths:** Learn to distinguish between getting objects directly from the vault versus indirectly through sub-interfaces. - **Layered UI:** Use the **PDM MsgBox** and Window Handles to prevent pop-ups from hiding behind the main application. --- ### [GetAddInInfo (IEdmCmdMgr5)](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/getaddininfo-iedmcmdmgr5/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, We teach our add-in how to listen for specific user actions by subscribing to events in the vault. We use the command manager to create custom menu items for both the File Explorer and the Administration tool. Finally, We test our progress by loading the add-in into the vault and verifying that our new menus appear exactly where we want them. **Key Takeaway :** - **Subscribe to Events:** Use the **AddHook** method to tell the add-in to respond when a user clicks a button on a data card. - **Create Custom Menus:** Use **AddCmd** to build right-click menus and assign them specific names and functions. - **Use Enums for Organization:** Create a list of commands **(Enums)** to keep your code readable and easy to manage. --- ### [GetAddInInfo (EdmAddInInfo)](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/getaddininfo-edmaddininfo/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, We define the basic information for our add-in, such as its **name, description, and company details.** We use the **PDM Administration tool** to calculate the correct version numbers and ensure the tool only runs on the right software versions. Finally, We use a **“try-catch” block** in our code to handle any errors safely and verify our progress by loading the files into the vault. **KeyTakeaway :** - **Define Add-in Details:** Set the name, company, and version - **Calculate Version Numbers:** Use the **“About” menu** in the admin tool to find the build number - **Use Error Handling:** Wrap code in a **try-catch block** to separate PDM errors from general coding mistakes --- ### [EdmAddIn5](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/edmaddin5/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, **We begin the actual coding** by preparing our class to talk to PDM. We rename our file and add **special labels called “attributes”** so the computer knows this code is an add-in. Finally, We use **a “contract” called an interface** to make sure PDM and our code understand each other and can share information. **KeyTakeaway :** - **Prepare the Class:** Rename the default class to “addin.cs” to keep the **project organized.** - **Enable Visibility:** Use the **ComVisible** attribute to make the code visible to the PDM client. - **Create a Unique ID:** Generate a **GUID** (a long, unique number) from the Tools menu to identify the add-in. - **Establish a Contract:** Use the **IEDMAddIn5** interface to allow PDM to call your code. - **Define Communication:** Use the **GetAddInInfo** method to tell PDM the name and version of the tool when it first loads. --- ### [Installing the PDM add-in references](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/installing-the-pdm-add-in-references/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, We configure the technical foundation of our project by adding the necessary libraries. We explore two ways to do this: by **manually finding the PDM files** on our computer or by using a much better system called **NuGet**. By using NuGet, We make sure that other people can work on our code **without any errors**, and We ensure the settings are just right so **PDM can talk to our code properly.** **Key Takeaway:** - **Add PDM References:** Locate the **ePDM.interop.ePDM** and **resultcode.dll** files to give your code access to PDM tools. - **Fix Embed Interop Types:** Always set **Embed Interop Types** to False in the properties menu to avoid strange communication errors. - **Use NuGet Packages:** Install libraries via **NuGet.org** so the project is not tied to your specific computer’s folders. --- ### [Creating your Visual Project](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/creating-your-visual-project/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, We start by opening Visual Studio as a normal user to keep things simple. We create a **Class Library project** because our tool lives inside another program. Finally, We pick a safe place on the computer to save our work and select the right version of the framework to make sure everything runs smoothly. **Key Takeaway:** - **Organize File Location:** Create a dedicated directory, such as **“Card Transfer”** to store the solution and project files. - **Set Framework Version:** Target a version between **.NET Framework 4.5 and 4.8** to ensure the add-in works correctly. --- ### [Visual Studio Requirements](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/lessons/visual-studio-requirements/) **Published:** April 30, 2026 **Author:** Maher Mehiri **Content:** In this course, we prepare our computer by **installing Visual Studio 2022.** We choose the correct version and select the **.NET Desktop and .NET Framework tools.** Once these are installed, we have everything we need to **start building our project.** **Key Takeaway :** - **Install Visual Studio:** Download the 2022 version from the official website. - **Select Workloads:** Choose .NET Desktop Development to get the necessary project templates. - **Add Legacy Frameworks:** Include .NET Framework 4.6 to 4.8 for compatibility with SOLIDWORKS. --- ### [Understanding Task Hooks](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/understanding-task-hooks/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we begin implementing the **OnCmd method**, which acts as the primary engine for your add-in’s logic. You will learn how to use a **switch statement** to intercept the specific event hooks we registered earlier, allowing your code to react differently whether the PDM admin is configuring settings or a user is running the task. **Key Highlights:** - **The Role of OnCmd :** Understand how **OnCmd** serves as the entry point for all PDM notifications. - **Switch Statement Implementation :** Learn how to structure a **C# switch statement** based on the **meCmdType** to cleanly separate your **setup, launch, and execution logic.** --- ### [Lesson](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/lessons/lesson-4/) **Published:** April 3, 2026 **Author:** Maher Mehiri --- ### [Final Testing & Deployment Strategy](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/final-testing-deployment-strategy/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this final lesson, we conclude the course by performing a full end-to-end verification of the **T-Card Transfer** **add-in**. You will learn how to navigate the unique challenges of cross-process debugging and witness the execution of your task from **File Explorer** through to the **PDM Task List.** **Key Takeaways:** - **Process Hunting:** Identifying the **TaskExecutor.exe** the engine that actually runs your code. - **Catching Errors:** See a real-world **“Task Failed”** exception in action and how it reports back to the **PDM Task List**. - **Live Step-Through:** Watching the **TaskRun** hook execute line-by-line using the Visual Studio **“Attach To Process”** feature. --- ### [TaskLaunch & TaskRun – Execution Flow](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/tasklaunch-taskrun-execution-flow/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this pre-final lesson, we implement the **Task Run** hook, which executes the core logic of your add-in. You will learn how to handle task instances, manage distributed execution states **(suspend, resume, and cancel)**, and implement a robust **error-handling system** using custom exceptions to communicate status back to the **PDM Administration tool**. **Key Takeaways:** - **Handling Task Status & Distributed States :** Learn how to implement a `CheckForCancellationOrResumption` method. - **Custom Exception Handling :** Discover the benefit of creating specific exception classes like `TaskFailedException` and **`TaskCanceledException`.** - **Progress Tracking** **:** See how to use `SetProgressRange` and `SetProgressPos` to update the visual progress bar in the PDM Task List --- ### [TaskSetupButton – Saving Settings & Adding Commands](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/tasksetupbutton-saving-settings-adding-commands/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we finalize the task configuration logic by implementing the **Task Setup Button** hook. You will learn how to distinguish between **“OK”** and **“Cancel”** events to persist administrator settings and how to dynamically add custom menu commands to the **SOLIDWORKS PDM File Explorer interface.** **Key Takeaway:** - **The “OK” vs. “Cancel” Logic:** Learning how to read the **`EmdCmd.mbsComment`** to prevent saving unwanted changes. - **File Explorer Integration:** Adding your task to the right-click menu in Windows File Explorer using **`SetMenuCmds`**. - **The Full Test:** Verifying that your **“Description”** and **“Document Number”** settings persist even after closing the vault. --- ### [Persisting Data with EdmTaskSetupPage](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/persisting-data-with-edmtasksetuppage/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we implement the data persistence logic for our custom task settings. You will learn how to use the `IEDMTaskProperties` **interface** as a virtual dictionary to store and retrieve administrator-defined variables. **Key Takeaway:** - **getValEx & setValEx:** The dynamic duo for reading and writing task data. - **PropertyGrid Integration :** Assigning **`Settings`** class to **PropertyGrid.SelectedObject**. --- ### [Creating Custom Task Dialog Pages](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/creating-custom-task-dialog-pages/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we implement the custom configuration interface for our task by utilizing the **SOLIDWORKS PDM Task Properties** **interface**. You will learn how to inject a **custom WinForms user control into the PDM Task setup wizard**, allowing administrators to define specific variables for the data transfer process. **Key Takeaway:** - **Task Flag Configuration** Learn how to set task flags such as **`SupportsScheduling`** and `SupportChangeState`. - **WinForms Integration & UI Controls** : Understand the process of creating a **User Control** and using a `PropertyGrid`. - **Defining Setup Pages** : See how to construct the `EdmTaskSetupPage` structure array. --- ### [Using Partial Classes in PDM Add-Ins](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/using-partial-classes-in-pdm-add-ins/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we address the challenge of managing a growing codebase by refactoring our add-in into **partial classes**. You will learn how to logically separate your event-handling logic into multiple files to maintain readability and organization as the project increases in complexity. **Key Takeaway:** - **The Partial Class Pattern :** Learn how to use the **`partial `**keyword to split a **single** **C#** class across **multiple files**. - **Method Delegation** **:** Understand how to pass the `poCmd` and `ppoData` parameters from the primary **`OnCmd` method** to specialized handler methods in **other files**. --- ### [Command Manager (CmdMgr) Deep Dive](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/command-manager-cmdmgr-deep-dive/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we finalize the add-in initialization by defining the **event hooks required for a PDM Task** and implementing a professional **error-handling** **framework.** You will learn how to subscribe to the four critical stages of a **task’s lifecycle** and refactor your project to include **dynamic version tracking**, ensuring your tool is both robust and easy to troubleshoot in a production environment. **Key Takeaway:** - **Task Lifecycle Hooks :** Learn how to use **AddHook** to listen for Task **Setup, Setup Button, Launch, and Run** events. - **Automated Version Tracking:** Creating a global **GetCaption** method to include the add-in version in every error message. - **Safe Initialization with Try-Catch :** Implement a global error-handling pattern within **GetAddInInfo** to prevent PDM crashes. --- ### [GetAddInInfo Explained](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/getaddininfo-explained/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we begin the actual coding of our add-in by setting up the necessary class attributes and implementing the core **PDM interface**. You will learn how to make your code **“visible”** to PDM and how to provide the vault with essential project details about your tool. **Key Takeaway:** - **Establishing the COM Identity :** Learn why you must set your class to be **ComVisible** and how to generate a **GUI**. - **Implementing the IEdmAddIn5 Interface :** Understand the **“contract”** between your code and PDM. - **Defining Project Information :** See how to use the **GetAddInInfo** method to pass important details to the PDM Admin tool. --- ### [Adding PDM PIAs as References](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/adding-pdm-pias-as-references/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we cover how to connect your project to the **SOLIDWORKS PDM API**. You will learn the difference between referencing local system files and using **NuGet packages** to ensure your code is portable and easy to share with other developers. **Key Takeaway:** - **Referencing PDM API Libraries :** Learn how to find and add the essential Interop DLLs **(EPDM.Interop.EPDM.DLL** **and** **EPDM.Interop.EPDMResultCode)** - **The Benefits of NuGet Packages :** Discover why using a central repository like **NuGet.org** is better than linking to local files. - Using the **Bluebyte.SolidWorks.PDMProfessional.Interops package** ensures your add-in works across different environments without manual path fixing. --- ### [Project Templates](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/project-templates/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we walk through the initial project setup in **Visual Studio** to lay the foundation for our custom task. You will learn how to choose the **correct project templates** and configure your environment to ensure your code compiles into a compatible **DLL for** **SOLIDWORKS PDM**. **Key Takeaways:** - **Proper Visual Studio Execution :** Understand why you should run **Visual Studio as a** **regular user**. - **Selecting the Correct Project Template :** Learn how to identify and select the **Class Library (.NET Framework)** **template**. - **Targeting the .NET Framework :** Identify the supported framework versions and which version is the most **reliable**. --- ### [Convert Task](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/convert-task-2/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we begin the transition from standard add-ins to the powerful **SOLIDWORKS PDM Task Framework.** You will learn how to use the Task Add-in architecture to build custom setup interfaces and offload heavy processing such as synchronizing data between parts and drawings to dedicated task host machines for improved efficiency and automation. **Key Takeaways:** - **Using the PDM Task Framework :** Understand the benefits of using the Task architecture to handle large-scale updates. - **Syncing Data Between Files :** See how to automatically pull information from a part or assembly and push it onto its drawing’s data card to keep your records consistent. - **Running Tasks on Other Computers :** Learn how to use “Task Hosts” to run heavy work on a server or a different machine on your network. --- ### [Introduction](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/introduction-3/) **Published:** March 2, 2026 **Author:** Maher Mehiri **Content:** The **SOLIDWORKS PDM Task Add-in** Development course from **Blue Byte Systems Inc.** is a specialized, technical deep-dive designed for developers and automation leads who want to master the art of vault automation. This intensive program empowers you to build high-performance custom add-ins using **C# or VB.NET,** enabling you to design, implement, and deploy sophisticated tools that handle complex engineering processes from seamless file conversions and data extraction to advanced, workflow-driven operations. **Prerequisites:** - Familiarity with **SOLIDWORKS PDM**, including workflows and administration concepts. - Basic knowledge of **.NET programming**, preferably **C# or VB.NET.** - Understanding of basic programming concepts such as **classes, methods, and debugging.** - Access to a **SOLIDWORKS PDM Professional environment** for testing and development is recommended. --- ### [System Requirements](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/system-requirements/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we cover the essential environment setup and system requirements needed to develop custom **SOLIDWORKS PDM tasks**. You will learn how to configure your development machine with the **right tools and permissions** to ensure a smooth coding and debugging process. **Key Takeaways:** - **Visual Studio Configuration :** Learn which versions of **Visual Studio** to install and which specific workloads, like **.NET desktop development**, are required. - **PDM Administrative Permissions :** Identify the specific user rights needed within the **PDM Admin tool** - **Using PDM Shell for Efficiency :** Get introduced to **PDMShell** **Get the tool:** pdmshell.com --- ### [Debugging Task Add-In Hooks](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/debugging-task-add-in-hooks/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we establish a specialized debugging workflow designed specifically for **SOLIDWORKS PDM Task add-ins**. You will learn how to create a diagnostic dialog to capture process information, manually refresh the add-in in the vault, and successfully attach the **Visual Studio debugger** to the appropriate PDM process for real-time testing. **Key Takeaway:** - Using **StringBuilder** to create a debug dialogue. - Locating the **ConisioAdmin** process. - **Troubleshooting** the most common error: Trying to debug a DLL that hasn’t been reloaded. --- ### [Build & Register Your Add-in in the Vault](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/lessons/build-register-your-add-in-in-the-vault/) **Published:** March 6, 2026 **Author:** Maher Mehiri **Content:** In this lesson, we walk through the process of **registering the add-in within the PDM Administration tool** and verifying that the **event hooks are correctly recognized by the vault**. You will learn how to **load the compiled DLLs** and observe the integration as your custom task appears in the task creation menu for the first time. --- ### [Lesson](https://bluebyte.biz/lessons/lesson-3/) **Published:** March 6, 2026 **Author:** Maher Mehiri --- ### [CONVERT TASK](https://bluebyte.biz/lessons/convert-task/) **Published:** March 6, 2026 **Author:** Maher Mehiri --- ### [Lesson](https://bluebyte.biz/lessons/lesson-2/) **Published:** March 6, 2026 **Author:** Maher Mehiri --- ### [Functions & Subroutines](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/functions-subroutines/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Lesson](https://bluebyte.biz/lessons/lesson/) **Published:** March 2, 2026 **Author:** Maher Mehiri --- ### [Introduction to SOLIDWORKS PDM Add-ins C# Course](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/introduction-to-solidworks-pdm-add-ins-c-course/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** This lesson covers the introduction to SOLIDWORKS PDM Add-ins C# Course. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** SOLIDWORKS PDM API --- ### [Implementing the IEdmAddIn::OnCmd Method](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/implementing-the-iedmaddinoncmd-method/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** Implementing the IEdmAddIn::OnCmd Method. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Implementing the IEdmAddIn::OnCmd Method --- ### [Read and editing data variables with the IEdmEnumeratorVariable5 interface](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/read-and-editing-data-variables-with-the-iedmenumeratorvariable5-interface/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** Read and editing data variables with the IEdmEnumeratorVariable5 interface. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Read and editing data variables with the IEdmEnumeratorVariable5 interface --- ### [PDM Add-ins Requirements](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/pdm-add-ins-requirements/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** In this course, we outline the requirements to write PDM add-ins in C# for SOLIDWORKS PDM Professional. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** PDM Add-ins Requirements --- ### [Creating the Visual Studio Class Library Project](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/creating-the-visual-studio-class-library-project/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** This lecture covers creating the add-in’s Visual Studio class library project, its properties, and references. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Creating the Visual Studio Class Library Project --- ### [Implementing the IEdmAddIn::GetAddInInfo Method](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/implementing-the-iedmaddingetaddininfo-method/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** Shows how to implement the GetAddInInfo method. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Implementing the IEdmAddIn::GetAddInInfo Method --- ### [How to Debug a PDM Add-in In Visual Studio](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/how-to-debug-a-pdm-add-in-in-visual-studio/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** How to Add a PDM Add-in to the Vault via the Administration tool. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** How to Debug a PDM Add-in In Visual Studio --- ### [Closing Remarks](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/closing-remarks/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** Closing remarks for writing PDM add-ins in C# **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Closing remarks for writing PDM add-ins in C# --- ### [Checking files in and out of the vault using the API](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/checking-files-in-and-out-of-the-vault-using-the-api/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili shows how to use the LockFile and UnlockFile to check files in and out of the vault. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Checking files in and out of the vault using the API --- ### [What’s an API?](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/whats-an-api/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Task lifecycle:](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/task-lifecycle/) **Published:** October 9, 2025 **Author:** Shahmeer **Content:** --- ### [Topics covered:](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Transfer variable values from model → drawing](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/transfer-variable-values-from-model-→-drawing/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Packaging (CEX), updating (best practices)](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/packaging-cex-updating-best-practices/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Deploying & debugging add-ins](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/deploying-debugging-add-ins/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [GetAddInInfo, OnCmd](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/getaddininfo-oncmd/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Add-in architecture: IEdmAddIn5](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/add-in-architecture-iedmaddin5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Environment setup](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/environment-setup/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [WinForms batch utility app to add, unlock, get, and update parts in bulk](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/winforms-batch-utility-app-to-add-unlock-get-and-update-parts-in-bulk/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchUpdate](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iedmbatchupdate/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchGet](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iedmbatchget/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchUnlock](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iedmbatchunlock/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchAdd](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iedmbatchadd/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [WinForms “CardEditor” app to list *.sldprt files and edit descriptions](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/winforms-cardeditor-app-to-list-sldprt-files-and-edit-descriptions/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [SetVar vs GetVarFromDB](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/setvar-vs-getvarfromdb/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Edit sequences: SetVar → CloseFile](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/edit-sequences-setvar-→-closefile/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmEnumeratorVariable5](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iedmenumeratorvariable5-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Writing & Deploying Add-Ins](https://bluebyte.biz/lessons/writing-deploying-add-ins/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Task Add-Ins](https://bluebyte.biz/lessons/task-add-ins/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Context Menu & Data Card Add-In](https://bluebyte.biz/lessons/context-menu-data-card-add-in/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Day 3: Add-Ins, Context Menus & Tasks](https://bluebyte.biz/lessons/day-3-add-ins-context-menus-tasks/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Batch Utility Interfaces](https://bluebyte.biz/lessons/batch-utility-interfaces/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmEnumeratorVariable5](https://bluebyte.biz/lessons/iedmenumeratorvariable5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Login](https://bluebyte.biz/lessons/login/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Building a console app (myFirstPDMTool) to](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/building-a-console-app-myfirstpdmtool-to/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Standard operations: check-in, check-out, undo, get latest](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/standard-operations-check-in-check-out-undo-get-latest/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Iterator pattern](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/iterator-pattern/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Login methods](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/login-methods-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Setting up Visual Studio](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/setting-up-visual-studio/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Reading & Writing Card Variables](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/reading-writing-card-variables/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Login methods](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/login-methods/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Understanding the IEdmVault5 object](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/understanding-the-iedmvault5-object/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [“Hello Vault” in VBA](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/hello-vault-in-vba/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Best Practices](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/best-practices/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [VBA Debugging](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/vba-debugging/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Arrays, Collections, Dictionaries](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/arrays-collections-dictionaries/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Conditionals & Loops](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/conditionals-loops/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Data Types](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/data-types/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Macro Recorder & VBE Editor](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/macro-recorder-vbe-editor/) **Published:** October 8, 2025 **Author:** Shahmeer --- ### [Creating the Visual Studio Class Library Project](https://bluebyte.biz/lessons/creating-the-visual-studio-class-library-project-2/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [Introduction](https://bluebyte.biz/lessons/introduction-2/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [test1](https://bluebyte.biz/lessons/test1/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [TEST](https://bluebyte.biz/lessons/test-2/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [test](https://bluebyte.biz/lessons/test/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [How to Add a PDM Add-in to the Vault](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/lessons/how-to-add-a-pdm-add-in-to-the-vault/) **Published:** December 30, 2024 **Author:** Amen Jlili **Content:** How to Add a PDM Add-in to the Vault via the Administration tool **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** How to Add a PDM Add-in to the Vault --- ### [Course Requirements](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/course-requirements/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili lists the course requirements. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Course Requirements --- ### [Introduction to the SOLIDWORKS PDM API - VBA Course](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/introduction-to-the-solidworks-pdm-api-vba-course/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili lists the course requirements. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Introduction to the SOLIDWORKS PDM API - VBA Course --- ### [Hello Vault program in VBA](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/hello-vault-program-in-vba/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which we write a hello vault program using the IEdmVault5. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Hello Vault program in VBA --- ### [Setting up your programming environment](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/setting-up-your-programming-environment/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In this lecture, we prepare the VBA development environment by setting the project references. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Setting up your programming environment --- ### [Logging into the Vault using LoginAuto and Login](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/logging-into-the-vault-using-loginauto-and-login/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili discusses the different approaches to login into a PDM vault using the API. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Logging into the Vault using LoginAuto and Login --- ### [How to get the IEdmFile5 interface in the SOLIDWORKS PDM API](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/how-to-get-the-iedmfile5-interface-in-the-solidworks-pdm-api/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili discusses different approaches to get a file object from the vault using the API. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** How to get the IEdmFile5 interface in the SOLIDWORKS PDM API --- ### [Traversing the folder tree structure in a PDM vault with the API](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/lessons/traversing-the-folder-tree-structure-in-a-pdm-vault-with-the-api/) **Published:** December 28, 2024 **Author:** Amen Jlili **Content:** In which Amen Jlili discusses how to use the iterator pattern to traverse the folder structure in a PDM vault programmatically. **Lesson Categories:** SOLIDWORKS PDM API **Lesson Tags:** Traversing the folder tree structure in a PDM vault with the API --- ## Topics ### [TaskRun](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/task-lifecycle/topics/taskrun-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-19/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-18/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskLaunch](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/task-lifecycle/topics/tasklaunch-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-17/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-16/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-15/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskSetupButton](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/task-lifecycle/topics/tasksetupbutton-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-14/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskSetup](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/task-lifecycle/topics/tasksetup-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-13/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-12/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-10/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmReference](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/iedmreference/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-11/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Exception handling](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/exception-handling/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-9/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-8/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmDictionary5](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/iedmdictionary5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-7/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-6/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Partial classes](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/partial-classes/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [AddHook, AddCmd](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/addhook-addcmd/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-3/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [ICmdMgr](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/icmdmgr/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Menus](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/topics-covered/topics/menus/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Packaging (CEX), updating (best practices)](https://bluebyte.biz/topics/packaging-cex-updating-best-practices/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-4/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Deploying & debugging add-ins](https://bluebyte.biz/topics/deploying-debugging-add-ins/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [GetAddInInfo, OnCmd](https://bluebyte.biz/topics/getaddininfo-oncmd/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Add-in architecture: IEdmAddIn5](https://bluebyte.biz/topics/add-in-architecture-iedmaddin5-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Environment setup](https://bluebyte.biz/topics/environment-setup-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskRun](https://bluebyte.biz/topics/taskrun/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskLaunch](https://bluebyte.biz/topics/tasklaunch/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskSetupButton](https://bluebyte.biz/topics/tasksetupbutton/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [TaskSetup](https://bluebyte.biz/topics/tasksetup/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topics covered:](https://bluebyte.biz/topics/topics-covered/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Transfer variable values from model → drawing](https://bluebyte.biz/topics/transfer-variable-values-from-model-→-drawing/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Add-in architecture: IEdmAddIn5](https://bluebyte.biz/topics/add-in-architecture-iedmaddin5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Environment setup](https://bluebyte.biz/topics/environment-setup/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [WinForms batch utility app to add, unlock, get, and update parts in bulk](https://bluebyte.biz/topics/winforms-batch-utility-app-to-add-unlock-get-and-update-parts-in-bulk/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchUpdate](https://bluebyte.biz/topics/iedmbatchupdate/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchGet](https://bluebyte.biz/topics/iedmbatchget/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchUnlock](https://bluebyte.biz/topics/iedmbatchunlock/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmBatchAdd](https://bluebyte.biz/topics/iedmbatchadd/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [WinForms “CardEditor” app to list *.sldprt files and edit descriptions](https://bluebyte.biz/topics/winforms-cardeditor-app-to-list-sldprt-files-and-edit-descriptions/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [SetVar vs GetVarFromDB](https://bluebyte.biz/topics/setvar-vs-getvarfromdb/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Edit sequences: SetVar → CloseFile](https://bluebyte.biz/topics/edit-sequences-setvar-→-closefile/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic-2/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [IEdmEnumeratorVariable5](https://bluebyte.biz/topics/iedmenumeratorvariable5/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Perform check-in / undo checkout](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/building-a-console-app-myfirstpdmtool-to/topics/perform-check-in-undo-checkout/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [List files in a folder](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/building-a-console-app-myfirstpdmtool-to/topics/list-files-in-a-folder/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [Login](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/lessons/building-a-console-app-myfirstpdmtool-to/topics/login/) **Published:** October 9, 2025 **Author:** Shahmeer --- ### [ABCD22](https://bluebyte.biz/topics/abcd22/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [ABCD](https://bluebyte.biz/topics/abcd-2/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [abcd1](https://bluebyte.biz/topics/abcd1/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [abcd](https://bluebyte.biz/topics/abcd/) **Published:** October 2, 2025 **Author:** Shahmeer --- ### [Topic](https://bluebyte.biz/topics/topic/) **Published:** October 2, 2025 **Author:** Shahmeer --- ## Certificates ### [Certificate](https://bluebyte.biz/certificates/master-solidworks-api/) **Published:** December 14, 2024 **Author:** Amen Jlili **Content:** Shahmeer ID: Date: Verify: bluebytesystems.com/certificate-verification --- ## Groups ### [$50/month subscription plan](https://bluebyte.biz/groups/50-month-subscription-plan/) **Published:** March 24, 2026 **Author:** Shahmeer --- ## Services ### [Training & Enablement (In-Person or Online)](https://bluebyte.biz/service/training-enablement-in-person-or-online/) **Published:** May 4, 2025 **Author:** Amen Jlili **Content:** Service ## Training (In-Person or Online) Expert-led training to empower engineering teams and software developers with practical skills for automating and customizing SOLIDWORKS, PDM, and internal tools. [ Book a 30-Min Consultation ](#) [ Browse Courses ](https://bluebyte.biz/courses-2/) Courses Available 0 + Delivery Formats 0 Topic Areas Covered 0 About Our Training ## Practical Skills. Real Engineering Scenarios. At Blue Byte Systems Inc., we provide expert-led training to empower engineering teams and software developers with practical skills for automating and customizing SOLIDWORKS, PDM, and internal tools. Whether you’re onboarding new talent or building advanced automation capabilities, our training is tailored to real-world scenarios and delivered by seasoned developers. We also offer flexible self-paced online courses that let your team learn at their own pace. What We Cover ### SOLIDWORKS API Programming Automate design tasks, control features, and develop time-saving modeling tools inside SOLIDWORKS. ### SOLIDWORKS PDM Add-in Development Master the PDM API to build custom task add-ins, automate workflows, and integrate with external systems. ### Microsoft Technologies for Engineers Build internal apps using .NET, WPF, WinForms, and SQL Server. ### Automation Scripting & Macros Create scripts in VBA or C# to streamline modeling, document creation, or data entry in SOLIDWORKS and PDM. Flexible Delivery Options ## Train Your Way Option 01 ### In-Person Workshops Hands-on training delivered at your office, tailored to your workflow. Option 02 ### Virtual Sessions (Zoom or Teams) Interactive, instructor-led online classes with Q&A, screen sharing, and exercises. Option 03 ### Self-Paced Online Learn on your schedule with lifetime access to video content, files, and sample code. Available Courses ## Browse Our Course Library From VBA basics to advanced PDM add-in development — find the course that fits your team’s next milestone. Enrolled [ ![SOLIDWORKS PDM API: VBA Advanced](https://bluebyte.biz/wp-content/uploads/2026/05/1000011759-300x169.png) ](https://bluebyte.biz/courses/pdm-api-vba-advanced/)### SOLIDWORKS PDM API: VBA Advanced This course teaches you how to configure the VBA environment, add the required API references, connect to a PDM vault, build a user interface, securely log in, browse folders, work with file configurations, read data card variables, and safely update files using proper check-out and check-in logic. [ See more ](https://bluebyte.biz/courses/pdm-api-vba-advanced/) 0% Complete 0/16 Steps Enrolled [ ![SOLIDWORKS PDM API: Data Card Add-in](https://bluebyte.biz/wp-content/uploads/2026/05/SOLIDWORKS-PDM-API-Data-Card-Add-In-1-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/)### SOLIDWORKS PDM API: Data Card Add-in In this course we show you how to make a new button for your PDM. This button is special because it takes information from a 3D model and puts it into a drawing. You will learn how to write simple code using C# to move this data fast. This tool helps you work better and not make mistakes. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) 0% Complete 0/18 Steps Enrolled [ ![VBA for Non-Programmers](https://bluebyte.biz/wp-content/uploads/2026/04/unnamed-300x169.png) ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/)### VBA for Non-Programmers This course is about the basics of programming with VBA. It focuses on core concepts such as variables, data types, conditions, loops, functions, and simple macros to help build a strong foundation. [ See more ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) 0% Complete Last activity on April 4, 2026 2:38 pm Enrolled [ ![SOLIDWORKS PDM Task Add-in Development (C#)](https://bluebyte.biz/wp-content/uploads/2026/03/1000010872-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/)### SOLIDWORKS PDM Task Add-in Development (C#) The SOLIDWORKS PDM Task Add-in Development course from Blue Byte Systems Inc. is a specialized, technical deep-dive designed for developers and automation leads who want to master the art of vault automation. This intensive program empowers you to build high-performance custom add-ins using C# or VB.NET, enabling you to design, implement, and deploy sophisticated tools that handle complex engineering processes—from seamless file conversions and data extraction to advanced, workflow-driven operations. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) 0% Complete Last activity on March 2, 2026 4:43 am Completed [ ![SOLIDWORKS PDM Professional API Bootcamp (3 days)](https://bluebyte.biz/wp-content/uploads/2024/12/solidowrks-pdm-api-thumbnail-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/)### SOLIDWORKS PDM Professional API Bootcamp (3 days) The SOLIDWORKS PDM API Bootcamp from Blue Byte Systems Inc. is a three-day, in-person immersive course designed for developers, engineers, and automation leads who want to master the PDM API, build real-world custom tools, and integrate advanced workflows into your PDM environment. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-professional-api-bootcamp/) 100% Complete Last activity on October 2, 2025 3:04 pm Enrolled [ ![SOLIDWORKS PDM API: Write PDM Add-ins in C#](https://bluebyte.biz/wp-content/uploads/2024/12/solidowrks-pdm-api-thumbnail-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/)### SOLIDWORKS PDM API: Write PDM Add-ins in C# This course provides an introduction to creating and implementing SOLIDWORKS PDM add-ins using C# and the SOLIDWORKS PDM API. Designed for PDM administrators and developers, this course focuses on automating tasks within the SOLIDWORKS PDM environment, improving workflow efficiency, and integrating custom add-ins into the vault. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) 0% Complete Last activity on September 30, 2025 5:30 pm Completed [ ![SOLIDWORKS PDM API: Basics with VBA](https://bluebyte.biz/wp-content/uploads/2024/12/vba-solidworks-pdm-api-300x169.png) ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/)### SOLIDWORKS PDM API: Basics with VBA This course provides a comprehensive introduction to SOLIDWORKS PDM automation using VBA and the SOLIDWORKS PDM API. It is designed for those interested in automating tasks within the SOLIDWORKS PDM environment, such as managing files, folders, and data cards in the vault, and improving efficiency in PDM workflows. [ See more ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) 100% Complete Last activity on May 18, 2026 5:37 pm Enrolled [ ![Master The SOLIDWORKS API Course To Automate Your Workflow with VBA](https://bluebyte.biz/wp-content/uploads/2024/12/solidworks-vba-course-thumbnail-300x169.png) ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/)### Master The SOLIDWORKS API Course To Automate Your Workflow with VBA This comprehensive course provides a foundational understanding of Visual Basic for Applications (VBA) and its seamless integration with SOLIDWORKS. It’s designed for individuals seeking to automate tasks within the SOLIDWORKS environment, enhancing productivity and efficiency. [ See more ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) 0% Complete Last activity on September 30, 2025 5:01 pm Client Testimonial I just wanted to let you know that I’ll try to repeat the exercises several times a week for a few hours. I particularly liked the PDM add-in with the button. I was also able to take the first steps, such as outputting the path from the selected file. I copied a few things, some of which came from me. I thought of the ‘partial’ from the beginning — much tidier. When you’re back in Vancouver at the end of the week, we can exchange ideas. Until then, I wish you a great time in Europe. ![](https://bluebyte.biz/wp-content/uploads/2025/10/soundronic.png) *JAN, PDM Administrator* **CanTech GmbH** Thanks again for the training this week. I learned a great deal and I have a million ideas floating around in my head. My level of confidence in creating add-ins with the PDM API is significantly increased, and the large volume of sample code we produced will be a great reference moving forward. Learning where to look for answers and how to look for those answers, along with the specifics of the API itself, was a huge benefit. I also greatly appreciate the offer of ongoing communication and assistance in the form of a code review of my first add-in. I look forward to both of those things. ![](https://bluebyte.biz/wp-content/uploads/2025/10/tigercat.png) *MICHAEL WEBSTER, Software Developer* **Tigercat Industries Inc.** ### Let's Train Your Team the Right Way #### Practical. Professional. Built for engineers. **Service Categories:** Training, Strategy & Digital Transformation --- ### [PDM Automation & Integration](https://bluebyte.biz/service/pdm-automation-integration/) **Published:** May 4, 2025 **Author:** Amen Jlili **Content:** Service ## PLM Automation & Integration We specialize in transforming your SOLIDWORKS PDM environment into a seamless hub for engineering, business, and manufacturing workflows, eliminating manual errors and saving thousands of hours. [ Book a 30-Min Consultation ](#) [ Explore Services ](#services) ![](https://bluebyte.biz/wp-content/uploads/2024/12/IMG-20251023-WA0001-960x500.jpg) We build custom connectors that link SOLIDWORKS PDM with your business systems, including ERP, PLM, CRM, databases, web APIs, and internal applications. ERP We connected to pdm: [ EPICOR ](#) [ Microsoft Dynamics ](#) [ SAP ](#) [ Salesforce ](#) [ EPICOR ](#) What We Deliver ## Discover Blue Byte Systems PLM/PDM Connectivity Capabilities End-to-end PDM automation and ERP/cloud integration from custom add-ins and scripts to full vault-to-platform data bridges. ### Document Transitions & Approvals Automate document state transitions, approval workflows, and notifications, removing bottlenecks and ensuring nothing slips through the cracks in your PDM vault. [ get started ](https://bluebyte.biz/contact/) ### ERP & BOM Sync Connect PDM to your ERP system to automatically sync BOMs, part numbers, and metadata, eliminating dual-entry, reducing errors, and keeping systems aligned. [ get started ](https://bluebyte.biz/contact/) ### Dashboards & Reporting Tools Build dashboards or reporting tools using live PDM data. [ get started ](https://bluebyte.biz/contact/) ### CRM & Sales Connectors Connect PDM with CRM or quoting systems so sales, engineering, and operations can share project numbers, customer data, product configurations, and deliverables. [ get started ](https://bluebyte.biz/contact/) ### Secure Web Portals Develop secure web portals for suppliers or remote users using the SOLIDWORKS PDM Web API, browser-based access to vault data without requiring a local PDM client. [ get started ](https://bluebyte.biz/contact/) ### Data Bridges & Middleware Create robust data bridges between PDM and Salesforce, Monday.com, SharePoint, Dynamics 365. [ get started ](https://bluebyte.biz/contact/) Why Blue Byte Systems? ## Engineering-Centric PLM Connector Expertise We build practical connectors between SOLIDWORKS PDM and PLM systems so engineering data can move securely, accurately, and without duplicate entry. 1 SOLIDWORKS PDM integration specialists. We understand how files, references, variables, workflows, revisions, and BOMs behave inside SOLIDWORKS PDM. 2 PLM and business-system connectivity. We can connect SOLIDWORKS PDM with PLM platforms, ERP systems, databases, web APIs, and middleware layers to keep engineering and business data aligned. 3 BOM, metadata, and document synchronization. We help automate the transfer of item data, BOM structures, part numbers, revisions, PDFs, STEP files, DXFs, and released drawing packages. Integration Capabilities ![](https://bluebyte.biz/wp-content/uploads/2026/05/download.svg) ![](https://bluebyte.biz/wp-content/uploads/2026/05/download-1.svg) ![Epicor logo wordmark in dark teal on white background](https://bluebyte.biz/wp-content/uploads/2026/05/Epicor_Logo_Teal_RGB_1-1024x302.png) ![Teal logo with an S on a teal square overlapping several circular shapes in teal and aqua.](https://bluebyte.biz/wp-content/uploads/2026/05/microsoft_sharepoint_logo_office_icon_145722.png) ![Salesforce logo in white on a blue cloud-shaped background while floating on a black backdrop](https://bluebyte.biz/wp-content/uploads/2026/05/salesforce_logo_icon_168852.png) Client Testimonial Amen is fast, knowledgeable, professional and courteous. I would be happy to work with him again! **Systems Administrator** L.L., Fortune 500 Company ### Talk to one of our experts #### 30-min Zoom conference to answer all of your questions **Service Categories:** CAD & PDM Automation --- ### [SOLIDWORKS PDM Data Migration](https://bluebyte.biz/service/solidworks-pdm-data-migration/) **Published:** May 4, 2025 **Author:** Amen Jlili **Content:** Service ## SOLIDWORKS PDM Data Migration Implementing SOLIDWORKS PDM is the first step toward centralizing and protecting your design data. But migrating years of unmanaged CAD files into a clean, structured vault is where the real transformation begins. At BLUE BYTE SYSTEMS INC., we specialize in high-volume, automated SOLIDWORKS PDM data migration projects that move complex engineering datasets into SOLIDWORKS PDM with verified references, normalized metadata, and zero downtime for your design team. [ Book a 30-Min Consultation ](#) [ Explore Services ](#services) ![data migration with pdmshell](https://bluebyte.biz/wp-content/uploads/2025/05/data-migration-with-pdmshell.jpeg) We build custom SOLIDWORKS® and SOLIDWORKS PDM® automation tools that help engineering teams reduce manual work, improve data accuracy, and deliver projects faster SYSTEMS WE HAVE MIGRATED DATA FROM [ Upchain ](#) [ Vault Professional ](#) [ SOLIDWORKS PDM ](#) [ SharePoint ](#) What We Deliver ## Discover Our Migration Services End-to-end automation and customization solutions, from single macros to full-featured add-ins integrated into your CAD platform. ### Upchain -> SOLIDWORKS PDM Autodesk is sunsetting Upchain, and most customers will be moved to Fusion Manage, another proprietary database. Migrating to SOLIDWORKS PDM gives you more control over your engineering data, workflows, and long-term system strategy. [ get started ](https://bluebyte.biz/contact/) ### Vault Pro -> SOLIDWORKS PDM Blue Byte Systems can help engineering teams migrate data from Autodesk Vault Professional to SOLIDWORKS PDM Professional while preserving structure, references, and key metadata. [ get started ](https://bluebyte.biz/contact/) ### File Explorer -> SOLIDWORKS PDM Blue Byte Systems can help migrate engineering data from Windows folders, shared drives, and unmanaged file locations into SOLIDWORKS PDM Professional. [ get started ](https://bluebyte.biz/contact/) ### PDM Data Cleanup & Reference Repair We help clean messy engineering data before or after a PDM migration. This includes identifying duplicate files, broken references, missing drawings, inconsistent properties, obsolete files, naming issues, and metadata problems so the vault is easier to search, manage, and automate. [ get started ](https://bluebyte.biz/contact/) ### SOLIDWORKS PDM Mass Rename & Renumbering We help engineering teams rename or renumber large groups of files inside SOLIDWORKS PDM while preserving references and minimizing manual cleanup. [ get started ](https://bluebyte.biz/contact/) ### Mass Custom Property Cleanup & Standardization We help engineering teams clean, update, and standardize custom properties across large groups of SOLIDWORKS files and SOLIDWORKS PDM records. [ get started ](https://bluebyte.biz/contact/) Why Blue Byte Systems? ## Engineering Data Migration Specialists We help engineering teams migrate CAD and PDM data without losing references, metadata, or control. 1 **CAD-aware migration team.** We help engineering teams migrate CAD and PDM data without losing references, metadata, or control. 2 **More than file transfer.** We preserve references, map custom properties, align folders, handle naming conflicts, and support revision/lifecycle migration where needed. 3 **Clean, validated data.** We help identify duplicates, broken references, missing drawings, inconsistent metadata, and obsolete files before the final migration. Datasource we work with - FILE EXPLORER (Unstructured) - UPCHAIN - VAULT PROFESSIONAL - VAULT BASIC - TEAMCENTER - WINDCHILL Client Testimonial Amen was given a short timeline and was requested to work outside of Ideal Pase hours. Both were adhered to and surpassed. Wesley D **Ideal Pase** ### Talk to one of our experts #### 30-min Zoom conference to answer all of your questions **Service Categories:** Data Management & System Optimization --- ### [Microsoft Technologies Development](https://bluebyte.biz/service/microsoft-technologies-development/) **Published:** May 4, 2025 **Author:** Amen Jlili **Content:** Service ## Microsoft Technologies Development We build high-performance desktop applications for engineering and manufacturing teams, combining powerful functionality, intuitive user interfaces, and scalable architecture to streamline complex workflows and improve productivity. [ Book a 30-Min Consultation ](#zoom) [ Explore Services ](#services) ![](https://www.shutterstock.com/image-photo/specialist-diligently-oversees-system-security-600nw-2760058217.jpg) At Blue Byte Systems Inc., we design and develop high-performance desktop applications tailored for engineering and manufacturing workflows, native performance, deep data integration, and beautiful, maintainable UI built with MVVM architecture. TECHNOLOGIES WE use WITH: [ .NET 10 ](#) [ .NET FRAMEWORK ](#%20) [ C# ](#) [ PRISM LIBRARY ](#) [ WINDOWS PRESENTATION FOUNDATION (WPF) ](#) [ WINDOWS FORMS ](#) [ UNIVERSAL WINDOWS PLATFORM (UWP) ](#) [ XAML ](#) [ MVVM ](#) What We Deliver ## Discover Blue Byte Systems Inc Microsoft Technologies Services From custom Winforms, WPF controls to full desktop applications, we build for engineering teams that need speed, precision, and deep system integration. ### WinForms Desktop Applications Modernize legacy desktop tools and internal utilities with reliable WinForms applications built for speed, stability, and practical business workflows. [ get started ](https://bluebyte.biz/contact/) ### WPF Desktop Applications Build powerful, modern WPF desktop applications with clean interfaces, scalable architecture, and workflows tailored for engineering and manufacturing teams. [ get started ](https://bluebyte.biz/contact/) ### UWP Desktop Applications Develop modern Windows applications with responsive layouts, polished user experiences, and integration-ready architecture for business and technical environments. [ get started ](https://bluebyte.biz/contact/) ### Enterprise Application Upgrades Upgrade aging spreadsheets, macros, and internal tools into structured desktop applications that improve reliability, reduce errors, and support long-term growth. [ get started ](https://bluebyte.biz/contact/) ### Custom User Controls Create reusable WPF controls for complex workflows, including dashboards, editors, selectors, data grids, validation panels, and system-specific interfaces. [ get started ](https://bluebyte.biz/contact/) ### Advanced UI/UX Design Design clean, intuitive desktop interfaces that simplify complex workflows, improve user adoption, and make engineering software easier to use and maintain. [ get started ](https://bluebyte.biz/contact/) Why Blue Byte Systems? ## Engineering-Centric Desktop Applications Development We build high-performance desktop applications for technical and operational teams, combining modern WPF development with practical workflow design to deliver software that is fast, reliable, and easy to use every day. 1 **Desktop application specialists.** We design and develop purpose-built Windows applications for internal teams, replacing spreadsheets, manual processes, and outdated tools with structured, scalable software. 2 **Built for performance at scale.**Our applications are designed to handle large datasets, complex business logic, live updates, background processing, and responsive UI interactions without slowing users down. 3 **Practical tools that save time.** We help teams eliminate repetitive manual work, reduce errors, and give users clean, dependable applications that support real production workflows. Tech Stack & Capabilities - WPF - C# / .NET - MVVM Pattern - Data Binding - XAML - UWP Client Testimonial Happy with the services provided , quick analysis of my need …. Quick execution….. perfect solution, no issues !! **Engineering Manager** Kevin A, Space Guard Products ### Talk to one of our expertsm #### 30-min Zoom conference to answer all of your questions **Service Categories:** Software Development & Platform Engineering --- ### [CAD Automation & Customization](https://bluebyte.biz/service/cad-automation-customization/) **Published:** May 4, 2025 **Author:** Amen Jlili **Content:** Service ## Custom CAD & Engineering Software Development We help engineering and manufacturing teams automate SOLIDWORKS®, SOLIDWORKS PDM®, Inventor®, and AutoCAD® workflows through custom add-ins, macros, integrations, and data automation tools. Our solutions reduce repetitive modeling tasks, improve file and revision control, eliminate manual errors, and accelerate the delivery of engineering data to production. [ Book a 30-Min Consultation ](#) [ Explore Services ](#services) ![Person working on a CAD design of a red pedal in SolidWorks on dual monitors.](https://bluebyte.biz/wp-content/uploads/2026/05/someone-writing-code.png) We build custom SOLIDWORKS® and SOLIDWORKS PDM® automation tools that help engineering teams reduce manual work, improve data accuracy, and deliver projects faster APPLICATIONS WE INTEGRATE WITH: [ SOLIDWORKS® ](#) [ SOLIDWORKS® PDM ](#) [ SOLIDWORKS® Composer ](#) [ SOLIDWORKS® Simulation ](#) [ SOLIDWORKS® Visualize ](#) [ e-Drawings Professional ](#) [ SAP ](#) [ Salesforce ](#) [ EPICOR ](#) [ Microsoft Dynamics ](#) What We Deliver ## Discover Our Custom Software Development Services End-to-end automation and customization solutions, from single macros to full-featured add-ins integrated into your CAD platform. ### Custom Macros Automate clicks, selections, dialogs, and standard actions using API-driven macros built in VBA. [ get started ](https://bluebyte.biz/contact/) ### Drawing Automation Automatically generate drawing views, annotations, balloons, notes, and tables based on part or assembly metadata. [ get started ](https://bluebyte.biz/contact/) ### Feature & Geometry Builders Create custom features, smart patterns, and parametric geometry using logic-driven feature creation scripts and UI controls built for your design rules. [ get started ](https://bluebyte.biz/contact/) ### Batch Tools Mass update properties, rebuild hundreds of files, or generate outputs (STEP, PDF, DWG) with batch automation tools tailored to your vault or file structure. [ get started ](https://bluebyte.biz/contact/) ### Model Validation & Checks Automatically scan CAD models for missing properties, naming violations, rebuild errors, open sketches, and other user-defined rules. [ get started ](https://bluebyte.biz/contact/) ### Full Add-in Development Our add-ins can include custom toolbars, task panes, property management tools, file export utilities, validation checks, reporting tools, ERP/PLM integrations, and advanced CAD automation features built directly into the user’s daily design environment. [ get started ](https://bluebyte.biz/contact/) Why Blue Byte Systems? ## Engineering-Centric Development We work exclusively with CAD, PDM, and automation tools. 1 **CAD-exclusive team.** Our team works exclusively with CAD, PDM, and automation tools. 2 **Deep expertise in the SOLIDWORKS ecosystem.** Our developers combine mechanical engineering backgrounds with more than 10 years of hands-on experience building solutions for SOLIDWORKS, SOLIDWORKS PDM, and related engineering workflows. 3 **Hundreds of engineering hours saved.** We help teams eliminate repetitive CAD and PDM work while preserving model quality, design intent, and engineering standards. industry-leading expertise in these Custom Apps - VBA MACROS - SOLIDWORKS VSTO MACROS - SOLIDWORKS ADD-INS - SOLIDWORKS PDM ADD-INS - SOLIDWORKS PDM TASK SCRIPTS - SOLIDWORKS PDM TASK ADDINS Client Testimonial Happy with the services provided , quick analysis of my need …. Quick execution….. perfect solution, no issues !! **Engineering Manager** Kevin A, Space Guard Products ### Talk to one of our experts #### 30-min Zoom conference to answer all of your questions **Service Categories:** CAD & PDM Automation --- ## Templates ### [Footer Elementor](https://bluebyte.biz/droit-templates/15153/) **Published:** July 15, 2024 **Author:** Amen Jlili --- ## Royal Mega Menu ### [wpr-mega-menu-item-28493](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-28493) **Published:** May 7, 2026 **Author:** Shahmeer **Content:** ## SOLIDWORKS PDM aDD-INS [ ](https://bluebyte.biz/transition-pdm-file-as-administrator/) ### [ Transition PDM file as administrator ](https://bluebyte.biz/transition-pdm-file-as-administrator/) Bypass permission restrictions and force workflow transitions on any PDM file — great for vault admins managing locked states. [ ](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/) ### [ Folder Columns Manager (Column Sets) ](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/) Quickly configure and save custom column views per folder — tailor what metadata is visible for each team or project area. Customization ## Product downloads [ Download PDMPublisher ](https://bluebyte.biz/wp-json/slm_custom/downloadpdmpublisher) [ PDMDeploy & Docs ](https://docs.bluebyte.biz/src/cdpdm.html) [ Download PDMShell ](https://bluebyte.biz/wp-json/slm_custom/downloadpdmshell) --- ### [wpr-mega-menu-item-22871](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-22871) **Published:** September 7, 2025 **Author:** Shahmeer **Content:** ![Blue Byte Systems Inc. logo featuring a blue geometric arrow symbol on the left and bold blue wordmark on the right.](https://bluebyte.biz/wp-content/uploads/2024/12/Blue-Byte-Inc-Fest-286x126-01.png) As a certified SOLIDWORKS® Solution Partner, Blue Byte Systems develops automation tools, custom add-ins, and integration solutions that help engineering teams work smarter, faster, and more efficiently. [![Certified Solution Partner badge with SOLIDWORKS logo on a red panel bottom half and white top half](https://bluebyte.biz/wp-content/uploads/2026/06/Solution-Partner-Logo-300x300.png)](https://bluebyte.biz/wp-content/uploads/2026/06/Solution-Partner-Logo.png) [ BROWSE ALL PRODUCTS ](https://bluebyte.biz/shop/) SOLIDWORKS® Partner Solution [ ](https://bluebyte.biz/product/pdmpublisher-solidworks/) ### [ PDMPublisher (SOLIDWORKS) ](https://bluebyte.biz/product/pdmpublisher-solidworks/) SOLIDWORKS ADD-IN Batch export and publish SOLIDWORKS files directly from SOLIDWORKS. [ ](https://bluebyte.biz/product/pdmpublisher/) ### [ PDMPublisher ](https://bluebyte.biz/product/pdmpublisher/) PDM PROFESSIONAL task Automate PDF, DXF, STEP, and other exports through SOLIDWORKS PDM tasks. [ ](https://bluebyte.biz/case-study/) ### [ Case Studies ](https://bluebyte.biz/case-study/) Case Studies See how other companies use PDMPublisher to automate SOLIDWORKS and PDM publishing workflows. Data Migration & Management [ ](https://bluebyte.biz/product/pdmshell/) ### [ PDMShell Add-in ](https://bluebyte.biz/product/pdmshell/) PDM Professional Visual coding automation for SOLIDWORKS PDM Professional. Store - [BROWSE PRODUCTS](https://bluebyte.biz/shop) - [CART](https://bluebyte.biz/cart) - [CHECKOUT](https://bluebyte.biz/checkout) --- ### [wpr-mega-menu-item-25148](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-25148) **Published:** November 6, 2025 **Author:** Shahmeer **Content:** ![Blue Byte Systems Inc. logo featuring a blue geometric arrow symbol on the left and bold blue wordmark on the right.](https://bluebyte.biz/wp-content/uploads/2024/12/Blue-Byte-Inc-Fest-286x126-01.png) Practical tutorials, macro examples, and automation strategies for CAD, PDM, and PLM professionals. [ BROWSE ALL POSTS ](https://bluebyte.biz/blog/) Recent Posts ### [ Why Serial Numbers and Folder Number Ranges Keep Your SOLIDWORKS PDM Vault Fast ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) Amen Jlili August 14, 2026 [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) ### [ How to Get a Free PDMPublisher Trial License ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) Amen Jlili August 4, 2026 [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) ### [ Using Claude with SOLIDWORKS PDM through the PDMShell MCP Server ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) Amen Jlili August 1, 2026 [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/using-claude-with-solidworks-pdm-through-the-pdmshell-mcp-server/) ### [ PDMShell vs. PowerShell: The CAD Admin’s Guide to Engineering Automation ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) Amen Jlili June 27, 2026 [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/pdmshell/pdmshell-vs-powershell-the-cad-admins-guide-to-engineering-automation/) Topics SOLIDWORKS [ PDM2Excel ](https://bluebyte.biz/category/pdm2excel/) PDM API [ Macros ](https://bluebyte.biz/category/macros/) C# Automation SOLIDWORKS API VBA [ PDM API Tips ](https://bluebyte.biz/category/pdm-api-tips/) Follow [ X-twitter ](https://x.com/BlueByteSystems) [ Linkedin ](https://www.linkedin.com/company/blue-byte-systems-inc/) [ Youtube ](https://www.youtube.com/c/bluebytesystemsinc) --- ### [wpr-mega-menu-item-22602](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-22602) **Published:** September 1, 2025 **Author:** Shahmeer **Content:** SOLIDWORKS ® [ ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) [ SOLIDWORKS: MASTERING THE SOLIDWORKS API (VBA) ](https://bluebyte.biz/courses/master-the-solidworks-api-course-to-automate-your-workflow-with-vba/) PREMIUM Automate your full SOLIDWORKS workflow using the API and VBA macros SOLIDWORKS® PDM Professional [ ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) [ VBA for Non-Programmers ](https://bluebyte.biz/courses/the-complete-guide-to-solidworks-macro-development/) FREE Zero coding experience? Start here! Learn VBA from absolute scratch for free! [ ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) [ SOLIDWORKS PDM API: Basics with VBA ](https://bluebyte.biz/courses/solidworks-pdm-api-basics-with-vba/) FREE Get hands-on with the PDM API using familiar VBA syntax [ ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) [ SOLIDWORKS PDM API: Write PDM Add-ins in C# ](https://bluebyte.biz/courses/solidworks-pdm-api-write-addins/) FREE Build and deploy fully functional PDM add-ins using C# [ ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) [ SOLIDWORKS PDM API: Data Card Add-in (C#) ](https://bluebyte.biz/courses/solidworks-pdm-api-data-card-add-in/) PREMIUM Create dynamic data card add-ins that interact with PDM metadata [ ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) [ SOLIDWORKS PDM Task Add-in Development (C#) ](https://bluebyte.biz/courses/solidworks-pdm-task-add-in-development-c/) PREMIUM Develop automated task add-ins that run inside the PDM workflow engine Resources - [Video Library](https://bluebyte.biz/courses-2/) - [Request Personalized Training](https://bluebyte.biz/contact) In-Person Classes Join our hands-on SOLIDWORKS & PDM training sessions. [ CONTACT US ](https://bluebyte.biz/contact/) --- ### [wpr-mega-menu-item-22594](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-22594) **Published:** August 31, 2025 **Author:** Shahmeer **Content:** ![Blue Byte Systems Inc. logo featuring a blue geometric arrow symbol on the left and bold blue wordmark on the right.](https://bluebyte.biz/wp-content/uploads/2024/12/Blue-Byte-Inc-Fest-286x126-01.png) Founded in 2020 in Vancouver, Blue Byte Systems specializes in the SOLIDWORKS® ecosystem of products. We provide automation tools, custom add-ins, and integration solutions that help engineering teams work smarter, faster, and more efficiently. [ SCHEDULE A CALL ](https://bluebyte.biz/contact/) SERVICES [ ](https://bluebyte.biz/service/cad-automation-customization/) ### [ SOLIDWORKS® Customization ](https://bluebyte.biz/service/cad-automation-customization/) Develop customization such add-ins for SOLIDWORKS® 3Dxs [ ](https://bluebyte.biz/service/pdm-automation-integration/) ### [ PDM/PLM Integration ](https://bluebyte.biz/service/pdm-automation-integration/) Integrate SOLIDWORKS® or PDM with PLM Systems [ ](https://bluebyte.biz/service/solidworks-pdm-data-migration/) ### [ SOLIDWORKS® PDM Data Migration ](https://bluebyte.biz/service/solidworks-pdm-data-migration/) Data migration and transformation services [ ](https://bluebyte.biz/service/microsoft-technologies-development/) ### [ Microsoft® Software Development ](https://bluebyte.biz/service/microsoft-technologies-development/) Microsoft® desktop apps, Office plugins and Web APIs [ ](https://bluebyte.biz/service/training-enablement-in-person-or-online/) ### [ Training ](https://bluebyte.biz/service/training-enablement-in-person-or-online/) SOLIDWORKS® and PDM online and in-person training Policies - [Terms of Service](https://bluebyte.biz/terms-of-service/) - [Terms of Purchase](https://bluebyte.biz/terms-of-purchase/) ## Career - [SOLIDWORKS API Developer](https://bluebyte.biz/jobs/solidworks-api-developer/) - [Product Manager ](https://bluebyte.biz/jobs/product-manager-pdmpublisher-and-pdmshell/) --- ### [wpr-mega-menu-item-22665](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-22665) **Published:** September 1, 2025 **Author:** Shahmeer **Content:** ###### [Case Studies](https://bluebyte.biz/) - [PDMPublisher](https://bluebyte.biz/case-study/)Workflow Automation ###### [FREE SOLIDWORKS PDM Plugins](https://bluebyte.biz/) - [Transition PDM File As Administrator Add-in](https://bluebyte.biz/transition-pdm-file-as-administrator/) - [Sync Monday.com boards with SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/sync-monday-com-boards-with-solidworks-pdm/) - [Customize Folder Columns Add-in](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/) ###### [VBA MACRO LIBRARY](https://bluebyte.biz/solidworks-vba-macros-library/) [A curated collection of ready-to-use VBA macros for SOLIDWORKS.](https://bluebyte.biz/solidworks-vba-macros-library/) ###### [BLOG](https://bluebyte.biz/solidworks-vba-macros-library/) ### [ Why Serial Numbers and Folder Number Ranges Keep Your SOLIDWORKS PDM Vault Fast ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/why-serial-numbers-and-folder-number-ranges-keep-your-solidworks-pdm-vault-fast/) ### [ How to Get a Free PDMPublisher Trial License ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) [ Read More » ](https://bluebyte.biz/solidworks/solidworkspdm/pdmpublisher/how-to-get-a-free-pdmpublisher-trial-license/) --- ### [wpr-mega-menu-item-22862](https://bluebyte.biz/?wpr_mega_menu=wpr-mega-menu-item-22862) **Published:** September 7, 2025 **Author:** Shahmeer **Content:** ###### [SOLIDWORKS ®](https://bluebyte.biz/) - [📜McMaster Cleanup VBA Macro](https://bluebyte.biz/mcmaster-cleanup-macro/) ###### [SOLIDWORKS ® PDM Professional](https://bluebyte.biz/) - [🧩Transition PDM File As Administrator Add-in](https://bluebyte.biz/transition-pdm-file-as-administrator/) - [🧩Sync Monday.com boards with SOLIDWORKS PDM](https://bluebyte.biz/solidworks/solidworkspdm/sync-monday-com-boards-with-solidworks-pdm/) - [🧩Customize Folder Columns Add-in](https://bluebyte.biz/customise-folders-columns-in-pdm-professional/) ###### [📝BLOG](https://bluebyte.biz/) ###### [📜VBA MACRO LIBRARY](https://bluebyte.biz/solidworks-vba-macros-library/) Blue Byte Systems Inc., founded in 2020 in Vancouver, delivers advanced SOLIDWORKS and PDM solutions. We specialize in customization, automation, data migration, and training with a focus on innovation and client success. --- ## Categories ### [macros](https://bluebyte.biz/category/macros/) --- ### [PDM API Tips](https://bluebyte.biz/category/pdm-api-tips/) --- ### [SOLIDWORKS2022](https://bluebyte.biz/category/solidworks/solidworks2022/) **Description:** Articles and tips about SOLIDWORKS 2022 --- ### [SOLIDWORKSPDM2022](https://bluebyte.biz/category/solidworks/solidworkspdm/solidworkspdm2022/) **Description:** Articles and tips about SOLIDWORKS PDM 2022 --- ### [SOLIDWORKSPDM](https://bluebyte.biz/category/solidworks/solidworkspdm/) **Description:** Articles and tips about SOLIDWORKS PDM Professional. --- ### [SOLIDWORKS](https://bluebyte.biz/category/solidworks/) **Description:** Articles and tips about SOLIDWORKS --- ### [Certification](https://bluebyte.biz/category/solidworks/certification/) --- ### [BOM](https://bluebyte.biz/category/solidworks/solidworkspdm/bom/) --- ### [PDM2Excel](https://bluebyte.biz/category/pdm2excel/) --- ### [data migration](https://bluebyte.biz/category/solidworks/solidworkspdm/data-migration/) --- ### [add-ins](https://bluebyte.biz/category/solidworks/solidworkspdm/add-ins/) --- ### [webinar](https://bluebyte.biz/category/webinar/) --- ### [PDMShell](https://bluebyte.biz/category/solidworks/solidworkspdm/pdmshell/) --- ### [PDMPublisher](https://bluebyte.biz/category/solidworks/solidworkspdm/pdmpublisher/) --- ## Tags ### [solidworks](https://bluebyte.biz/tag/solidworks/) --- ### [solidworks api](https://bluebyte.biz/tag/solidworks-api/) --- ### [vba macro](https://bluebyte.biz/tag/vba-macro/) --- ### [sheet format](https://bluebyte.biz/tag/sheet-format/) --- ### [pdmpublisher](https://bluebyte.biz/tag/pdmpublisher/) --- ### [solidworks pdm notifications](https://bluebyte.biz/tag/solidworks-pdm-notifications/) --- ### [solidworks pdm](https://bluebyte.biz/tag/solidworks-pdm/) --- ### [bill of materials](https://bluebyte.biz/tag/bill-of-materials/) --- ### [data migration](https://bluebyte.biz/tag/data-migration/) --- ### [hawk ridge systems](https://bluebyte.biz/tag/hawk-ridge-systems/) --- ### [solidworks assembly](https://bluebyte.biz/tag/solidworks-assembly/) --- ### [claude](https://bluebyte.biz/tag/claude/) --- ### [trial](https://bluebyte.biz/tag/trial/) --- ### [export pdf](https://bluebyte.biz/tag/export-pdf/) --- ## Product categories ### [Free](https://bluebyte.biz/product-category/free/) --- ### [SOLIDWORKS & PDM Plugins](https://bluebyte.biz/product-category/licensed/) **Description:** Premium products for SOLIDWORKS and SOLIDWORKS PDM Professional --- ## Product tags ### [SOLIDWORKS PDM Add-in (Task)](https://bluebyte.biz/product-tag/solidworks-pdm-add-in-task/) --- ### [SOLIDWORKS Add-in](https://bluebyte.biz/product-tag/solidworks-add-in/) --- ### [Course](https://bluebyte.biz/product-tag/course/) --- ### [Program](https://bluebyte.biz/product-tag/program/) --- ### [PDMPublisher (SOLIDWORKS)](https://bluebyte.biz/product-tag/pdmpublisher-solidworks/) --- ### [Enterprise Support Services](https://bluebyte.biz/product-tag/enterprise-support-services/) --- ### [Trial](https://bluebyte.biz/product-tag/trial/) --- ## Service Categories ### [CAD & PDM Automation](https://bluebyte.biz/service_cat/cad-pdm-automation/) **Description:** Focused on increasing engineering efficiency by automating tasks and workflows inside CAD and PDM environments. --- ### [Data Management & System Optimization](https://bluebyte.biz/service_cat/data-management-system-optimization/) **Description:** Specialized in managing and transforming CAD data while maintaining system integrity and performance. --- ### [Software Development & Platform Engineering](https://bluebyte.biz/service_cat/software-development-platform-engineering/) **Description:** Custom software and tool development for engineering teams, leveraging Microsoft technologies. --- ### [Training, Strategy & Digital Transformation](https://bluebyte.biz/service_cat/training-strategy-digital-transformation/) **Description:** Supporting long-term growth through knowledge transfer, strategic consulting, and process modernization. --- ## Job Categories ### [test](https://bluebyte.biz/job_cat/test/) --- ## Job Locations ### [London, UK](https://bluebyte.biz/job_location/london-united-kingdom/) --- ## Job Type ### [Part-Time](https://bluebyte.biz/job_type/part-time/) --- ## Course Categories ### [SOLIDWORKS](https://bluebyte.biz/course-category/solidworks/) --- ### [SOLIDWORKS PDM](https://bluebyte.biz/course-category/solidworks-pdm/) --- ## Course Tags ### [SOLIDWORKS PDM API](https://bluebyte.biz/course-tag/solidworks-pdm-api/) --- ### [SOLIDWORKS](https://bluebyte.biz/course-tag/solidworks/) --- ### [PDM](https://bluebyte.biz/course-tag/pdm/) --- ### [C#](https://bluebyte.biz/course-tag/c/) --- ### [VBA](https://bluebyte.biz/course-tag/vba/) --- ### [PDM Professional](https://bluebyte.biz/course-tag/pdm-professional/) --- ### [Visual Studio](https://bluebyte.biz/course-tag/visual-studio/) --- ### [VB.NET](https://bluebyte.biz/course-tag/vb-net/) --- ### [Datacards](https://bluebyte.biz/course-tag/datacards/) --- ## Lesson Categories ### [SOLIDWORKSAPI](https://bluebyte.biz/lesson-category/solidworksapi/) --- ### [SOLIDWORKS PDM API](https://bluebyte.biz/lesson-category/solidworkspdmapi/) --- ## Lesson Tags ### [SOLIDWORKS VBA Macro](https://bluebyte.biz/lesson-tag/solidworks-vba-macro/) --- ### [Recorder](https://bluebyte.biz/lesson-tag/recorder/) --- ### [Introduction](https://bluebyte.biz/lesson-tag/introduction/) --- ### [Hello World](https://bluebyte.biz/lesson-tag/hello-world/) --- ### [Writing your first VBA Macro](https://bluebyte.biz/lesson-tag/writing-your-first-vba-macro/) --- ### [Navigating The Visual Basic Editor (VBE)](https://bluebyte.biz/lesson-tag/navigating-the-visual-basic-editor-vbe/) --- ### [VBA Variables and Data Types](https://bluebyte.biz/lesson-tag/vba-variables-and-data-types/) --- ### [Control Structures in VBA](https://bluebyte.biz/lesson-tag/control-structures-in-vba/) --- ### [Subroutines and Functions in VBA](https://bluebyte.biz/lesson-tag/subroutines-and-functions-in-vba/) --- ### [Data Structures in VBA](https://bluebyte.biz/lesson-tag/data-structures-in-vba/) --- ### [Modules and Classes in VBA](https://bluebyte.biz/lesson-tag/modules-and-classes-in-vba/) --- ### [Naming Conventions and Code Comments in VBA](https://bluebyte.biz/lesson-tag/naming-conventions-and-code-comments-in-vba/) --- ### [Debugging VBA Code](https://bluebyte.biz/lesson-tag/debugging-vba-code/) --- ### [Advanced VBA Error Handling](https://bluebyte.biz/lesson-tag/advanced-vba-error-handling/) --- ### [Option Explicit](https://bluebyte.biz/lesson-tag/option-explicit/) --- ### [Events in VBA](https://bluebyte.biz/lesson-tag/events-in-vba/) --- ### [UI and Userforms in VBA](https://bluebyte.biz/lesson-tag/ui-and-userforms-in-vba/) --- ### [Navigate the SOLIDWORKS API Documentation](https://bluebyte.biz/lesson-tag/navigate-the-solidworks-api-documentation/) --- ### [SldWorks Interface](https://bluebyte.biz/lesson-tag/sldworks-interface/) --- ### [Document Management](https://bluebyte.biz/lesson-tag/document-management/) --- ### [System Options and document settings in SOLIDWORKS](https://bluebyte.biz/lesson-tag/system-options-and-document-settings-in-solidworks/) --- ### [Managing Custom Properties in VBA](https://bluebyte.biz/lesson-tag/managing-custom-properties-in-vba/) --- ### [Traversing the Feature Tree in SOLIDWORKS (Design Tree)](https://bluebyte.biz/lesson-tag/traversing-the-feature-tree-in-solidworks-design-tree/) --- ### [Selection Basics (ISelectionMgr)](https://bluebyte.biz/lesson-tag/selection-basics-iselectionmgr/) --- ### [Configuration Management (IConfigurationManager)](https://bluebyte.biz/lesson-tag/configuration-management-iconfigurationmanager/) --- ### [Advanced Selection with SelectById2](https://bluebyte.biz/lesson-tag/advanced-selection-with-selectbyid2/) --- ### [Document Creation with Templates](https://bluebyte.biz/lesson-tag/document-creation-with-templates/) --- ### [Working with Bodies (IBody2 amd IPartDoc)](https://bluebyte.biz/lesson-tag/working-with-bodies-ibody2-amd-ipartdoc/) --- ### [Traversing geometrical entities (IEntity](https://bluebyte.biz/lesson-tag/traversing-geometrical-entities-ientity/) --- ### [IEdge](https://bluebyte.biz/lesson-tag/iedge/) --- ### [IVertex](https://bluebyte.biz/lesson-tag/ivertex/) --- ### [Face2)](https://bluebyte.biz/lesson-tag/face2/) --- ### [Reference Geometry](https://bluebyte.biz/lesson-tag/reference-geometry/) --- ### [Sketching: How to create a sketch and make extrude features](https://bluebyte.biz/lesson-tag/sketching-how-to-create-a-sketch-and-make-extrude-features/) --- ### [The IEntity Interface](https://bluebyte.biz/lesson-tag/the-ientity-interface/) --- ### [Managing Features via suppression](https://bluebyte.biz/lesson-tag/managing-features-via-suppression/) --- ### [Traversing an assembly component tree](https://bluebyte.biz/lesson-tag/traversing-an-assembly-component-tree/) --- ### [Component Referenced Configuration](https://bluebyte.biz/lesson-tag/component-referenced-configuration/) --- ### [Inserting Components into an Assembly](https://bluebyte.biz/lesson-tag/inserting-components-into-an-assembly/) --- ### [Advanced selection techniques for creating mates](https://bluebyte.biz/lesson-tag/advanced-selection-techniques-for-creating-mates/) --- ### [Mating Components (IMate)](https://bluebyte.biz/lesson-tag/mating-components-imate/) --- ### [Creating Drawing Documents with Pre-defined Views](https://bluebyte.biz/lesson-tag/creating-drawing-documents-with-pre-defined-views/) --- ### [Drawing Annotations](https://bluebyte.biz/lesson-tag/drawing-annotations/) --- ### [Creating A Bill Of Materials](https://bluebyte.biz/lesson-tag/creating-a-bill-of-materials/) --- ### [Assembly DXF Exporter](https://bluebyte.biz/lesson-tag/assembly-dxf-exporter/) --- ### [Setting up your programming environment](https://bluebyte.biz/lesson-tag/setting-up-your-programming-environment/) --- ### [Hello Vault program in VBA](https://bluebyte.biz/lesson-tag/hello-vault-program-in-vba/) --- ### [How to get the IEdmFile5 interface in the SOLIDWORKS PDM API](https://bluebyte.biz/lesson-tag/how-to-get-the-iedmfile5-interface-in-the-solidworks-pdm-api/) --- ### [Logging into the Vault using LoginAuto and Login](https://bluebyte.biz/lesson-tag/logging-into-the-vault-using-loginauto-and-login/) --- ### [Traversing the folder tree structure in a PDM vault with the API](https://bluebyte.biz/lesson-tag/traversing-the-folder-tree-structure-in-a-pdm-vault-with-the-api/) --- ### [Checking files in and out of the vault using the API](https://bluebyte.biz/lesson-tag/checking-files-in-and-out-of-the-vault-using-the-api/) --- ### [Read and editing data variables with the IEdmEnumeratorVariable5 interface](https://bluebyte.biz/lesson-tag/read-and-editing-data-variables-with-the-iedmenumeratorvariable5-interface/) --- ### [Course Requirements](https://bluebyte.biz/lesson-tag/course-requirements/) --- ### [Introduction to the SOLIDWORKS PDM API - VBA Course](https://bluebyte.biz/lesson-tag/introduction-to-the-solidworks-pdm-api-vba-course/) --- ### [SOLIDWORKS PDM API](https://bluebyte.biz/lesson-tag/solidworks-pdm-api/) --- ### [PDM Add-ins Requirements](https://bluebyte.biz/lesson-tag/pdm-add-ins-requirements/) --- ### [Creating the Visual Studio Class Library Project](https://bluebyte.biz/lesson-tag/creating-the-visual-studio-class-library-project/) --- ### [Implementing the IEdmAddIn::GetAddInInfo Method](https://bluebyte.biz/lesson-tag/implementing-the-iedmaddingetaddininfo-method/) --- ### [Implementing the IEdmAddIn::OnCmd Method](https://bluebyte.biz/lesson-tag/implementing-the-iedmaddinoncmd-method/) --- ### [How to Add a PDM Add-in to the Vault](https://bluebyte.biz/lesson-tag/how-to-add-a-pdm-add-in-to-the-vault/) --- ### [How to Debug a PDM Add-in In Visual Studio](https://bluebyte.biz/lesson-tag/how-to-debug-a-pdm-add-in-in-visual-studio/) --- ### [Closing remarks for writing PDM add-ins in C#](https://bluebyte.biz/lesson-tag/closing-remarks-for-writing-pdm-add-ins-in-c/) ---