|
DigiPara Liftdesigner LDX API
|
API method: ILDXGuides5.GuidesTab
Treename: Shaft0.Car.Frame.GuideList0.Force0.
' from Samples/Src/LDXAPIExamples/Example_LDXGuides.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.GuideList0.Force0.", "LDXGuides~GuidesTab", "Place Force with Database Values")>
Public Shared Sub PlaceGuideForce(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Car.Frame.GuideList0.") Is Nothing Then
MsgBox("Guide rails for car frame not found!")
Exit Sub
End If
' get plan view
Helpers.EnsurePlanView(ldxDocument, DigiPara.LDX.SheetFrameProductGroups.shfpForces)
With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Frame.GuideList0.").LDXType, DigiPara.LDX.LDXGuides)
' the controlling bit is only in the data table
Dim modeBefore = DirectCast(.GuidesTab.GetValue("GD_MODE"), Int32)
If (modeBefore And DigiPara.LDX.GuideModes.gdmPlaceForce0) = 0 Then
' activate placement
.GuidesTab.SetValue("GD_MODE", modeBefore Or DigiPara.LDX.GuideModes.gdmPlaceForce0)
' set some source placement, this moves the force in Y direction
.GuidesTab.SetValue("GD_E", 200)
' the width also is taken into account, so take that under control too
.GuidesTab.SetValue("GD_H_1", 100)
' Usually, you would simply set these values in the database for your guide list definition.
Else
' deactivate placement
.GuidesTab.SetValue("GD_MODE", modeBefore And Not DigiPara.LDX.GuideModes.gdmPlaceForce0)
' we don't need to reset GD_E, it gets ignored now
' but unless we do something, the force is simply going to stay put, so reset it
Dim R = .Comp.Forces.Item(0).Comp.LocalMatrix.R
R.X = 0
R.Y = 0
R.Z = 0
End If
' this would transfer the settings to the other guide list
'.GuidesTab.Object.SendChangeNotification("", "")
End With
End Sub