Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So I have a rule that is set to run with the close document event trigger. This will prompt a user asking if they want to export a DWF of an assembly, but only if that assembly follows a particular filename scheme.
If ThisApplication.ActiveDocumentType <> 12291 Then
Return
End If
oJobNum = Left(ThisApplication.ActiveDocument.DisplayName, 6)
oAsmNum = Right(ThisApplication.ActiveDocument.FullFileName, 7)
oFolder = "J:\" & oJobNum & "\MECH\REFERENCE"
If oAsmNum = "A01.iam" Then
oDWF = MessageBox.Show("Would you like to export DWF?", "Export DWF", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If oDWF = vbYes Then
ThisDoc.Document.SaveAs( oFolder & "\" & ThisDoc.FileName(False) & (".dwf") , True)
End If
End If
This rule works as intended BUT when I check in an assembly and chose to include all related files, the prompt comes up for every file during its search for related files. Any ideas on how to correct this?
Solved! Go to Solution.