Message 1 of 23

Not applicable
05-27-2013
07:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Haha, little monday morning humour,
So I would like help with a simple rule if anyone has a few moments,
Basically, some of my drawings require a dxf for cnc purposes.
Not all my drawings, so I don't need a dxf for every drawing, just some.
It would be much quicker to have a rule that prompts a message box after I press save, stating something like
Do you require a .DXF?
Yes or No.
I currently have a rule that saves all my .idw's as pdf, I am not sure if I should have a separate rule or if it can be part of the same rule. The pdf rule is triggered by a save as well.
'Save PDF with options path_and_namePDF = ThisDoc.PathAndFileName(False) ' without extension PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}") oDocument = ThisApplication.ActiveDocument oContext = ThisApplication.TransientObjects.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism oOptions = ThisApplication.TransientObjects.CreateNameValueMap oDataMedium = ThisApplication.TransientObjects.CreateDataMedium If PDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then 'oOptions.Value("All_Color_AS_Black") = 0 oOptions.Value("Remove_Line_Weights") = 1 oOptions.Value("Vector_Resolution") = 400 oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets 'oOptions.Value("Custom_Begin_Sheet") = 2 'oOptions.Value("Custom_End_Sheet") = 4 End If 'Set the destination file name oDataMedium.FileName = path_and_namePDF & ".pdf" On Error Goto handlePDFLock 'Publish document. Call PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium) Exit Sub handlePDFLock: MessageBox.Show("PDF could not be saved, most likely someone else has it open.", _ "No PDF for you " & ThisApplication.GeneralOptions.UserName & "!") Resume Next
Thanks for any input!!
Solved! Go to Solution.