Oasys.D3PLOT.SetBeam class

Properties

property SetBeam.include(read only): integer

The include file number in the model that the beam set is in

property SetBeam.index(read only): integer

The internal index for the beam set in D3PLOT (starting at 0)

property SetBeam.label(read only): integer

The Ansys LS-DYNA label for the beam set

property SetBeam.model(read only): Model

The Model that the beam set is in

property SetBeam.title(read only): string

The title for the beam set (or None if no title). This is only available if there is a ztf file for the model. If not None will be returned

property SetBeam.total(read only): integer

The total number of beam items in the beam set

property SetBeam.type(read only): constant

The type for the beam set (will be Type.SET_BEAM)

Static methods

classmethod SetBeam.First(model)

Returns the first beam set in the model (or None if there are no beam sets in the model)

Parameters:

model (Model) – Model to get first beam set in

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the first beam set in model m:

s = Oasys.D3PLOT.SetBeam.First(m)
classmethod SetBeam.FlagAll(model, flag)

Flags all of the beam sets in the model with a defined flag

Parameters:
  • model (Model) – Model that all the beam sets will be flagged in

  • flag (Flag) – Flag (see AllocateFlag) to set on the beam sets

Returns:

No return value

Return type:

None

Example

To flag all of the beam sets with flag f in model m:

Oasys.D3PLOT.SetBeam.FlagAll(m, f)
classmethod SetBeam.GetAll(model, property=Oasys.gRPC.defaultArg)

Returns a list of SetBeam objects or properties for all of the beam sets in the model. If the optional property argument is not given then a list of SetBeam objects is returned. If the property argument is given, that property value for each beam set is returned in the list instead of a SetBeam object

Parameters:
  • model (Model) – Model that all the beam sets are in

  • property (string) – Optional. Name for property to get for all beam sets in the model

Returns:

List of SetBeam objects or properties

Return type:

list

Example

To get all of the beam sets in model m:

s = Oasys.D3PLOT.SetBeam.GetAll(m)

To return a list containing the value of property ‘foo’ (for example ‘label’ for a beam set) for each beam set in model m:

a = Oasys.D3PLOT.SetBeam.GetAll(m, 'foo');
classmethod SetBeam.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)

Gets all of the beam sets in the model flagged with a defined flag. If the optional property argument is not given then a list of SetBeam objects is returned. If the property argument is given, that property value for each beam set is returned in the list instead of a SetBeam object

Parameters:
  • model (Model) – Model that the flagged beam sets are in

  • flag (Flag) – Flag (see AllocateFlag) set on the beam sets to get

  • property (string) – Optional. Name for property to get for all flagged beam sets in the model

Returns:

List of SetBeam objects or properties

Return type:

list

Example

To get all of the beam sets flagged with flag f in model m:

Oasys.D3PLOT.SetBeam.GetFlagged(m, f)

To return a list containing the value of property ‘foo’ (for example ‘label’ for a node) for all beam sets flagged with flag f in model m:

a = Oasys.D3PLOT.SetBeam.GetFlagged(m, f, 'foo');
classmethod SetBeam.GetFromID(model, label)

Returns the SetBeam object for beam set in model with label (or None if it does not exist)

Parameters:
  • model (Model) – Model to get beam set in

  • label (integer) – The Ansys LS-DYNA label for the beam set in the model

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the beam set in model m with label 1000:

s = Oasys.D3PLOT.SetBeam.GetFromID(m, 1000)
classmethod SetBeam.GetFromIndex(model, index)

Returns the SetBeam object for beam set in model with index (or None if it does not exist)

Parameters:
  • model (Model) – Model to get beam set in

  • index (integer) – The D3PLOT internal index in the model for beam set, starting at 0

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the 51st beam set in model m:

s = Oasys.D3PLOT.SetBeam.GetFromIndex(m, 50)
classmethod SetBeam.Last(model)

Returns the last beam set in the model (or None if there are no beam sets in the model)

Parameters:

model (Model) – Model to get last beam set in

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the last beam set in model m:

s = Oasys.D3PLOT.SetBeam.Last(m)
classmethod SetBeam.Total(model)

Returns the total number of beam sets in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of beam sets

Return type:

integer

Example

To get the number of beam sets in model m:

total = Oasys.D3PLOT.SetBeam.Total(m)
classmethod SetBeam.UnflagAll(model, flag)

Unsets a defined flag on all of the beam sets in the model

Parameters:
  • model (Model) – Model that the defined flag for all beam sets will be unset in

  • flag (Flag) – Flag (see AllocateFlag) to unset on the beam sets

Returns:

No return value

Return type:

None

Example

To unset flag f on all of the beam sets in model m:

Oasys.D3PLOT.SetBeam.UnflagAll(m, f)

Instance methods

SetBeam.AllItems()

Returns all of the beam items for the beam set in the model

Returns:

list of Beam objects

Return type:

list

Example

To get the beam items in beam set s:

items = s.AllItems()
SetBeam.ClearFlag(flag)

Clears a flag on a beam set

Parameters:

flag (Flag) – Flag (see AllocateFlag) to clear on the beam set

Returns:

No return value

Return type:

None

Example

To clear flag f on beam set s:

s.ClearFlag()
SetBeam.Flagged(flag)

Checks if the beam set is flagged or not

Parameters:

flag (Flag) – Flag (see AllocateFlag) to test on the beam set

Returns:

True if flagged, False if not

Return type:

boolean

Example

To check if beam set s has flag f set on it:

if s.Flagged(f):
    do_something..
SetBeam.Item(index)

Returns a beam item from the beam set in the model

Parameters:

index (integer) – The index in the beam set to get the beam from (0 <= index < total)

Returns:

Beam object

Return type:

Beam

Example

To get the 10th beam in beam set s:

items = s.Item(9)
SetBeam.Next()

Returns the next beam set in the model (or None if there is not one)

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the next beam set after beam set s:

s = s.Next()
SetBeam.Previous()

Returns the previous beam set in the model (or None if there is not one)

Returns:

SetBeam object

Return type:

SetBeam

Example

To get the previous beam set before beam set s:

s = s.Previous()
SetBeam.SetFlag(flag)

Sets a flag on a beam set

Parameters:

flag (Flag) – Flag (see AllocateFlag) to set on the beam set

Returns:

No return value

Return type:

None

Example

To set flag f on beam set s:

s.SetFlag(f)