DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Add a profile point

API method: ILDXComp5.AddPoint

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~AddPoint", "Add a profile point")>
    Public Shared Sub AddAPoint(ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Sheets.LdvSheet1.LdvFrame2.") Is Nothing Then
            MsgBox("There is no valid sheet frame for this example. Please reload the relevant .ld3 file.")
            Exit Sub
        End If
        Dim frame As DigiPara.LDX.LDXSheetFrame = DirectCast(ldxDocument.GetLDXObject("Sheets.LdvSheet1.LdvFrame2.").LDXType, DigiPara.LDX.LDXSheetFrame)
        EnsureDeveloperMode(ldxDocument, frame)
        With frame
            MsgBox("Now a characteristic point will be added to the car frame.")
            ' Add characteristic point
            Dim ldxProfilePoint As DigiPara.LDX.LDXProfilePoint = .DeveloperComp.ProfilePoints.Add()
            ' Set location of the point
            ldxProfilePoint.SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionZ, Integer), "2330")
            ldxProfilePoint.SetEquation(DirectCast(DigiPara.LDX.ProfileEquationType.peqtLocalPositionX, Integer), "200")
        End With
    End Sub