|
DigiPara Liftdesigner LDX API
|
API method: ILDXGear5.RELATIVE_DZ
Treename: Shaft0.Gear.
' from Samples/Src/LDXAPIExamples/Example_LDXGear.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Gear.", "LDXGear~RELATIVE_DZ", "[0361] Change traction machine Z position")>
Public Shared Sub ChangeTractionMachineZPosition(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Gear.") Is Nothing Then
MsgBox("Gear not found!")
Exit Sub
End If
' Reference plane
Dim ldxGear As DigiPara.LDX.LDXGear = ldxDocument.Shafts(0).Gear
With ldxGear
.GEAR_MODE = .GEAR_MODE Or DigiPara.LDX.GearModes.gmAlignCenter ' unrelated to z positioning
' cycle through modes
Select Case .GEAR_MODE And DigiPara.LDX.GearModes.gmZPosRelativeMask
Case 0
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask) Or DigiPara.LDX.GearModes.gmZPosRelativeToOverhead
Case DigiPara.LDX.GearModes.gmZPosRelativeToOverhead
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask) Or DigiPara.LDX.GearModes.gmZPosRelativeToPit
Case DigiPara.LDX.GearModes.gmZPosRelativeToPit
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask) Or DigiPara.LDX.GearModes.gmZPosRelativeToTopFloor
Case DigiPara.LDX.GearModes.gmZPosRelativeToTopFloor
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask) Or DigiPara.LDX.GearModes.gmZPosRelativeToTopFloorPlusOPH
Case DigiPara.LDX.GearModes.gmZPosRelativeToTopFloorPlusOPH
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask) ' no additional bit means relative to machine room
Case Else
.GEAR_MODE = (.GEAR_MODE And Not DigiPara.LDX.GearModes.gmZPosRelativeMask)
End Select
End With
' Reference plane location
ldxGear.RELATIVE_DZ = 500
End Sub