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