The Power of the PDM API Explained: Part 1

Blog 5.14.2019 No Comments

This is the first post in a series PDM management and integration by Guy Edkins. If you have any need for SOLIDWORKS PDM customization, do not hesitate to contact us.

When SOLIDWORKS Corporation purchased Conisio (the creators of EPDM) in 2006, it quickly become the mainstay of file management for SOLIDWORKS files. PDM Workgroup, the first file manager for SOLIDWORKS, simply could not hold up in the face of rapid business globalization. Sharing files across countries and continents became the principal downfall for companies trying to share large amounts of data across multiple sites in Workgroup PDM.

SOLIDWORKS EPDM was rebranded in late 2016 to PDM Standard and PDM Professional with PDM Workgroup being deprecated and replaced by PDM Standard. Standard and Professional are both SQL-based tools which lends a higher level of all around capability to the platform.

Today PDM Professional is SOLIDWORKS primary tool for SOLIDWORKS file management. Additionally, PDM Pro can manage just about any file type equally as well as it can SOLIDWORKS files. Companies around the world now rely on PDM Pro to provide document management for multiple departments across multiple disciplines. The operative word in the last sentence is document. Make no mistake: PDM Pro, while an expansive product is a document manager, is not a records manager as is the case with any standard PLM system such as Agile, Windchill, or TeamCenter. That being said, a large niche for PDM Pro exists in the enterprise environment.

Twenty-five years ago as a consultant to engineering industry, I was often asked by clients, How do we choose the right data management software? My answer has not changed one bit from those days: buy the best tool that fits your primary needs and has a robust, sophisticated API to allow customization. Further, I would prefer a tool that uses accepted industry standards. A company can rarely go wrong under these guidelines.

Industrial software of any kind rarely provides 100% of the needed functionality out of the box. Even if it does provide the functionality, it might not provide it in an efficient manner. Hence the need to integrate business systems using an API. This where SOLIDWORKS PDM Professional shines.

Consider PDM from an integration standpoint. First and foremost, PDM Pro runs on top of Microsoft SQL Server. MS SQL is now number two behind Oracle in total sales of RDBMS, although in 2016 MS SQL grew faster than Oracle did: 10.3% versus 3.3%. Consequently, it is safe to say PDM Pro is running on an established standard database technology. PDM is a Microsoft OS only tool and therefore runs in an established operating system. This alone gives it great flexibility as far as interacting with the OS and other MS toolsets.

The real crown jewel of PDM, however, is its API: a rich programming library that allows companies to customize at will and integrate PDM with their business systems, creating seamless data transmission and removing any need for double data entry within an enterprise. If the API doesn’t contain the tools necessary, many times data can be read from SQL database directly. As a result, the possibilities are endless for integrations with other systems, whether passing single fields of data found in PDM data cards to passing entire PDM BOMs to MRP and ERP systems. Even linking PDM to the newer cloud based business and PLM systems is possible with via web services, typically utilizing REST technology.

CADSharp has created numerous integrations for our customers within the PDM environment. From task addins to complex web services integrations, each piece of software we write one has increased efficiencies across departments and resulted in immediate bottom-line savings. In the coming months this blog will highlight some of the integrations specifically. Stay tuned!

How has the SOLIDWORKS Professional PDM API benefited you? Let us know in the comments!

Want to keep up with future content and training events? Sign up for our newsletter.

Leave Comment

What’s New In the 2019 SOLIDWORKS API

Blog 3.4.2019 No Comments

Another year, another round of great updates for the SOLIDWORKS API. Although I’m not going to change the title of this blog series, this post is also going to contain updates for the PDM API and Document Manager API as well. Anyway, the continual improvement of these APIs should give amateur and professional developers confidence that SOLIDWORKS Corporation is investing in their API for the long-haul.

Below are lists of the most notable API calls and interfaces added in the 2019 versions of SOLIDWORKS, PDM, and Document Manager. You can see all additions and their related API calls in the Release Notes article in the API Help. You can find it in the local API Help by searching for “Release Notes” in the category tab. Note that the local API Help Release Notes will only be as up-to-date as the service pack you have downloaded.

New SOLIDWORKS API Calls and Interfaces
  • Access Bounding Box feature data.
  • Access Ground Plane feature data.
  • Access Tab and Slot feature data.
  • Convert an existing balloon to a stacked balloon.
  • Create a geodesic sketch offset along the curvature of a surface.
  • Create a pattern feature with a smaller subset of parameters and then extend or modify
    it using a pattern-specific feature data object.
  • Create an assembly mate with a smaller subset of parameters and then extend or
    modify it using a mate-specific feature data object.
  • Get a component’s suppression state or, if an internal ID mismatch exists, an error
  • Get an annotation’s text scale in the 3D View.
  • Get data from the Hole Wizard database.
  • Get or set more properties on linear, linear component, and circular component pattern
  • Get or set more table column types, including the equation-driven type.
  • Get or set the orientation of text in table cells.
  • Get or set whether an angle or distance mate is a limit mate.
  • Get or set whether to bidirectionally project a curve.
  • Get or set whether to enable the pushpin of an add-in’s callout.
  • Get or set whether to enable the Select Identical Components menu item in the
    context menu of a PropertyManager page selection box.
  • Get or set whether to exclude a component from the bills of materials in specified
  • Get or set whether to generate a display list for a part’s configuration.
  • Get or set whether to load external references in memory when opening a document.
  • Get or set whether to reverse the direction of a specified reference of a reference plane
  • Get the error status of an assembly mate.
  • Insert a Delete Hole feature for selected hole edges on a surface.
  • Insert, open, and update models developed in other CAD packages.
  • Repeatedly detect collisions among groups of components in a variety of
  • Specify whether to include a specified component when saving an assembly as a part.
New PDM API Calls and Interfaces

New API calls

  • Add users by login type to the vault. See IEdmUserMgr10::AddUsers3.
  • Get whether a specified user must add a state change comment for specified workflow transitions for specified documents. See IEdmVault20::GetTransitionCommentPermissions.
  • Get specified files from a vault. See IEdmVault20::GetFiles.
  • Get the archive server log. See IEdmVault20::GetArchiveServerLog.

New structure

  • EdmDocIds. Contains information about one document in the vault. Used in IEdmVault20::GetFiles.
New Document Manager API Calls and Interfaces

New API calls

  • ISwDMDocument23::GetLicenseType

Improved API calls

  • ISwDMConfiguration16::GetCutListItems (obsoletes ISwDMDocument13::GetCutListItems2)
  • ISwDMConfigurationMgr2::GetConfigurationByName2 (obsoletes
  • ISwDMConfigurationMgr::GetConfigurationByName)
  • ISwDMConfigurationMgr2::GetConfigurationCount2 (obsoletes ISwDMConfigurationMgr::GetConfigurationCount)
  • ISwDMConfigurationMgr2::GetConfigurationNames2 (obsoletes ISwDMConfigurationMgr::GetConfigurationNames)
VSTA 1.0 End-Of-Life Announcement

VSTA 1.0, which was the only way a developer could create .NET macros up until SOLIDWORKS 2018, is going to be replaced entirely by VSTA 3.0 macros in SOLIDWORKS 2021, meaning that SOLIDWORKS 2020 is the last version that will support VSTA 1.0. I wrote about my opinion about VSTA 3.0 last year but I’ll reiterate here what I said then: I have no intention of using VSTA / .NET macros anymore. Its so much simpler to just set up a stand-alone sandbox if one needs to test .NET code.

Anyway, if you want to hear the official announcement concerning VSTA 1.0, it was delivered by Daniel Seaman of SOLIDWORKS Corporation in his presentation “Upgrading SOLIDWORKS Macros to Visual Studio Tools for Applications 2015”. This is the same presentation he delivered at SOLIDWORKS World 2018, FYI. I am not sure when they will post the video of this year’s presentation (if it was even recorded) so here are the instructions for watching his 2018 presentation:

1. Visit the SolidWorks World 2018 agenda
2. Search the Sessions tab for the name “Seaman”
3. The result for “Upgrading SOLIDWORKS Macros to Visual Studio Tools for Applications 2015” should appear and you can click Watch Video on the right (requires a free account)

Does anything we’ve covered stand out to you as particularly useful or exciting? If so then let us know in the comments!

Want to keep up with future content and training events? Join our newsletter!

Leave Comment

How To Ask A Good Programming Question

Blog 3.1.2019 No Comments

In a hurry? Skip right to the section called Guidelines for the meat of this article.


Over one year ago we introduced tech support through Slack, where you can ask your SOLIDWORKS API and PDM API questions to our team and get high-quality answers within hours or even minutes. Our members have absolutely loved it for its speed and simplicity. But whether you’re posting in our Slack, the SOLIDWORKS API forum, or StackOverflow for a general programming question, these four little words carry so much truth:

“Help us help you.”

Indeed, one of the most frustrating parts of using any technical support resource, whether you’re helping others or simply doing research, is wading through a long thread in which the experts are trying to extract all of the necessary information from the asker so they can actually offer help. Technical help sites like StackOverflow deal with this problem by using a Q&A format instead of a forum / thread format, but they still constantly delete low-quality questions in which the asker didn’t “help us help you”.

All of this to say: asking a well-written programming-related question takes a lot of effort and is not intuitive to many askers. In this post I hope I can give you some clear-cut rules for guaranteeing that your question conveys all of the information necessary for an expert to help you get the answer you need as quickly as possible. By doing so you will protect your time and theirs.


1. Keep it short, simple, and to the point

a. Your first sentence should state your question or summarize your problem.
b. Questions with unnecessary details and background explanations are harder to answer.
c. Use a bullet or number list to convey details. They’re easier to read than paragraphs.
d. Break complicated problems down into smaller problems and post about each problem separately.

2. Share the minimum amount of info necessary to completely convey the problem

a. Please post any relevant code. If you do post code:
    i. Only include code that is necessary to repeat the problem.
    ii. Your code should compile. Do not post a code snippet that others are forced to complete in order to test.
b. If you’re getting an error message, share that error message and what line it occurs on.
c. If your problem occurs only under a certain situation in SolidWorks (e.g., when a certain model is oepn):
    i. State specifically what that situation is.
    ii. Include the simplest possible model that includes that situation, if necessary.

3. Proofread your question

a. At CADSharp, we speak over fifteen languages between all of our technical support representatives. If you would prefer to receive help in another language, just ask. But no matter what language you use, be sure to proofread your question so its as clear as possible.


Let me share an example of poor a question / request:


My boss has asked me to write some macros that prepare our models for-check in. The macro needs to check each part and add a Material property if it doesn’t exist. Should also put the Description property in each configuration and the delete the Author property. Works on my test models but stopped working on my production models. Here is the code:

swModel.DeleteCustomInfo2("Default", "test")


Unfortunately, this help request is so lacking that I would be wasting my time even trying to help this person. The main reason is that I would be guessing as to what their problem is and might potentially solve a problem they don’t have. Specifically, this is how this question should be improved:

1. Clarify whether the macro is run in a part, assembly, or both.
2. Clarify whether custom properties are supposed to be added to assembly components or only part components.
3. Clarify whether the Description property is supposed to be moved or copied.
4. Clarify whether the Author property is deleted from the document-level custom properties, the configuration-level custom properties, or both.
5. Use bullet or number lists to differentiate the different problems.
6. Give an explanation of what “stopped working” means. Does it mean the macro runs successfully but produces incorrect results or does it mean that an error occurs (and what is the error message)? Does it refer to some or all of the tasks?
7. Include the full source code.
8. Include a sample model.

Obviously this is an exaggerated example, but I have read some help requests before like this. Keep in mind: technical support cannot read your mind. Instead of assuming they are familiar with your workflow (simply because it makes so much sense to you!), put yourself in their shoes and ask, “What would they need need to know to solve my issue?”

The XY Problem

The above guidelines assume that the asker knows what their problem is. Sometimes, this isn’t the case, and it can waste a lot of time for both the asker and the support technician. The situation I’m speaking of is known as the XY Problem. It occurs when someone asks for help with their attempted solution rather than their actual problem. A good example in the SOLIDWORKS API world would be someone asking for help on getting a point on a face so they can select it with IModelDocExtenion.SelectByID2, when in reality they should have simply asked for help on how the best way to select a particular face, because the aforementioned API call is not appropriate for selecting faces.

Basically, the XY Problem is a technical term to describe askers who are ignorantly pursuing the wrong solution. While its great to encourage people to step back and think, “What problem am I actually trying to solve?”, the XY problem itself is problematic for two reasons:

1. Sometimes its just as much a waste of time to wade through lots of background information on the problem only to discover that the user was pursuing the correct solution.
2. The simple fact is that much of the time the asker will not know enough about the subject at hand to know whether they are asking the wrong the question. In that case, it is the support technician’s responsibility to ask the questions necessary to uncover the actual problem.

I get the impression that this term was coined by support technicians or forum participants who easily get annoyed helping askers — which is frequently the case on sites like StackOverflow, some of whose users are known for their alarming rudeness and presumptuousness.

When you use CADSharp’s technical support, you can be assured that even if you’re asking the wrong question, you will always be treated with kindness and patience, because its our pleasure to help you reach your SOLIDWORKS API and PDM API automation goals.

Helping you help us help you,

Want to keep up with future content and training events? Sign up for our newsletter.

Leave Comment