There is a PDF file related to a CAD document, but this PDF file is corrupted. Since there is no API available, we cannot update the file with the correct version. Therefore, how can I find this PDF file in the SQL database via the EPM document? If I want to find and fix the file, which table should I use? Could you help me with this?
Take a look at this article
QML that lists the size of CAD Documents and their location in Windchill PDMLink
Yes, by following the document's path, I found the location of the corrupted PDF file, but I do not have access to the file path. Therefore, I am unable to make changes. My goal is to create a mini application to replace the corrupted file. Is there an API or another method you know of to upload a new file with the same name and replace the old file?
You can do it using Windchill GUI
Hi @Marco_Tosin
I am not sure if this preference can be applied to the EPMDocument where the primary object is PDF.
I would advice to just replace the file in the folder. so contact admin who has the access and can do it for you @ozclkonur
PetrH
Is this for one file? What kind of issue is it causing? How did you know it was corrupt? If the file is related to WVS as @joe_morton mentioned, you should be able to republish it to recreate it or just delete it. If this is related to an attachment, you should be able to check out the EPMDocument and replace it. Either way, I cannot see a reason to deep dive to the vaults and replace it there. You will have to deal with the database meta data of that file being altered (well the file will have been altered). You mentioned SQL Server DB. Is the content stored in the Database? Binary content should be moved to vaults it possible. Lots of questions but help us understand what issues you are seeing before coding a solution.
How is the PDF related? Is it a Representation/Annotation? If so, you should be able to make a New Representation, then delete the old one. It's not advisable to directly replace files in the SQL database.
Any idea how the PDF file got corrupted in the first place? Is this happening a lot on your system that you feel the need to make a utility for it? That's the bigger concern for me.
Initially, the PDF file doesn't appear corrupted, but the issue arises when the user changes the sheet number within the PDF. Since the user isn't fully aware of what a sheet represents, they mistakenly believe they are changing the page sequence number. Consequently, this can lead the user to perceive the PDF as corrupted.
I can resolve this issue by aligning the updated sheet number with the page sequence number and notifying the user accordingly. However, this solution only applies within the application. Because we haven't corrected the actual PDF file, Windchill continues to display it with the old sheet and page numbers. While the PDF I send to the user privately may be correct, it may not reflect accurately within Windchill.