|
DigiPara Liftdesigner LDX API
|
API method: ILDXCarCeilingPanels5.Mode
Treename: Shaft0.Car.Design.Ceiling.Panels.
' from Samples/Src/LDXAPIExamples/Example_LDXCarCeiling.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Design.Ceiling.Panels.", "LDXCarCeilingPanels~Mode", "Change panel row count")>
Public Shared Sub ChangPanelRowCount(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Panels.") Is Nothing Then
MsgBox("Car ceiling panels not found!")
Exit Sub
End If
With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Panels.").LDXType, DigiPara.LDX.LDXCarCeilingPanels)
If MsgBox("Add a ceiling panel row? If not a ceiling panel row will be removed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
' Calculate width by count
.Mode = .Mode Or DigiPara.LDX.CarCeilingPanelsModes.ccpsUseColsCount
' Change panel rows
.Object.SetValue("COLS", 5)
Else
' Calculate count by width
.Mode = .Mode And Not DigiPara.LDX.CarCeilingPanelsModes.ccpsUseColsCount
' Change panel row width
.CarCeilingPanelsTab.SetValue("CCPS_DX", 320)
End If
End With
End Sub