Solid Edge Draft Type Library > Sheet Object : PrintArea Method |
Visual Basic |
---|
Public Sub PrintArea( _ ByVal LowerLeftX As Double, _ ByVal LowerLeftY As Double, _ ByVal UpperRightX As Double, _ ByVal UpperRightY As Double, _ Optional ByVal Printer As Variant, _ Optional ByVal NumCopies As Variant, _ Optional ByVal Orientation As Variant, _ Optional ByVal PaperSize As Variant, _ Optional ByVal Scale As Variant, _ Optional ByVal PrintToFile As Variant, _ Optional ByVal OutputFileName As Variant, _ Optional ByVal ColorAsBlack As Variant, _ Optional ByVal Collate As Variant, _ Optional ByVal ScaleLineWidths As Variant, _ Optional ByVal ScaleLineTypes As Variant, _ Optional ByVal UsePrinterClipping As Variant _ ) |
Private Sub PrintArea_Click(sender As Object, e As EventArgs) Handles PrintArea.Click Dim objApplication As SolidEdgeFramework.Application = Nothing Dim objDraftDoc As SolidEdgeDraft.DraftDocument Dim objSheet As SolidEdgeDraft.Sheet Try objApplication = Marshal.GetActiveObject("SolidEdge.Application") objDraftDoc = objApplication.ActiveDocument For Each objSheet In objDraftDoc.Sections.WorkingSection.Sheets Call objSheet.PrintArea(0, 0, 0.2, 0.2, "Microsoft XPS Document Writer", 1, 2, , , True, "c:\test.xps", False) Next Catch ex As Exception MsgBox(ex.ToString) Clipboard.SetText(ex.ToString) End Try