To Add a Rundeck, call the RundeckCol.Add() method. The femPath and resultsPath are both required arguments.
def AddRundeck(project):
"""Adds a rundeck and imports the FEM to the specified project."""
# Setting a primary rundeck if no rundecks currently exist on the database
rundeck = project.RunDecks.Item(1)
rundeck.PathFem = "path/to/input/file"
rundeck.PathResults = "path/to/results/file"
project.Save()
project.ImportFEM()
# Adding additional rundecks
project.RunDecks.Add("path/to/input/file", "path/to/results/file")
project.Save()
project.ImportFEM()
To Add a Rundeck, call the hx.Project.Rundecks.AddRundeck() method. The inputPath of the rundeck and the resultPath are required arguments.
import hyperx as hx
def AddRundeck(project: hx.Project):
"""Adds a rundeck and imports the FEM to the specified project."""
rundeck = project.Rundecks.AddRundeck("path/to/input/file", "path/to/results/file")
project.ImportFem()