# How to add AI to SOLIDWORKS PDM Professional without sending files to a cloud

> Source: https://netray.co/erp-help/private-ai-layer-solidworks-pdm-on-prem-architecture
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

Read vault metadata and file content through the PDM API (the EdmLib COM and .NET interfaces), not by querying the SQL Server vault database, index the results locally, and serve an open-weight model on your own GPUs. Permissions must be mirrored from PDM groups, folders and workflow states into the retrieval layer.

## Kind

advanced

## System

on-prem-apps

## Erp

SOLIDWORKS PDM Professional

## Module

Private AI layer / PDM API / SQL Server

## Query

how to add AI to SOLIDWORKS PDM Professional

## Alternate Queries

- SOLIDWORKS PDM AI integration on-prem
- SOLIDWORKS PDM API search files with AI
- chat with SOLIDWORKS PDM vault
- SOLIDWORKS PDM private LLM

## Applies To

SOLIDWORKS PDM Professional on a Microsoft SQL Server vault database, recent annual releases, archive server file storage. Standard (SQL Express) installs are possible but small.

## Steps

### Reference build for a private AI layer on PDM Professional

**Items:**

- Decide what to answer: file search by data card variables, where-used and references, revision and state history, BOM data card fields, and Q and A over drawings' PDF and document content.
- Build a small .NET service on a domain-joined server that references the PDM API, logs in to the vault and exposes named read actions to the tool server.
- Run an extraction job that walks folders, reads data card variables for each latest or released version, and writes metadata plus text (PDF and Office content) to a local index.
- Mirror permissions: capture folder permissions, workflow state permissions and group membership, store an access marker per indexed file, and enforce it in retrieval.
- Serve an open-weight model with vLLM or Ollama on local GPUs and keep embeddings local. No outbound access.
- Keep the vault database untouched except for supported maintenance. Do not run custom queries against it from the assistant.
- Phase in read-only search, then drafted outputs such as release notes, then workflow transitions through the API after human approval.

## Sections

### Real data paths in PDM Professional

**Body:**

PDM Professional keeps metadata, version history, workflow state and permissions in a SQL Server vault database, and stores file contents on the archive server. The database schema is not published as a stable contract, so queries against it can break after an upgrade and bypass the vault's own permission checks. The supported surface is the PDM API: IEdmVault5 and related interfaces, available as a COM library and through .NET interop.

Data card variables are the practical metadata. Each variable is mapped to file properties and to database values, and can be read per file version. References (for example assembly to part) are exposed through the reference interfaces. Reading files requires the PDM client or API to get a local copy, which is the right place to extract text from PDFs and Office files.

**Code:**

// C# sketch, PDM API (verify interface names against the API help for your release)
IEdmVault5 vault = new EdmVault5();
vault.LoginAuto("EngVault", 0);
IEdmFolder5 folder;
IEdmFile5 file = vault.GetFileFromPath("C:\\EngVault\\Released\\A-10045.SLDPRT", out folder);
IEdmEnumeratorVariable5 vars = (IEdmEnumeratorVariable5)file.GetEnumeratorVariable("");
object description;
vars.GetVar("Description", "@", out description);

### Reference architecture

**Body:**

Because PDM is Windows and SQL Server centred, keep the AI layer simple: one Windows service running the API extraction, a Linux or Windows tool server, a vector index, and a GPU host. The extraction service writes an incremental index keyed on file id and version, triggered by a schedule. PDM tasks or add-ins can raise events for released files if you want near real time updates.

A reporting copy of the SQL Server database is tempting for analytics, but with an undocumented schema it should be used only for coarse counts that you validate against the API. Prefer API-built extracts so that metadata means what the data card says it means.

Air-gapped sites are a natural fit. The vault, archive server, extraction service, index and model host can all sit in one enclave and exchange nothing with the internet.

### Permissions and write-back

**Body:**

PDM decides access through users and groups, folder permissions and workflow state permissions. An integration that logs in with a single service account sees what that account sees. Export the effective read permission per folder and state into an access marker per indexed file, filter retrieval by the caller's groups, and re-verify by an API read of the file before quoting its content.

Write actions available through the API include changing state, updating variables on a checked-out file and adding comments. Present the exact change to the user, perform it with an account that has the user's rights where practicable, and log it. Check-in, release and ECO style state moves stay human decisions.

### Sizing, limits and honest trade-offs

**Body:**

PDM sites are often small to mid sized. A team of 20 to 100 users with a vault of a few hundred thousand files usually fits one GPU of 24 to 48 GB with a 14B to 32B class model, plus a modest CPU server for extraction. Index size is typically single to low tens of GB. Heavier models are rarely needed for metadata and document Q and A.

Limits: the assistant cannot interpret native SOLIDWORKS geometry. Data card quality drives answer quality, so messy descriptions produce messy answers. If you only need fast file and property search, PDM's own search and the Windows search index may be enough, and a simpler read-only report tool can be better than a language model.

## Pitfalls

- Querying vault tables directly with an undocumented schema and treating the answer as permission safe.
- Indexing latest versions only and then quoting them as released. Store state and version with each chunk.
- Running the extraction as a vault administrator and exposing everything to everyone.
- Ignoring replication: multi-site vaults hold different archive copies, so extraction should target one authoritative site.
- Expecting the model to read SLDPRT or SLDDRW internals. Use exported PDFs and data card fields.

## Ai Angle

A grounded assistant on PDM answers 'show released drawings for this customer that reference this part' by calling reference and data card reads, then lists the files with state and version. Netray builds this as a custom private layer with local models, mirrored permissions and an audit log.

## Faq

### Can I just query the SQL Server vault database?

**Answer:** It works for quick counts, but the schema is not a public contract, can change between releases, and ignores the vault's permission model. Use the PDM API for anything a user will read, and keep database queries to validated, aggregate reporting.

### Does this work with PDM Standard?

**Answer:** PDM Standard and PDM Professional differ in capabilities and database engines. The same pattern can apply, but check API availability and licence terms for your edition before planning, and expect smaller scale limits.

### How do I stop the AI showing restricted files?

**Answer:** Store an access marker per indexed file, filter retrieval by the caller's groups and re-check by an API read. Where you cannot mirror a rule, exclude that folder from the index.

### Is a GPU required?

**Answer:** For a useful local language model, yes, though a pilot can run quantised small models on a single workstation GPU. Search without a language model needs no GPU, and may be all some teams need.

## Search terms

SOLIDWORKS PDM AI, SOLIDWORKS PDM API, PDM Professional on-prem AI, chat with PDM vault, SOLIDWORKS PDM data card search, EdmLib IEdmVault5, PDM private LLM, PDM RAG

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
