|
DigiPara Liftdesigner LDX API
|
Treename: Shaft0.Entries1.E0.WallSegments.ConcreteFloor.
' from Samples/Src/LDXAPIExamples/Example_LDXEntry.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Entries1.E0.WallSegments.ConcreteFloor.", "LDXEntry~Example_CustomConcreteFloor", "Add a custom dimensioned concrete floor")>
Public Shared Sub AddCustomConcreteFloor(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Entries1.E0.") Is Nothing Then
MsgBox("Desired entry not found! Please reload the relevant .ld3 file.")
Exit Sub
End If
Dim ldxEntry As DigiPara.LDX.LDXEntry = DirectCast(ldxDocument.GetLDXObject("Shaft0.Entries1.E0.").LDXType, DigiPara.LDX.LDXEntry)
' fetch or create wall segment
Dim prefix As String = "ConcreteFloor."
Dim ldxWallSegment As DigiPara.LDX.LDXWallSegment = ldxEntry.Comp.WallSegments.GetByObjectPrefix(prefix)
If ldxWallSegment Is Nothing Then
ldxWallSegment = ldxEntry.Comp.WallSegments.Add()
ldxWallSegment.Hole.CustomObjectPrefix = prefix
End If
With ldxWallSegment
' set material
ldxWallSegment.ALTERNATIVE_MATERIAL = DigiPara.LDX.ShaftMaterial.smConcrete ' Or DigiPara.LDX.ShaftMaterial.smFlagVulnerableToWeakHole
' and activate
.Object.Active = True
End With
' set dimensions
With ldxWallSegment.Hole
.HoleMode = .HoleMode Or DigiPara.LDX.HoleModes.hmAdditionalHole
' put on same wall as entry
.Comp.Wall = ldxEntry.Comp.Wall
' pick alignemt. This is the tricky part.
' in X and Y direction, it should fill the whole shaft including the walls
.PrimaryAxisMode = DigiPara.LDX.MixedAxisModes.mamY Or DigiPara.LDX.MixedAxisModes.mamSourceRoom Or DigiPara.LDX.MixedAxisModes.mamOriginOutside
.TertiaryAxisMode = DigiPara.LDX.MixedAxisModes.mamX Or DigiPara.LDX.MixedAxisModes.mamSourceRoom Or DigiPara.LDX.MixedAxisModes.mamOriginOutside
' In Z-direction, the segment should be aligned to the entry
.SecondaryAxisMode = DigiPara.LDX.MixedAxisModes.mamZ Or DigiPara.LDX.MixedAxisModes.mamSourceRoom Or DigiPara.LDX.MixedAxisModes.mamOriginParent Or DigiPara.LDX.MixedAxisModes.mamAlignmentLower
.DZ = 400
.Z0 = - .DZ
' with these all 0, the custom concrete segment would just fill the whole shaft width, we already have standard
' geometry that does that.
.X0 = 0
.X1 = 0
.Y0 = -500
.Y1 = .Object.Shaft.Room.W_4
' lastly, we have to awkwardly tell the system to automatically calculate the values we did not set
With .Object.GetDim("X0")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("DX")
.DimMode = .DimMode Or DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("X1")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("Y0")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("DY")
.DimMode = .DimMode Or DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("Y1")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("Z0")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("DZ")
.DimMode = .DimMode And Not DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
With .Object.GetDim("Z1")
.DimMode = .DimMode Or DigiPara.LDX.SheetFrameOverwriteDimModes.sfodmCalcAuto
End With
End With
End Sub