|
DigiPara Liftdesigner LDX API
|
API method: ILDXForces5.Add
Treename: Shaft0.Car.Frame.Buffer0.Force1.
' from Samples/Src/LDXAPIExamples/Example_LDXBuffer.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.Buffer0.Force1.", "LDXForces~Add", "Add a force")>
Public Shared Sub AddAForce(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Car.Frame.Buffer0.") Is Nothing Then
MsgBox("Desired buffer not found! Please reload the relevant .lde file.")
Exit Sub
End If
' Add a force
Dim ldxForce As DigiPara.LDX.LDXForce = ldxDocument.GetLDXComp("Shaft0.Car.Frame.Buffer0.").Forces.Add()
' Edit force properties
With ldxForce
.DESC = "API Example Force"
.SHORT_DESC = "Force1"
' Set force values along the main axis
.FX = 100
.FY = 200
.FZ = 300
' Set tourque values along the main axis
.MX = 400
.MY = 500
.MZ = 600
' Set local location
.Comp.LocalMatrix.R.Y = 555 ' X0
End With
End Sub