SolidWorks PDM API: Send a Selected PDF + Description via an Add-in Menu Command

Developing a new automation can be an intricate process, especially when it involves understanding the mechanics behind the SolidWorks PDM (Product Data Management) API. This webinar, hosted by Braxton from MLC CAD Systems, aims to demystify the PDM process for developers, particularly those new to the landscape of PDM systems.

 

Understanding PDM: The Starting Point

Braxton opens the session by sharing the origins of this webinar, rooted in the experiences of onboarding a new developer who transitioned from C, C# programming to the realm of PDM. The pivotal insight was recognizing that a simple request often necessitated a deeper understanding of what PDM is doing with the file.

 

The Process Flow in PDM Automation

At the heart of this session is an automation sequence that illustrates a complete cycle—from a user selecting a drawing PDF in a PDM vault view to sending the file and its description for processing. The presentation dissects this workflow into comprehensible parts, with the primary focus on the initial steps of identifying the selected file, retrieving its data card information, and the integration within the SolidWorks PDM interface.

 

Key Considerations for Success

A critical part of the project initiation is defining what success looks like. For this automation, success is the user executing a command to send the file for processing, with the system accurately receiving the file and its description. Braxton emphasizes the importance of user feedback, noting that in the case of failure, users should receive informative messages rather than being left in the dark.

 

One must ask three crucial questions at the onset: Which file did the user select? What does its data card say? Is the version on the computer the desired one? Understanding the relevance of the “Get Latest Version” command is essential. A small test program is suggested to clarify these aspects before progressing towards integrating these behaviors into the PDM menu command, forming the webinar’s framework.

 

Leveraging the IEDM Vault 5 Object

The IEDM Vault 5 object is pivotal as it navigates through the PDM API lens, serving as the connection to the vault. This object allows users to connect, identify the file and folder paths within the vault, and distinguish between file records and local cache contents.

 

Handling Data Cards and Version Retrieval

Braxton describes how PDM records recognize files and folders, but additional steps are required to retrieve the actual file bytes onto the disk. This involves asking the PDM for the file copy and specifying the version if necessary. The next challenge is reading the data card description from the file, which involves interacting with the PDM’s objects and interface versions.

 

Implementing the Send for Processing Command

The session dives into the integration of the “Send for Processing” command into the PDM context menus, requiring the creation of an add-in. This add-in provides essential methods that PDM uses to recognize and execute the command, detailing the lifecycle from development to user interaction.

 

Overcoming Add-in Challenges

Debugging an add-in is nuanced as PDM loads it within its process, necessitating specific debugging strategies. Attention must also be given to proper COM registration to ensure PDM identifies the add-in class correctly. Braxton advises attendees to separate tested operations from their host entry points for effective debugging.

 

Conclusion: A Strategic Approach to PDM Projects

Through this webinar, Braxton conveys the importance of structured and observable questions that make API learning less daunting. By clarifying each functional step, the mystery surrounding failures decreases, paving the way for a smoother development experience.

 

For teams embarking on PDM projects, it is advised to start with a clear result in mind. Define the expected outcome in PDM, identify critical file and data card values, and prepare to address potential process failures. MLC CAD Systems stands ready to support development efforts, offering collaborative approaches or complete solutions as needed.

 

Thank you for joining us as we explore the intricacies of SolidWorks PDM API and the journey from concept to successful execution.

Technical Support

Get help from our team by Calling us at (800)364-1652 → Press 1 (Support)
          → Press 2 (CAD)
          → Press 3 (3D Printing)

 

You can also get assistance by clicking the Technical Support button or the Email Our Experts button below. 

Not sure what you need?

If you prefer to reach out to us directly, we have a team of Experts ready to help! 

About the author

Scroll to Top