Oasys.D3PLOT.SetPart class

Properties

property SetPart.include: integer

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

property SetPart.index: integer

The internal index for the part set in D3PLOT

property SetPart.label: integer

The LS-DYNA label for the part set

property SetPart.model: Model

The Model that the part set is in

property SetPart.title: string

The title for the part 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 SetPart.total: integer

The total number of part items in the part set

property SetPart.type: constant

The type for the part set (will be Type.SETPART)

Static methods

classmethod SetPart.First(model)

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

Parameters:

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

Returns:

SetPart object

Return type:

SetPart

Example

To get the first part set in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

Oasys.D3PLOT.SetPart.FlagAll(m, f)
classmethod SetPart.GetAll(model)

Gets all of the part sets in the model

Parameters:

model (Model) – Model that all the part sets are in

Returns:

List of SetPart objects

Return type:

list

Example

To get all of the part sets in model m:

s = Oasys.D3PLOT.SetPart.GetAll(m)
classmethod SetPart.GetFlagged(model, flag)

Gets all of the part sets in the model flagged with a defined flag

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

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

Returns:

List of SetPart objects

Return type:

list

Example

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

Oasys.D3PLOT.SetPart.GetFlagged(m, f)
classmethod SetPart.GetFromID(model, label)

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

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

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

Returns:

SetPart object

Return type:

SetPart

Example

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

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

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

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

  • index (integer) – The D3PLOT internal index in the model for part set

Returns:

SetPart object

Return type:

SetPart

Example

To get the part set in model m at index 50:

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

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

Parameters:

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

Returns:

SetPart object

Return type:

SetPart

Example

To get the last part set in model m:

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

Returns the total number of part sets in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of part sets

Return type:

integer

Example

To get the number of part sets in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Instance methods

SetPart.AllItems()

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

Returns:

list of Part objects

Return type:

list

Example

To get the part items in part set s:

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

Clears a flag on a part set

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f on part set s:

s.ClearFlag()
SetPart.Flagged(flag)

Checks if the part set is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

boolean

Example

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

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

Returns a part item from the part set in the model

Parameters:

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

Returns:

Part object

Return type:

Part

Example

To get the 10th part in part set s:

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

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

Returns:

SetPart object

Return type:

SetPart

Example

To get the next part set after part set s:

s = s.Next()
SetPart.Previous()

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

Returns:

SetPart object

Return type:

SetPart

Example

To get the previous part set before part set s:

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

Sets a flag on a part set

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f on part set s:

s.SetFlag(f)