Support Properties: Soil Nail Example#

Download the ExampleModel.slmd for this example.

Code Snippet: Soil Nail Example#
from Slide2Scripting.Slide2Modeler import Slide2Modeler
from Slide2Scripting.SupportProperties.SupportProperty import SupportType
import os, inspect

current_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None)))
Slide2Modeler.startApplication(60074)

slide2_modeler = Slide2Modeler(60074)
model = slide2_modeler.openFile(rf"{current_dir}\example_models\ExampleModel.slmd")

supports = model.getSupportProperties()
support = supports[0] if supports else model.addSupportProperty()
support.setSupportType(SupportType.SOIL_NAIL)
props = support.SoilNail
props.setOutOfPlaneSpacing(1.5)
props.setTensileCapacity(180.0)

print(props.getOutOfPlaneSpacing())
print(props.getTensileCapacity())

model.save()
model.close()

slide2_modeler.closeApplication()

Output#

1.5
180.0