Hi all,
I want to use the PDM API to populate job folders with the latest revisions of drawings. I have learned some programming in the past, but I’m kind of blank on how to get going here…
Let me explain where I am and where I am trying to get, and then I’ll ask if this is the right tool to get there and, if so, what language I should pick up to do it.
- I have never used an API before, but I understand what it does.
- I learned BASIC on a Tandy HD1000 about 25 years ago and I studied MATLAB in engineering school (and I did quite well at it).
When we get a job, a folder will be created for it on our project files network drive. This is where we will put the sales order, purchasing records, CMTRs, etc, as well as all the manufacturing documents to get material and build the machine. Part of my department’s job is to add all the drawings to that directory. Our current method is to print a BOM from our ERP system and go down the list marking off each drawing as we grab it and drag it over to the folder. This can be more than 400 drawings. Of course, there is not a handy search that will bring up most of the drawings, and some parts are used more than one place, so they’re not all in the same folder.
I used Microsoft Power Automate to put together a script that would accept a list of part numbers, get the most recently created PDF with that name, check to make sure it was released (by reading the watermark on the PDF), then add the drawing to an output folder or add the number to a list of missing drawings which we could then go through and revise or grab the previous rev, etc…
The issue I had with that is that I needed to get latest version on every PDF I wanted it to check, which meant ALL of our released drawings. Last I checked, that folder was somewhere around 17 kilofiles.
I used Octave (open-source MATLAB) to recreate the script, but I could never get it to read in the vault. I could copy a selection of PDFs to my local drive and it worked fine, but no joy in the vault.
It seems to me that with the API, I could get the BOM for a top level model, get the workflow state for each drawing, get the current revision, and grab the drawing or make a list of everything that needed to be revised, and it would be done in a few seconds rather than a few hours…
Since some of the drawings that need to be added are not captured in the model (schematics), maybe I could find a standardized way to export the BOM from ERP and feed that to the script instead.