Fastest way to convert CATDrawing to PDF
Fastest way to convert CATDrawing to PDF
(OP)
I am wanting to know what is the fastest way to convert CATDrawings to PDF?
I have a drawing for one of my designs that is 28 pages, customer requirements force me to have only one page per document, so I have 28 different CATDrawings.
It has become very tedious to open all the drawings and individually save them as a PDF.
I have come up with two solutions:
1. Catia Utilities PrintBatch.
I configure it to print to Adobe PDF, but I am still struggling to get my settings correct so this works correct.
Currently, regardless of my settings, it keeps outputting my drawings on 8.5 x 11 sheets.
2. A Macro I found.
This Macro works, but takes roughly 30 minutes to run through all my drawings.
I have a drawing for one of my designs that is 28 pages, customer requirements force me to have only one page per document, so I have 28 different CATDrawings.
It has become very tedious to open all the drawings and individually save them as a PDF.
I have come up with two solutions:
1. Catia Utilities PrintBatch.
I configure it to print to Adobe PDF, but I am still struggling to get my settings correct so this works correct.
Currently, regardless of my settings, it keeps outputting my drawings on 8.5 x 11 sheets.
2. A Macro I found.
CODE --> CATScript
Sub CatMain() Dim fileSys Set fileSys = CATIA.FileSystem Dim FolderPath FolderPath = InputBox( "Enter a folder path:", "Folder path to convert the drawings" ,sDocPath & "\\NetApp2\Engineering\_TAJ_MODELS\615128-Inbd_Flap\TAJ\RELEASE\batchpdf\DrawingtoPDF") Dim filefolder Set filefolder = FileSys.GetFolder(FolderPath) Dim i as Integer 'loop through all files in the folder For i = 1 To filefolder.Files.Count Dim IFile Set IFile = filefolder.Files.Item(i) 'if the file is a CATDrawing, then open it in CATIA If InStr(IFile.Name, ".CATDrawing") <> 0 Then Dim Doc Set Doc = CATIA.Documents.Open(IFile.Path) Set partDocument1 = CATIA.ActiveDocument Dim drawingName as String drawingName =len(CATIA.ActiveDocument.Name) pdfName =left( CATIA.ActiveDocument.Name,drawingName-11) 'msgbox partt PartDocument1.ExportData FolderPath &"\"& pdfName, "pdf" 'close the open drawing document CATIA.ActiveDocument.Close() End IF Next 'go to the next drawing in the folder End Sub
This Macro works, but takes roughly 30 minutes to run through all my drawings.





RE: Fastest way to convert CATDrawing to PDF
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Fastest way to convert CATDrawing to PDF
You need a structure like below:
The catia drawings and PDF and DWG folders must reside in
D:\MACRO_PDF
You can change this path by editing the script.
Fist you must copy all the catdrawings in the respective structure.
You just click the desired option, PDF or DWG and the script automatically cycles through the catdrawings, dumping the PDFs and DWGs in their respective folders.
Hope this helps !
Best regards,
Costin Ruja
RE: Fastest way to convert CATDrawing to PDF
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Fastest way to convert CATDrawing to PDF
Best regards,
Costin Ruja
RE: Fastest way to convert CATDrawing to PDF
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Fastest way to convert CATDrawing to PDF