Skip to content

Self-Weight Load

A nested class within Load used to create self-weight loads.

Constructor


Load.SW(load_case, dir = "Z", value = -1, load_group = "")

Creates a self-weight load for the specified load case.

Parameters

  • load_case: Name of the load case
  • dir (default="Z"): Direction of self-weight ("X", "Y", or "Z")
  • value (default=-1): Magnitude of self-weight (can be int or list [FX, FY, FZ])
  • load_group (default=""): Load group name

Object Attributes

  • LC (str): The name of the load case.
  • DIR (str): The direction of the self-weight ("X", "Y", or "Z").
  • FV (list): A list of three floats representing the load factors in X, Y, and Z directions.
  • LG (str): The name of the load group.
  • ID (int): The ID of the self-weight load entry.

Methods


json

Returns JSON representation of all self-weight loads.

sw1 = Load.SW("Dead Load", "Z", -1)
print(Load.SW.json())

create

Sends self-weight loads to Civil NX.

Load.SW.create()

get

Fetches self-weight loads from Civil NX.

print(Load.SW.get())

sync

Synchronizes self-weight loads from Civil NX.

Load.SW.sync()

delete

Deletes all self-weight loads from both Python and Civil NX.

Load.SW.delete()

Examples


# Simple self-weight in Z direction
for i in range(2):
    Node(i*10,0,0)
    Node.create()

Element.Beam(1,2)
Element.create()

#Load Case
Load_Case("D","SW Load")
Load_Case.create()

Load.SW("SW Load","Z",-1)
Load.SW.create()