Hi everybody,
I am searching for a possibilty to check out every file that is listed in a file (csv or text, line by line). Does anyone know if there is an existing solution?
Background: I updated many variable values with an SQL query in the VariableValue table and want to transfer these values to the file properties. The only way I see, is to use the "update file properties from database" function from the PDM GUI. I could export the name and path of the affected files in a csv-file, before I do the changes to the table. Then I have to check out all the files, do the file property update to all the files and check them in again. I don't want to update them one by one because they are too many.
Many thanks, Lars
PDM: Check out files from csv or text file list
Re: PDM: Check out files from csv or text file list
The short answer is yes, it's possible. I don't have a code sample that does specifically this, however it should be relatively straight forward to parse a text file. I'm sure there are great examples on stackoverflow discussing just that.
As for the checking out of specified files... this example may help.
https://help.solidworks.com/2018/englis ... CSharp.htm
I'm not familiar enough with the "Update -> File Attributes from Database" from the API perspective so I don't know the best way to go about that.
As for the checking out of specified files... this example may help.
https://help.solidworks.com/2018/englis ... CSharp.htm
I'm not familiar enough with the "Update -> File Attributes from Database" from the API perspective so I don't know the best way to go about that.
Re: PDM: Check out files from csv or text file list
Hi AlexB,
thanks for your quick reply. After checking out the files I could filter the PDM for the checked out files and do the update of the data from db to file props manually via the PDM-menu. Checking in also.
thanks for your quick reply. After checking out the files I could filter the PDM for the checked out files and do the update of the data from db to file props manually via the PDM-menu. Checking in also.