DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Add new shaft material

API method: ILDXShaftMaterials5.Add

Treename: ShaftMaterials.

 ' from Samples/Src/LDXAPIExamples/Example_LDXShaftMaterials.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "ShaftMaterials.", "LDXShaftMaterials~Add", "Add new shaft material")>
    Public Shared Sub AddShaftMaterial(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.ShaftMaterials Is Nothing Then
            MsgBox("Shaft materials not found!")
            Exit Sub
        End If

        Dim ldxShaftMaterial As DigiPara.LDX.LDXShaftMaterial = ldxDocument.ShaftMaterials.Add()
        With ldxShaftMaterial
            .DISPLAY_NAME = "API example material"
            .HATCH = "NET"
            .ANGLE = 45
            .Scale = 30
            ' If 0 the hatching is not displayed properly 
            .ShaftMaterialMode = DigiPara.LDX.ShaftMaterialModes.smmPaperspaceScale
            ' The id of the material that is displayed in the 3D view
            ' This must be unique so that the other shaft materials should not have the same material id
            .MATERIAL_ID = DigiPara.LDX.ShaftMaterial.smClassicHole
            ' Wall segment priority. Wall segments with materials with higher priority are split out first.
            .PRIORITY = 10
        End With

    End Sub