US$0.00
0

Category: SOLIDWORKSPDM

How To Edit PDM Datacard Using VBA Macro

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– 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. Step 2: Setting References and Connecting to the Vault Before you can start editing the PDM files, we need to make sure that the references are correctly connected to the PDM vault. Let’s do that– 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 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 codefilePath = “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- 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.

Read More »

Export SLDPRT and SLDASM to HTML with PDMPublisher

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 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: 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 Automated Exports: The PDMPublisher Way 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.

Read More »

Export SOLIDWORKS PDM BOMs to XLSX with thumbnails – PDM2Excel

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. 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, 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… 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: 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 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.

Read More »

Top 5 reasons to start using PDM2Excel to start exporting PDM BOMs to Excel

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. 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 that fits your workflow. Key Features 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 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: 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.

Read More »

New for 2022! SOLIDWORKS PDM API Things You Can Do…They’re pretty cool.

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. The API help has a straightforward example on how to use it. 2. You can destroy deleted items from a folder You can now destroy files that you have deleted in a folder. Previously, this was not possible with the IEdmFolder12 interface. The interface has been extended by the IEdmFolder13. You can access the docs example here. 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. 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. 4. Access to more user settings You can specify some killer user settings from a new interface IEdmUser11::SetSettingsVar. The settings are: EdmUSv_AutoDelete 9 = 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

Read More »
0
    0
    Your Cart
    Your cart is emptyReturn to Shop