DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Change car operating panel (COP) protection properties

API method: ILDXCOPProtection5.DX

Treename: Shaft0.Entries1.E0.Panel0.COPProtection.

 ' from Samples/Src/LDXAPIExamples/Example_LDXHallButton.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Entries1.E0.Panel0.COPProtection.", "LDXCOPProtection~DX", "Change car operating panel (COP) protection properties")>
    Public Shared Sub ChangeCarOperatingPanelProtectionProperties(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Shaft0.Entries1.E0.Panel0.COPProtection.") Is Nothing Then
            MsgBox("Desired COP protection not found! Please reload the relevant .ld3 file.")
            Exit Sub
        End If

        With DirectCast(ldxDocument.GetLDXObject("Shaft0.Entries1.E0.Panel0.COPProtection.").LDXType, DigiPara.LDX.LDXCOPProtection)
            ' Activate the COP protection
            .Object.Active = True
            ' Change the manufacturer 
            .Comp.ChangePartRID64(1, 0)
            ' Width
            .DX = 222
            ' Depth
            .DY = 111
            ' Change color
            For Each ldxProfile As DigiPara.LDX.LDXProfile In .Comp.Profiles
                ldxProfile.Comp.VisualMaterial.PGOGL_RID64 = 11000
            Next
        End With

    End Sub