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

API method: ILDXComp5.LocalMatrix

Treename: Shaft0.Car.Frame.CPTS.PT15.

 ' from Samples/Src/LDXAPIExamples/Example_LDXCarFrame.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.CPTS.PT15.", "LDXComp~LocalMatrix", "[0517] Change profile point location")>
    Public Shared Sub ChangeProfilePointLocation(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Shaft0.Car.Frame.CPTS.PT15.") Is Nothing Then
            MsgBox("Desired characteristic point not found! Please reload the relevant .ld3 file.")
            Exit Sub
        End If

        With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Frame.CPTS.PT15.").LDXType, DigiPara.LDX.LDXProfilePoint)
            If MsgBox("Change location using local matrix?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
                .PKT_MODE = DigiPara.LDX.ProfilePtModes.pptmDoNotCalcLocalRoot
                .Comp.LocalMatrix.R.X = 222
                .Comp.LocalMatrix.R.Y = 22
                .Comp.LocalMatrix.R.Z = 2222
            Else
                .PKT_MODE = 0
                .SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionX, Integer), "222")
                .SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionY, Integer), "22")
                .SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionZ, Integer), "2222")
            End If
        End With

    End Sub