|
DigiPara Liftdesigner LDX API
|
API method: ILDXShaft5.TRAVELING_CABLE_COUNT
Treename: Shaft0.TravelingCable5.
' from Samples/Src/LDXAPIExamples/Example_LDXShaft.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.TravelingCable5.", "LDXShaft~TRAVELING_CABLE_COUNT", "Add another traveling cable")>
Public Shared Sub AdditionalTravelingcable(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.") Is Nothing Then
MsgBox("Shaft not found! Please reload the relevant .ld3 file.")
Exit Sub
End If
' make traveling cables visible
For Each frame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
frame.VisibleProductGroups = frame.VisibleProductGroups Or DigiPara.LDX.SheetFrameProductGroups.shfpElectricalEquipments
Next
With ldxDocument.Shaft
If .TRAVELING_CABLE_COUNT < 6 Then
' increase count
.TRAVELING_CABLE_COUNT = 6
' activate
.TravelingCable(5).Comp.ChangePartRID64(1, 0)
Else
' deactivate again
.TRAVELING_CABLE_COUNT = 5
End If
End With
End Sub