Hi,
I am currently working on a code to save my files that are currently open in CATIA, but I only want to save the first sheet of my CATDrawing, because when I delete my other sheets it removes the template along with it from my PDF. Hence, I would like to know if there is a way to do it, and if so can you please share the code with me? Thank you in advance :)
Also this is my current code if you want to get a rough idea of what I am trying to do:
Sub CATMain()
Dim doc1 As Documents
Set doc1 = CATIA.Documents
For i = 1 To (doc1.Count / 2)
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
partDocument1.Sheets.Remove 4
partDocument1.Sheets.Remove 3
partDocument1.Sheets.Remove 2
Dim drawingName As String
drawingName = Len(CATIA.ActiveDocument.Name)
PDFName = Left(CATIA.ActiveDocument.Name, drawingName - 11)
partDocument1.ExportData FolderPath & "C:\Users\Desktop\" & PDFName, "pdf"
CATIA.ActiveDocument.Close
Next
End Sub