DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Change location

API method: ILDXMachineRoom5.POS_DZ

Treename: Shaft0.MachineryRoom.

 ' from Samples/Src/LDXAPIExamples/Example_LDXMachineRoom.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.MachineryRoom.", "LDXMachineRoom~POS_DZ", "Change location")>
 Public Shared Sub ChangeLocation(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

     If ldxDocument.GetLDXObject("Shaft0.MachineryRoom.") Is Nothing Then
         MsgBox("Machine room not found! Please reload the relevant .ld3 file!")
         Exit Sub
     End If

     With DirectCast(ldxDocument.GetLDXObject("Shaft0.MachineryRoom.").LDXType, DigiPara.LDX.LDXMachineRoom)
         ' Sideways displacement of the machine room
         .Object.GetDim("POS_DX0").Value = 222
         .Object.GetDim("POS_DX0").Calculate()
         ' Inward displacement 
         .Object.GetDim("POS_DY0").Value = 0
         .Object.GetDim("POS_DY0").Calculate()
         ' Upward displacement
         .POS_DZ = 333
     End With

 End Sub