How to Create a Card List from SQL Database in SolidWorks PDM
In mechanical engineering, precision matters — not just in design, but also in how data is handled. If your team is manually entering data into SolidWorks PDM cards, you’re opening the door to typos, inconsistencies, and wasted time. A better solution? Dynamically populated card lists using SQL queries. This guide shows you how to connect a card list to your SQL database to automate dropdowns like project names, supplier codes, or material types.
What Is a Card List in PDM?
A card list in SolidWorks PDM is a dropdown menu that appears on a data card. It allows users to select predefined values rather than typing them in manually. These lists can be:
- Static: manually created and maintained inside the admin tool
- Dynamic (SQL-based): automatically populated from an external or internal database
In this guide, we focus on dynamic lists — specifically, how to pull values directly from a SQL table.
Why Use a SQL-Based Card List?
Instead of maintaining dropdown values manually, you can link the list to a live database. Benefits include:
- Automatic updates when records change (e.g. new suppliers or part categories)
- Data consistency, avoiding typos or non-standard naming
- Centralized control, especially useful in distributed engineering teams
For example, if you maintain a Projects table in SQL, linking it to your card ensures that all engineers see the same project names in real time.
Prerequisites
Before you begin:
- You need admin rights in the PDM Admin tool.
- You must have read access to the SQL Server that contains the source data.
- Basic knowledge of SQL queries helps.
- Back up your vault and test changes in a staging environment before deploying to production.
Step-by-Step: Creating a SQL-Based Card List
1. Identify or Create the SQL Table
Ensure your SQL Server contains the table or view with the data you want to display. For example:
CREATE TABLE Projects (
ProjectID INT PRIMARY KEY,
ProjectName NVARCHAR(100)
)
Add a few sample rows to test with.
2. Write and Test Your SQL Query
Use SQL Server Management Studio to test a simple SELECT query. For example:
SELECT ProjectName FROM Projects ORDER BY ProjectName
Troubleshooting Common Issues
Bonus: Filtering Lists Dynamically
You can use PDM variables in your query for advanced behavior. For example, filter by logged-in user:
SELECT ProjectName FROM Projects WHERE AssignedTo = '%username%'
Or filter by file type or folder path using %filename%, %path%, etc.
Conclusion
Dynamic card lists are a simple but powerful upgrade to your SolidWorks PDM setup. By connecting them to your SQL database, you reduce errors, enforce consistency, and automate tedious admin work.
Now that you know how to create SQL-based lists, consider applying this technique to any field in your data cards that relies on centralized or frequently changing data — and take one more step toward cleaner, smarter engineering workflows.
Let me know if you want a downloadable PDF version or a version formatted for web publishing.