Oasys.PRIMER.DampingPartStructural class

Constants

DampingPartStructural.PART

PART is *DAMPING_PART_STRUCTURAL

DampingPartStructural.SET

SET is *DAMPING_PART_STRUCTURAL_SET

Properties

property DampingPartStructural.coef: float

Structural damping coefficient

property DampingPartStructural.exists(read only): boolean

true if damping part structural exists, false if referred to but not defined

property DampingPartStructural.id: integer

Part/part set id

property DampingPartStructural.include: integer

The Include file number that the damping part structural is in

property DampingPartStructural.model(read only): integer

The Model number that the damping part structural is in

property DampingPartStructural.type: constant

The DampingPartStructural type. Can be: DampingPartStructural.PART or DampingPartStructural.SET

Constructor

classmethod DampingPartStructural(model, type, id, coef=Oasys.gRPC.defaultArg)

Create a new DampingPartStructural object for *DAMPING_PART_STRUCTURAL

Parameters:
Returns:

DampingPartStructural object

Return type:

DampingPartStructural

Example

To create a new damping part structural (of type PART) in model m with id, coef set to 11, 2.5 respectively:

ps = Oasys.PRIMER.DampingPartStructural(m, Oasys.PRIMER.DampingPartStructural.PART, 11, 2.5)

Static methods

classmethod DampingPartStructural.BlankAll(model, redraw=Oasys.gRPC.defaultArg)

Blanks all of the damping part structurals in the model

Parameters:
  • model (Model) – Model that all damping part structurals will be blanked in

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the damping part structurals in model m:

Oasys.PRIMER.DampingPartStructural.BlankAll(m)
classmethod DampingPartStructural.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Blanks all of the flagged damping part structurals in the model

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

  • flag (Flag) – Flag set on the damping part structurals that you want to blank

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the damping part structurals in model m flagged with f:

Oasys.PRIMER.DampingPartStructural.BlankFlagged(m, f)
classmethod DampingPartStructural.First(model)

Returns the first damping part structural in the model

Parameters:

model (Model) – Model to get first damping part structural in

Returns:

DampingPartStructural object (or None if there are no damping part structurals in the model)

Return type:

DampingPartStructural

Example

To get the first damping part structural in model m:

ps = Oasys.PRIMER.DampingPartStructural.First(m)
classmethod DampingPartStructural.FlagAll(model, flag)

Flags all of the damping part structurals in the model with a defined flag

Parameters:
  • model (Model) – Model that all damping part structurals will be flagged in

  • flag (Flag) – Flag to set on the damping part structurals

Returns:

No return value

Return type:

None

Example

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

Oasys.PRIMER.DampingPartStructural.FlagAll(m, f)
classmethod DampingPartStructural.GetAll(model, property=Oasys.gRPC.defaultArg)

Returns a list of DampingPartStructural objects or properties for all of the damping part structurals in a model in PRIMER. If the optional property argument is not given then a list of DampingPartStructural objects is returned. If the property argument is given, that property value for each damping part structural is returned in the list instead of a DampingPartStructural object

Parameters:
  • model (Model) – Model to get damping part structurals from

  • property (string) – Optional. Name for property to get for all damping part structurals in the model

Returns:

List of DampingPartStructural objects or properties

Return type:

list

Example

To make a list of DampingPartStructural objects for all of the damping part structurals in model m:

a = Oasys.PRIMER.DampingPartStructural.GetAll(m)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for each damping part structural in model m:

a = Oasys.PRIMER.DampingPartStructural.GetAll(m, 'foo')
classmethod DampingPartStructural.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)

Returns a list of DampingPartStructural objects for all of the flagged damping part structurals in a model in PRIMER If the optional property argument is not given then a list of DampingPartStructural objects is returned. If the property argument is given, then that property value for each damping part structural is returned in the list instead of a DampingPartStructural object

Parameters:
  • model (Model) – Model to get damping part structurals from

  • flag (Flag) – Flag set on the damping part structurals that you want to retrieve

  • property (string) – Optional. Name for property to get for all flagged damping part structurals in the model

Returns:

List of DampingPartStructural objects or properties

Return type:

list

Example

To make a list of DampingPartStructural objects for all of the damping part structurals in model m flagged with f:

ps = Oasys.PRIMER.DampingPartStructural.GetFlagged(m, f)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for all of the damping part structurals in model m flagged with f:

a = Oasys.PRIMER.DampingPartStructural.GetFlagged(m, f, 'foo')
classmethod DampingPartStructural.GetFromID(model, number)

Returns the DampingPartStructural object for a damping part structural ID

Parameters:
  • model (Model) – Model to find the damping part structural in

  • number (integer) – number of the damping part structural you want the DampingPartStructural object for

Returns:

DampingPartStructural object (or None if damping part structural does not exist)

Return type:

DampingPartStructural

Example

To get the DampingPartStructural object for damping part structural 100 in model m

ps = Oasys.PRIMER.DampingPartStructural.GetFromID(m, 100)
classmethod DampingPartStructural.Last(model)

Returns the last damping part structural in the model

Parameters:

model (Model) – Model to get last damping part structural in

Returns:

DampingPartStructural object (or None if there are no damping part structurals in the model)

Return type:

DampingPartStructural

Example

To get the last damping part structural in model m:

ps = Oasys.PRIMER.DampingPartStructural.Last(m)
classmethod DampingPartStructural.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)

Allows the user to pick a damping part structural

Parameters:
  • prompt (string) – Text to display as a prompt to the user

  • limit (Model or Flag) – Optional. If the argument is a Model then only damping part structurals from that model can be picked. If the argument is a Flag then only damping part structurals that are flagged with limit can be selected. If omitted, or None, any damping part structurals from any model can be selected. from any model

  • modal (boolean) – Optional. If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal

  • button_text (string) – Optional. By default the window with the prompt will have a button labelled ‘Cancel’ which if pressed will cancel the pick and return None. If you want to change the text on the button use this argument. If omitted ‘Cancel’ will be used

Returns:

DampingPartStructural object (or None if not picked)

Return type:

DampingPartStructural

Example

To pick a damping part structural from model m giving the prompt ‘Pick damping part structural from screen’:

ps = Oasys.PRIMER.DampingPartStructural.Pick('Pick damping part structural from screen', m)
classmethod DampingPartStructural.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select damping part structurals using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting damping part structurals

  • prompt (string) – Text to display as a prompt to the user

  • limit (Model or Flag) – Optional. If the argument is a Model then only damping part structurals from that model can be selected. If the argument is a Flag then only damping part structurals that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any damping part structurals can be selected. from any model

  • modal (boolean) – Optional. If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal

Returns:

Number of damping part structurals selected or None if menu cancelled

Return type:

int

Example

To select damping part structurals from model m, flagging those selected with flag f, giving the prompt ‘Select damping part structurals’:

Oasys.PRIMER.DampingPartStructural.Select(f, 'Select damping part structurals', m)

To select damping part structurals, flagging those selected with flag f but limiting selection to damping part structurals flagged with flag l, giving the prompt ‘Select damping part structurals’:

Oasys.PRIMER.DampingPartStructural.Select(f, 'Select damping part structurals', l)
classmethod DampingPartStructural.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Sketches all of the flagged damping part structurals in the model. The damping part structurals will be sketched until you either call DampingPartStructural.Unsketch(), DampingPartStructural.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

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

  • flag (Flag) – Flag set on the damping part structurals that you want to sketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the damping part structurals are sketched. If omitted redraw is true. If you want to sketch flagged damping part structurals several times and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To sketch all damping part structurals flagged with flag in model m:

Oasys.PRIMER.DampingPartStructural.SketchFlagged(m, flag)
classmethod DampingPartStructural.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of damping part structurals in the model

Parameters:
  • model (Model) – Model to get total for

  • exists (boolean) – Optional. true if only existing damping part structurals should be counted. If false or omitted referenced but undefined damping part structurals will also be included in the total

Returns:

number of damping part structurals

Return type:

int

Example

To get the total number of damping part structurals in model m:

total = Oasys.PRIMER.DampingPartStructural.Total(m)
classmethod DampingPartStructural.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the damping part structurals in the model

Parameters:
  • model (Model) – Model that all damping part structurals will be unblanked in

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the damping part structurals in model m:

Oasys.PRIMER.DampingPartStructural.UnblankAll(m)
classmethod DampingPartStructural.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the flagged damping part structurals in the model

Parameters:
  • model (Model) – Model that the flagged damping part structurals will be unblanked in

  • flag (Flag) – Flag set on the damping part structurals that you want to unblank

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the damping part structurals in model m flagged with f:

Oasys.PRIMER.DampingPartStructural.UnblankFlagged(m, f)
classmethod DampingPartStructural.UnflagAll(model, flag)

Unsets a defined flag on all of the damping part structurals in the model

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

  • flag (Flag) – Flag to unset on the damping part structurals

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the damping part structurals in model m:

Oasys.PRIMER.DampingPartStructural.UnflagAll(m, f)
classmethod DampingPartStructural.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)

Unsketches all damping part structurals

Parameters:
  • model (Model) – Model that all damping part structurals will be unblanked in

  • redraw (boolean) – Optional. If model should be redrawn or not after the damping part structurals are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch all damping part structurals in model m:

Oasys.PRIMER.DampingPartStructural.UnsketchAll(m)
classmethod DampingPartStructural.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unsketches all flagged damping part structurals in the model

Parameters:
  • model (Model) – Model that all damping part structurals will be unsketched in

  • flag (Flag) – Flag set on the damping part structurals that you want to unsketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the damping part structurals are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch all damping part structurals flagged with flag in model m:

Oasys.PRIMER.DampingPartStructural.UnsketchAll(m, flag)

Instance methods

DampingPartStructural.AssociateComment(comment)

Associates a comment with a damping part structural

Parameters:

comment (Comment) – Comment that will be attached to the damping part structural

Returns:

No return value

Return type:

None

Example

To associate comment c to the damping part structural ps:

ps.AssociateComment(c)
DampingPartStructural.Blank()

Blanks the damping part structural

Returns:

No return value

Return type:

None

Example

To blank damping part structural ps:

ps.Blank()
DampingPartStructural.Blanked()

Checks if the damping part structural is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if damping part structural ps is blanked:

if ps.Blanked():
    do_something..
DampingPartStructural.ClearFlag(flag)

Clears a flag on the damping part structural

Parameters:

flag (Flag) – Flag to clear on the damping part structural

Returns:

No return value

Return type:

None

Example

To clear flag f for damping part structural ps:

ps.ClearFlag(f)
DampingPartStructural.Copy(range=Oasys.gRPC.defaultArg)

Copies the damping part structural. The target include of the copied damping part structural can be set using Options.copy_target_include

Parameters:

range (boolean) – Optional. If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer()

Returns:

DampingPartStructural object

Return type:

DampingPartStructural

Example

To copy damping part structural ps into damping part structural z:

z = ps.Copy()
DampingPartStructural.DetachComment(comment)

Detaches a comment from a damping part structural

Parameters:

comment (Comment) – Comment that will be detached from the damping part structural

Returns:

No return value

Return type:

None

Example

To detach comment c from the damping part structural ps:

ps.DetachComment(c)
DampingPartStructural.Flagged(flag)

Checks if the damping part structural is flagged or not

Parameters:

flag (Flag) – Flag to test on the damping part structural

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if damping part structural ps has flag f set on it:

if ps.Flagged(f):
    do_something..
DampingPartStructural.GetComments()

Extracts the comments associated to a damping part structural

Returns:

List of Comment objects (or None if there are no comments associated to the node)

Return type:

list

Example

To get the list of comments associated to the damping part structural ps:

comm_list = ps.GetComments()
DampingPartStructural.GetParameter(prop)

Checks if a DampingPartStructural property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the DampingPartStructural.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – damping part structural property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if DampingPartStructural property ps.example is a parameter:

Oasys.PRIMER.Options.property_parameter_names = True
if ps.GetParameter(ps.example):
    do_something...
Oasys.PRIMER.Options.property_parameter_names = False

To check if DampingPartStructural property ps.example is a parameter by using the GetParameter method:

if ps.ViewParameters().GetParameter(ps.example):
    do_something..
DampingPartStructural.Keyword()

Returns the keyword for this damping part structural (*DAMPING_PART_STRUCTURAL). Note that a carriage return is not added. See also DampingPartStructural.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for damping part structural m:

key = fr.Keyword()
DampingPartStructural.KeywordCards()

Returns the keyword cards for the damping part structural. Note that a carriage return is not added. See also DampingPartStructural.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for damping part structural fr:

cards = fr.KeywordCards()
DampingPartStructural.Next()

Returns the next damping part structural in the model

Returns:

DampingPartStructural object (or None if there are no more damping part structurals in the model)

Return type:

DampingPartStructural

Example

To get the damping part structural in model m after damping part structural ps:

ps = ps.Next()
DampingPartStructural.Previous()

Returns the previous damping part structural in the model

Returns:

DampingPartStructural object (or None if there are no more damping part structurals in the model)

Return type:

DampingPartStructural

Example

To get the damping part structural in model m before damping part structural ps:

ps = ps.Previous()
DampingPartStructural.SetFlag(flag)

Sets a flag on the damping part structural

Parameters:

flag (Flag) – Flag to set on the damping part structural

Returns:

No return value

Return type:

None

Example

To set flag f for damping part structural ps:

ps.SetFlag(f)
DampingPartStructural.Sketch(redraw=Oasys.gRPC.defaultArg)

Sketches the damping part structural. The damping part structural will be sketched until you either call DampingPartStructural.Unsketch(), DampingPartStructural.UnsketchAll(), Model.UnsketchAll(), or delete the model

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the damping part structural is sketched. If omitted redraw is true. If you want to sketch several damping part structurals and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To sketch damping part structural ps:

ps.Sketch()
DampingPartStructural.Unblank()

Unblanks the damping part structural

Returns:

No return value

Return type:

None

Example

To unblank damping part structural ps:

ps.Unblank()
DampingPartStructural.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the damping part structural

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the damping part structural is unsketched. If omitted redraw is true. If you want to unsketch several damping part structurals and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch damping part structural ps:

ps.Unsketch()
DampingPartStructural.ViewParameters()

Object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with ‘method chaining’ (see the example below) to make sure a property argument is correct

Returns:

DampingPartStructural object

Return type:

DampingPartStructural

Example

To check if DampingPartStructural property ps.example is a parameter by using the DampingPartStructural.GetParameter() method:

if ps.ViewParameters().GetParameter(ps.example):
    do_something..
DampingPartStructural.Xrefs()

Returns the cross references for this damping part structural

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for damping part structural ps:

xrefs = ps.Xrefs()