AnsweredAssumed Answered

How to get folder card variable values?

Question asked by Tara Campese on Jul 27, 2015
Latest reply on Aug 6, 2015 by Jeff Sweeney

I have a folder card variable called VendorAlias.  All new parts saved in that folder have the VendorAlias variable written to them as well.  I was able to successfully batch update the variable in all the old files that did not previously contain that variable by using the RT click menu option (Update>Values in File). But if a user accidentally saves the file in a different folder, then moves it to the correct one, the VendorAlias value is incorrectly populated.  I already have a macro that our users run every time a file is saved.  I would like this macro to include the ability to pull the VendorAlias from the folder card variable and write it to the file card variable.

 

IEdmBatchUpdate2 includes SetFolderVar, but there doesn't appear to be a way to Get the existing folder variable.  Is this possible?  Does anyone know what commands to use for this?

 

I recently came across this problem and cannot find any information, so I'm hoping someone here can help. I have been working with ePDM and SW macros for several years, so I know how to read/write variables to the file's data card, but I've never done it with folders.

 

Thank you!

 

PS, I'm using VBA.  SW 2014 and ePDM 2014.

Outcomes