|
DigiPara Liftdesigner LDX API
|
API method: ILDXSheets5.CreateFile
Treename: Sheets.
3 code examples follow.
' from Samples/Src/LDXAPIExamples/Example_LDXSheets.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc, APIHelpModes.InputParaDesktopWithOtherFileName, "LD API example.pdf"}, "Sheets.", "LDXSheets~CreateFile", "Export as PDF")>
Public Shared Sub ExportAsPDF(ByRef ldxDocument As DigiPara.LDX.LDXDocument, ByVal SheetFilePath As String)
If ldxDocument.Sheets Is Nothing Then
MsgBox("Sheets not found!")
Exit Sub
End If
Dim sheetNamesList As List(Of String) = New List(Of String)
For Each ldxSheet As DigiPara.LDX.LDXSheet In ldxDocument.Sheets
sheetNamesList.Add(ldxSheet.Object.TreeName)
Next
ldxDocument.Sheets.CreateFile(DigiPara.LDX.DocumentCreateFileType.cfPdf, SheetFilePath, String.Join(",", sheetNamesList.ToArray), DigiPara.LDX.SheetsCreateFileOptions.shcfopMergeInOneFile)
End Sub
' from Samples/Src/LDXAPIExamples/Example_LDXSheets.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc, APIHelpModes.InputParaDesktopWithOtherFileName, "LD API example.svg"}, "Sheets.", "LDXSheets~CreateFile", "Export as SVG")>
Public Shared Sub ExportAsSVG(ByRef ldxDocument As DigiPara.LDX.LDXDocument, ByVal SheetFilePath As String)
If ldxDocument.Sheets Is Nothing Then
MsgBox("Sheets not found!")
Exit Sub
End If
' only individual sheets can be exported as SVG
ldxDocument.Sheets.CreateFile(DigiPara.LDX.DocumentCreateFileType.cfSvg, SheetFilePath, ldxDocument.Sheets.ActiveSheet.Object.TreeName, DigiPara.LDX.SheetsCreateFileOptions.shcfopNone)
End Sub
' from Samples/Src/LDXAPIExamples/Example_LDXSheets.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc, APIHelpModes.InputParaDesktopWithOtherFileName, "LD API example.dwg"}, "Sheets.", "LDXSheets~CreateFile", "Export as 3D DWG")>
Public Shared Sub ExportAs3DDWG(ByRef ldxDocument As DigiPara.LDX.LDXDocument, ByVal SheetFilePath As String)
If ldxDocument.Sheets Is Nothing Then
MsgBox("Sheets not found!")
Exit Sub
End If
ldxDocument.Sheets.CreateFile(DigiPara.LDX.DocumentCreateFileType.cf3DDwg,
SheetFilePath,
ldxDocument.Sheets.ActiveSheet.Object.TreeName,
DigiPara.LDX.SheetsCreateFileOptions.shcfopCreateHyperlinks)
End Sub