Time Loads for Construction Stage
The module provides functionality to create, manage, and synchronize time loads for construction stage analysis in the model. It handles the definition of time-dependent loads with element assignments, load groups, and timing parameters for staged construction analysis.
Note.
All the codes below assumes the initial import and MAPI Key definition.
from midas_civil import *
MAPI_KEY('eyJ1ciI6InN1bWl0QG1pZGFzaXQuY29tIiwicGciO252k81571d')
Constructor
CS.TimeLoad(element_id, day, group="", id=None)
Creates time loads for Construction Stage with specified parameters for element assignment, timing, and load grouping.
Parameters
element_id
: Element ID (required) - Integer specifying the target elementday
: Time Loads in days (required) - Integer defining the load durationgroup (default="")
: Load Group Name (optional) - String for load categorizationid (default=None)
: Manual time loads ID assignment (auto-assigned if None)
Class Attributes
CS.TimeLoad.timeloads -> List of all time loads defined.
Methods
json
Returns a JSON representation of all Time Loads defined in python.
CS.TimeLoad(10, 35, "DL")
CS.TimeLoad(11, 25, "DL")
print(CS.TimeLoad.json())
# Output will show detailed JSON structure for all time loads
create
Sends the current time loads list to Civil NX using a PUT request.
CS.TimeLoad(10, 35, "DL")
CS.TimeLoad(11, 25, "DL")
CS.TimeLoad.create()
get
Fetches time loads from Civil NX and returns the JSON representation.
print(CS.TimeLoad.get())
# Output will show all time loads from Civil NX database
sync
Retrieves Time Loads data from Civil NX and rebuilds the internal time loads list.
CS.TimeLoad.sync()
for timeload in CS.TimeLoad.timeloads:
print(f'Element ID: {timeload.ELEMENT_ID} | Days: {timeload.DAY}')
print(f' Group: {timeload.GROUP_NAME} | ID: {timeload.ID}')
delete
Deletes all time loads data from both Python and Civil NX.
CS.TimeLoad.delete()
Examples
Basic Time Loads
# Create basic time loads without group name
CS.TimeLoad(12, 30)
CS.TimeLoad.create()
Time Loads with Group
# Create time loads with load group specification
CS.TimeLoad(10, 35, "DL")
CS.TimeLoad(11, 25, "DL")
CS.TimeLoad.create()
Time Loads with Specific ID
# Create time loads with manual ID assignment
CS.TimeLoad(11, 25, "DL", id=2)
CS.TimeLoad.create()