|
DigiPara Liftdesigner LDX API
|
API method: ILDXSheet5.RemoveAt
Treename: Sheets.
' from Samples/Src/LDXAPIExamples/Example_LDXSheet.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Sheets.", "LDXSheet~RemoveAt", "Delete the active sheet frame")>
Public Shared Sub DeleteTheActiveSheetFrame(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.Sheets Is Nothing Then
MsgBox("Sheets not found")
Exit Sub
End If
Dim activeSheetFrameIndex = ldxDocument.Sheets.ActiveSheet(ldxDocument.Sheets.ActiveSheet.CurrentSheetFrame).Comp.IX
For Each ldxSheetFrame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
If activeSheetFrameIndex <> ldxSheetFrame.Comp.IX Then
ldxSheetFrame.Activate()
ldxDocument.Sheets.ActiveSheet.RemoveAt(activeSheetFrameIndex)
Exit Sub
End If
Next
End Sub