Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error using SubmitPrint method

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
121 Views, 0 Replies

Error using SubmitPrint method

I've written a batch plot macro and I'm having a error. Here's the source. =======begin code Option Explicit Dim strFilename As String Dim oCurDoc As DrawingDocument Dim oDrgPrintMgr As DrawingPrintManager Private Sub cmdOpen_Click() With CommonDialog1 .InitDir = ThisApplication.FileLocations.Workspace .DialogTitle = "Display Properties" .filter = "Inventor Files (*.iam, *.ipt, *.idw, *.ipn) | *.idw" .FilterIndex = 2 .Flags = cdlOFNAllowMultiselect .CancelError = True On Error Resume Next .ShowOpen If Err Then Exit Sub End If On Error GoTo 0 End With ' Write the selected filename to the text box. strFilename = CommonDialog1.Filename ' Check to make sure a name was specified and call the function ' to list the properties of the file. If strFilename <> "" Then ShowFilelist End If End Sub Private Sub ShowFilelist() Dim i As Integer i = InStrRev(strFilename, "\") lstFile.AddItem (strFilename) End Sub Private Sub cmdPrint_Click() Dim i As Integer For i = 0 To lstFile.ListCount - 1 lstFile.ListIndex = i strFilename = lstFile.Value PrintDrawing Next End Sub Private Sub PrintDrawing() Set oCurDoc = ThisApplication.Documents.Open(strFilename, True) oCurDoc.Activate ' imgDoc.Picture = oCurDoc.Thumbnail If oCurDoc.DocumentType = kDrawingDocumentObject Then Set oDrgPrintMgr = oCurDoc.PrintManager oDrgPrintMgr.ScaleMode = kPrintBestFitScale oDrgPrintMgr.PaperSize = kPaperSizeA4 oDrgPrintMgr.PrintRange = kPrintAllSheets oDrgPrintMgr.Orientation = kLandscapeOrientation oDrgPrintMgr.SubmitPrint End If End Sub
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report