|
DigiPara Liftdesigner LDX API
|
Treename: Shaft0.Gear.Hole1.
' from Samples/Src/LDXAPIExamples/Example_LDXGear.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Gear.Hole1.", "LDXGear~Example_DisableHole", "Disable default holes (if you really need to)")>
Public Shared Sub DisableDefaultHoles(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Gear.") Is Nothing Then
MsgBox("Gear not found!")
Exit Sub
End If
With ldxDocument.Shafts(0).Gear
With .Comp.Holes(1)
If .Object.Active Then
' normally, it would suffice to just disable the hole...
.Object.Active = False
' but LDX reactivates it unless we claim it is a user added hole.
.HoleMode = .HoleMode Or DigiPara.LDX.HoleModes.hmAdditionalHole
' of course, now the rope goes through the concrete floor.
Else
' undo changes
.Object.Active = True
.HoleMode = .HoleMode And Not DigiPara.LDX.HoleModes.hmAdditionalHole
End If
End With
End With
End Sub