Load Group
A nested class within Group used to create and manage load groups.
Constructor
Group.Load(name)
Creates a load group with specified name.
Parameters
name
: Name of the load group
Class Attributes
Group.Load.Groups -> List of all load groups.
Object Attributes
NAME
(str): The name of the load group.ID
(int): The ID of the load group.
Methods
json
Returns JSON representation of all load groups.
lg1 = Group.Load("Dead Load Group")
print(Group.Load.json())
# Output:
# {'Assign': {1: {'NAME': 'Dead Load Group'}}}
create
Sends load groups to Civil NX.
Group.Load.create()
get
Fetches load groups from Civil NX.
print(Group.Load.get())
sync
Synchronizes load groups from Civil NX.
Group.Load.sync()
delete
Deletes all load groups from both Python and Civil NX.
Group.Load.delete()
Examples
# Create load groups
lg1 = Group.Load("Dead Load Group")
lg2 = Group.Load("Live Load Group")
for lg in Group.Load.Groups:
print(f'Load Group ID: {lg.ID} | Name: {lg.NAME}')
# Output:
# Load Group ID: 1 | Name: Dead Load Group
# Load Group ID: 2 | Name: Live Load Group