AnsweredAssumed Answered

How to make custom references show under "Contains" tab in PDM with API?

Question asked by Samuel Fanfan on Feb 13, 2020

Hi,

 

I've been trying to figure out how to add reference programmatically to a file. I've been following the example here (2016 SOLIDWORKS API Help - Add Custom File Reference Example (C#) ) and editing as needed so it fits my use case. The issue I now have is in PDM, after the code runs, I can select the file and click the "Contains" tab. Nothing is listed in this view as referenced, but when I press the "Custom References" toolbar button in the "Contains" subwindow, I can then see the custom references. Let's call the file getting all the references set to it the "rootFile". If, at this point, I check out the root file, make any kind of minor edit that forces a new version, and check in the new version, the "Contains" tab view suddenly displays all the added custom references. How can I achieve this without have to check the file in and out? Is there a more straightforward way to make PDM show the custom references in the "Contains" view from the get-go? Thanks in advance.

Outcomes