|
DigiPara Liftdesigner LDX API
|
API method: ILDXComponents5.Clear
Treename: Components.
' from Samples/Src/LDXAPIExamples/Example_LDXDocument.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXApp}, "Components.", "LDXComponents~Clear", "Remove components")>
Public Shared Sub RemoveComponents(ByRef ldxApplication As DigiPara.LDX.LDXApplication)
If ldxApplication.ActiveDocument Is Nothing Then
MsgBox("Active document not found!")
Exit Sub
End If
With DirectCast(ldxApplication.ActiveDocument.GetLDXObject("Components.").LDXType, DigiPara.LDX.LDXComponents)
If MsgBox("Do you want to clear all components? If not the first will be removed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
.Clear()
Else
.RemoveAt(0)
End If
End With
End Sub