DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Change traction machine XY position

API method: ILDXGear5.GEAR_MODE

Treename: Shaft0.Gear.

 ' from Samples/Src/LDXAPIExamples/Example_LDXGear.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Gear.", "LDXGear~GEAR_MODE", "[0360] Change traction machine XY position")>
 Public Shared Sub ChangeTractionMachineXYPosition(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

     If ldxDocument.GetLDXObject("Shaft0.Gear.") Is Nothing Then
         MsgBox("Gear not found!")
         Exit Sub
     End If

     With ldxDocument.Shafts(0).Gear

         If MsgBox("Automatically align gear?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
             Dim align_mask As Long = DigiPara.LDX.GearModes.gmAlignCenter Or DigiPara.LDX.GearModes.gmAlignAbsolute Or DigiPara.LDX.GearModes.gmAlignPreviousObject
             .GEAR_MODE = .GEAR_MODE And Not align_mask
             .GEAR_MODE = .GEAR_MODE Or DigiPara.LDX.GearModes.gmCounterweight
         Else
             .GEAR_MODE = .GEAR_MODE And Not DigiPara.LDX.GearModes.gmXYPosRelativeMask
             .GEAR_MODE = .GEAR_MODE Or DirectCast(0, DigiPara.LDX.GearModes)
             .GEAR_MODE = .GEAR_MODE Or DigiPara.LDX.GearModes.gmAlignAbsolute
         End If

         ' Y-Position
         .DEFL_1_SHAFT_DIST = 400
         ' X-Position
         .DELTA_HOR = 300

     End With

 End Sub