Where the filename is generated
- Navigate to C:\ProgramData\coolOrange\powerJobs\Jobs
- Open the file YourCompanyName.CreatePDF.ps1 with a text editor (If you don't have such a file check out the getting started)
- Search for a line that looks like this:
$localPDFfileLocation = "$workingDirectory\$($file._Name).pdf" - Everything in between the two " builds the filepath
- Everything prefixed with a $ is a variable that holds further information
- Everything else in there is just plain text. For example the ".pdf"
- The PDF filename is created in the part $($file._Name).pdf
How the File's Properties are accessed
- With $file you have access to the drawing file, which is processed in the job, and its properties.
- With $($file._Name) you get the drawing's filename with extension ("Drawing1.idw") to which the extension ‘.pdf’ is added
- With $($file._PartNumber) you get the Part Number of the drawing
How to add the Part Number to the PDF's Filename
You can add the part number with a prefixed underscore ‘_’ to the variable $localPDFfileLocation like this:
$localPDFfileLocation = "$workingDirectory\$($file._Name)_$($file._PartNumber).pdf"
If the Part Number is ‘SCI-00012’ the result of the PDF name would be: Drawing1.idw_SCI-00012.pdf