|
DigiPara Liftdesigner LDX API
|
API method: ILDXLogicCenterPoint5.X1
Treename: Shaft0.PTM.
2 code examples follow.
' from Samples/Src/LDXAPIExamples/Example_LDXShaft.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.PTM.", "LDXLogicCenterPoint~X1", "Change logic center point properties")>
Public Shared Sub ChangeLogicCenterPointProperties(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.PTM.") Is Nothing Then
MsgBox("Logic center point within shaft not found! Please reload the relevant .ld3 file.")
Exit Sub
End If
With DirectCast(ldxDocument.GetLDXObject("Shaft0.PTM.").LDXType, DigiPara.LDX.LDXLogicCenterPoint)
.LogicPoint.PT_MODE = .LogicPoint.PT_MODE And Not (DigiPara.LDX.LogicPointModes.lpmXPlatformCenter Or DigiPara.LDX.LogicPointModes.lpmYPlatformCenter)
.Object.GetDim("X1").Value = 888
.Object.GetDim("X1").Calculate()
.Object.GetDim("Y0").Value = 1111
.Object.GetDim("Y0").Calculate()
End With
End Sub
' from Samples/Src/LDXAPIExamples/Example_LDXShaft.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.PTM.", "LDXLogicCenterPoint~X1", "Move Logic Center Point")>
Public Shared Sub MoveLogicCenterPoint(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
Helpers.EnsurePlanView(ldxDocument, DigiPara.LDX.SheetFrameProductGroups.shfpNone)
If ldxDocument.GetLDXObject("Shaft0.PTM.") Is Nothing Then
MsgBox("Logic center point within shaft not found! Please reload the relevant .ld3 file.")
Exit Sub
End If
' the _OFFSET values move the point around relative to whereever it would normally be at
With DirectCast(ldxDocument.GetLDXObject("Shaft0.PTM.").LDXType, DigiPara.LDX.LDXLogicCenterPoint)
If .X_OFFSET = 0 Then
.X_OFFSET = 100
ElseIf .Y_OFFSET = 0 Then
.Y_OFFSET = -200
Else
.X_OFFSET = 0
.Y_OFFSET = 0
End If
End With
End Sub