Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: MechMachineMan

'- - - - - - - - - - - - -Component Drawings - - - - - - - - - - - -'look at the files referenced by the assembly
	Dim oRefDoc As Document
	
'	For Each oRefDoc In oRefDocs = oAsmDoc.AllReferencedDocuments
	For Each oRefDoc In oAsmDoc.AllReferencedDocuments
		idwPathName = Left(oRefDoc.FullDocumentName, Len(oRefDoc.FullDocumentNaMe) - 3) & "idw"

		If(System.IO.File.Exists(idwPathName)) Then
			Dim oDrawDoc As DrawingDocument
			oDrawDoc = ThisApplication.Documents.Open(idwPathName, True)
			oFileName = Left(oRefDoc.DisplayName, Len(oRefDoc.DisplayName) -3)

			On Error Resume Next
				oDataMedium.FileName = oFolder & "\" & oFileName & "pdf"
				Call PDFAddIn.SaveCopyAs(oDrawDoc, oContext, oOptions, oDataMedium)
				oDrawDoc.Close
			On Error Goto 0
		End If
	Next

oDrawDoc.close in this part of the code, does it mean that all idw will close after pdf cration ?