Refreshing datacard in File Explorer after updating values? SOLIDWORKS PDM

I’m using IEdmEnumeratorVariable8.SetVar to update variables on a PDM data card, but these changes are not reflected immediately in the card view. I know that calling IEdmEnumeratorVariable8.CloseFile(true) will commit these changes, but the card view doesn’t refresh automatically.

I know that using IEdmBatchUpdate2 does provide a way to refresh or update the UI but I am not in a position to do that.

The SOLIDWORKS PDM API provides the IEdmCardView63.Update method, which seems like it might refresh the UI. However, the documentation isn’t explicit about whether it refreshes the card after calling SetVar.

Can anyone confirm if IEdmCardView63.Update forces the data card UI to refresh after variable changes made through SetVar? If not, what’s the recommended way to programmatically refresh the card view?

API Methods in Question:

  • IEdmEnumeratorVariable8.SetVar
  • IEdmEnumeratorVariable8.CloseFile(true)
  • IEdmCardView63.Update
  • IEdmBatchUpdate2

SOLIDWORKS PDM Version: Professional 2023

The only way I have done this successfully is when using one of the Card Triggers

You have to retrieve IEdmEnumeratorVariable8 object from poCmd.mpoExtra

You do NOT need to call CloseFile method after setvar to see the changes. I typically do not call CloseFile in these situations because that saves all changes in the card session and I leave saving to the user.

Regards,

Corey Scheich