Private Sub PrintSheet_Click(sender As Object, e As EventArgs) Handles PrintSheet.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.PrintSheet("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
End Sub