Details
User have 3 sheets in drawing file and he want to output all sheets in PDF with seApplicationGlobalDraftSaveAsPDFSheetOptions so PDF is generated at C:\Temp\ directory
Solution
Imports System.IO
Imports System.Runtime.InteropServices
ModuleModule1
Sub Main()
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
Dim objSheet As SolidEdgeDraft.Sheet = Nothing
Dim objTextBoxs As SolidEdgeFrameworkSupport.TextBoxes = Nothing
Dim objTextBox As SolidEdgeFrameworkSupport.TextBox = Nothing
Try
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objDraftDocument = objApplication.ActiveDocument
Dim objVal AsObject = Nothing
objDraftDocument.SaveAs("C:\Temp\DRAFT_PDF.pdf")
objApplication.GetGlobalParameter(SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalDraftSaveAsPDFSaveAllColorsBlack, objVal)
objApplication.SetGlobalParameter(SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalDraftSaveAsPDFSaveAllColorsBlack, True)
objVal = Nothing
objApplication.GetGlobalParameter(SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalDraftSaveAsPDFSheetOptions, objVal)
objApplication.SetGlobalParameter(SolidEdgeFramework.ApplicationGlobalConstants.seApplicationGlobalDraftSaveAsPDFSheetOptions, SolidEdgeConstants.DraftSaveAsPDFSheetOptionsConstants.seDraftSaveAsPDFSheetOptionsConstantsAllSheets)
Catch ex AsException
Console.WriteLine(ex.Message)
Finally
Console.WriteLine("GTAC")
EndTry
EndSub
EndModule
Hardware/Software Configuration
Platform: INTL64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V110.0
Function: CUSTOM_SAMPLES
Ref: 001-9160115