DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Add or delete a guide

API method: ILDXGuides5.InsertAt

Treename: Shaft0.Car.Frame.GuideList0.

 ' from Samples/Src/LDXAPIExamples/Example_LDXGuides.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.GuideList0.", "LDXGuides~InsertAt", "Add or delete a guide")>
    Public Shared Sub AddOrDeleteAGuide(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Shaft0.Car.Frame.GuideList0.") Is Nothing Then
            MsgBox("Guide rails for car frame not found!")
            Exit Sub
        End If

        With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Frame.GuideList0.").LDXType, DigiPara.LDX.LDXGuides)
            ' Set all parameters of guide manuelly
            .GL_MODE = .GL_MODE Or DigiPara.LDX.GuidesGLModes.glmDZManual
            If MsgBox("Do you want to add a guide at the bottom of the rail? If not the first guide will be deleted.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
                Dim ldxGuide As DigiPara.LDX.LDXGuide = .InsertAt(0)
                ldxGuide.Comp.VisualMaterial.PGOGL_RID64 = 110700002
                ' Length of guide
                ldxGuide.LEN = 2500
            Else
                .RemoveAt(0)
            End If
        End With

    End Sub