Oasys.PRIMER.LoadBeam class

Constants

LoadBeam.ELEMENT

Load is *LOAD_BEAM_ELEMENT

LoadBeam.SET

LOAD is *LOAD_BEAM_SET

Properties

property LoadBeam.dal: integer

Direction of applied load. 1 for r-axis, 2 for s-axis or 3 for t-axis of beam

property LoadBeam.eid: integer

Node property is an alternative name for this

property LoadBeam.esid: integer

Node property is an alternative name for this

property LoadBeam.exists(read only): boolean

true if load beam exists, false if referred to but not defined

property LoadBeam.include: integer

The Include file number that the load beam is in

property LoadBeam.lcid: integer

Curve ID or function ID

property LoadBeam.model(read only): integer

The Model number that the load beam is in

property LoadBeam.sf: float

Load curve scale factor

property LoadBeam.type: constant

The Load Beam type. Can be LoadBeam.ELEMENT or LoadBeam.SET

Constructor

classmethod LoadBeam(model, type, eid_esid, dal, lcid, sf=Oasys.gRPC.defaultArg)

Create a new LoadBeam object

Parameters:
  • model (Model) – Model that load beam will be created in

  • type (constant) – Specify the type of load beam (Can be LoadBeam.ELEMENT or LoadBeam.SET)

  • eid_esid (integer) – Beam ID or beam set ID

  • dal (integer) – Direction of applied load. 1 for r-axis, 2 for s-axis or 3 for t-axis of beam

  • lcid (integer) – Curve ID

  • sf (float) – Optional. Load curve scale factor

Returns:

LoadBeam object

Return type:

dict

Example

To create a new load beam in model m, of type SET, with beam set 100, load parallel to s-axis, loadcurve 9 and a scale factor of 0.5:

lb = Oasys.PRIMER.LoadBeam(m, Oasys.PRIMER.LoadBeam.SET, 100, 2, 9, 0.5)

Static methods

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

Blanks all of the load beams in the model

Parameters:
  • model (Model) – Model that all load beams 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 load beams in model m:

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

Blanks all of the flagged load beams in the model

Parameters:
  • model (Model) – Model that all the flagged load beams will be blanked in

  • flag (Flag) – Flag set on the load beams 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 load beams in model m flagged with f:

Oasys.PRIMER.LoadBeam.BlankFlagged(m, f)
classmethod LoadBeam.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create a load beam definition

Parameters:
  • model (Model) – Model that the load beam will be created in

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

Returns:

LoadBeam object (or None if not made)

Return type:

dict

Example

To start creating a load beam definition in model m:

lb = Oasys.PRIMER.LoadBeam.Create(m)
classmethod LoadBeam.First(model)

Returns the first load beam in the model

Parameters:

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

Returns:

LoadBeam object (or None if there are no load beams in the model)

Return type:

LoadBeam

Example

To get the first load beam in model m:

lb = Oasys.PRIMER.LoadBeam.First(m)
classmethod LoadBeam.FlagAll(model, flag)

Flags all of the load beams in the model with a defined flag

Parameters:
  • model (Model) – Model that all load beams will be flagged in

  • flag (Flag) – Flag to set on the load beams

Returns:

No return value

Return type:

None

Example

To flag all of the load beams with flag f in model m:

Oasys.PRIMER.LoadBeam.FlagAll(m, f)
classmethod LoadBeam.GetAll(model)

Returns a list of LoadBeam objects for all of the load beams in a model in PRIMER

Parameters:

model (Model) – Model to get load beams from

Returns:

List of LoadBeam objects

Return type:

list

Example

To make a list of LoadBeam objects for all of the load beams in model m

lb = Oasys.PRIMER.LoadBeam.GetAll(m)
classmethod LoadBeam.GetFlagged(model, flag)

Returns a list of LoadBeam objects for all of the flagged load beams in a model in PRIMER

Parameters:
  • model (Model) – Model to get load beams from

  • flag (Flag) – Flag set on the load beams that you want to retrieve

Returns:

List of LoadBeam objects

Return type:

list

Example

To make a list of LoadBeam objects for all of the load beams in model m flagged with f

lb = Oasys.PRIMER.LoadBeam.GetFlagged(m, f)
classmethod LoadBeam.GetFromID(model, number)

Returns the LoadBeam object for a load beam ID

Parameters:
  • model (Model) – Model to find the load beam in

  • number (integer) – number of the load beam you want the LoadBeam object for

Returns:

LoadBeam object (or None if load beam does not exist)

Return type:

LoadBeam

Example

To get the LoadBeam object for load beam 100 in model m

lb = Oasys.PRIMER.LoadBeam.GetFromID(m, 100)
classmethod LoadBeam.Last(model)

Returns the last load beam in the model

Parameters:

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

Returns:

LoadBeam object (or None if there are no load beams in the model)

Return type:

LoadBeam

Example

To get the last load beam in model m:

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

Allows the user to pick a load beam

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 load beams from that model can be picked. If the argument is a Flag then only load beams that are flagged with limit can be selected. If omitted, or None, any load beams 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:

LoadBeam object (or None if not picked)

Return type:

dict

Example

To pick a load beam from model m giving the prompt ‘Pick load beam from screen’:

lb = Oasys.PRIMER.LoadBeam.Pick('Pick load beam from screen', m)
classmethod LoadBeam.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select load beams using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting load beams

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

  • limit (Model or Flag) – Optional. If the argument is a Model then only load beams from that model can be selected. If the argument is a Flag then only load beams that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any load beams 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 load beams selected or None if menu cancelled

Return type:

int

Example

To select load beams from model m, flagging those selected with flag f, giving the prompt ‘Select load beams’:

Oasys.PRIMER.LoadBeam.Select(f, 'Select load beams', m)

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

Oasys.PRIMER.LoadBeam.Select(f, 'Select load beams', l)
classmethod LoadBeam.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Sketches all of the flagged load beams in the model. The load beams will be sketched until you either call LoadBeam.Unsketch(), LoadBeam.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

Parameters:
  • model (Model) – Model that all the flagged load beams will be sketched in

  • flag (Flag) – Flag set on the load beams that you want to sketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the load beams are sketched. If omitted redraw is true. If you want to sketch flagged load beams 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 load beams flagged with flag in model m:

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

Returns the total number of load beams in the model

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

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

Returns:

number of load beams

Return type:

int

Example

To get the total number of load beams in model m:

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

Unblanks all of the load beams in the model

Parameters:
  • model (Model) – Model that all load beams 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 load beams in model m:

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

Unblanks all of the flagged load beams in the model

Parameters:
  • model (Model) – Model that the flagged load beams will be unblanked in

  • flag (Flag) – Flag set on the load beams 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 load beams in model m flagged with f:

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

Unsets a defined flag on all of the load beams in the model

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

  • flag (Flag) – Flag to unset on the load beams

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the load beams in model m:

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

Unsketches all load beams

Parameters:
  • model (Model) – Model that all load beams will be unblanked in

  • redraw (boolean) – Optional. If model should be redrawn or not after the load beams 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 load beams in model m:

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

Unsketches all flagged load beams in the model

Parameters:
  • model (Model) – Model that all load beams will be unsketched in

  • flag (Flag) – Flag set on the load beams that you want to unsketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the load beams 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 load beams flagged with flag in model m:

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

Instance methods

LoadBeam.AssociateComment(comment)

Associates a comment with a load beam

Parameters:

comment (Comment) – Comment that will be attached to the load beam

Returns:

No return value

Return type:

None

Example

To associate comment c to the load beam lb:

lb.AssociateComment(c)
LoadBeam.Blank()

Blanks the load beam

Returns:

No return value

Return type:

None

Example

To blank load beam lb:

lb.Blank()
LoadBeam.Blanked()

Checks if the load beam is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if load beam lb is blanked:

if lb.Blanked():
    do_something..
LoadBeam.Browse(modal=Oasys.gRPC.defaultArg)

Starts an edit panel in Browse mode

Parameters:

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

Returns:

no return value

Return type:

None

Example

To Browse load beam lb:

lb.Browse()
LoadBeam.ClearFlag(flag)

Clears a flag on the load beam

Parameters:

flag (Flag) – Flag to clear on the load beam

Returns:

No return value

Return type:

None

Example

To clear flag f for load beam lb:

lb.ClearFlag(f)
LoadBeam.Copy(range=Oasys.gRPC.defaultArg)

Copies the load beam. The target include of the copied load beam 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:

LoadBeam object

Return type:

LoadBeam

Example

To copy load beam lb into load beam z:

z = lb.Copy()
LoadBeam.DetachComment(comment)

Detaches a comment from a load beam

Parameters:

comment (Comment) – Comment that will be detached from the load beam

Returns:

No return value

Return type:

None

Example

To detach comment c from the load beam lb:

lb.DetachComment(c)
LoadBeam.Edit(modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel

Parameters:

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

Returns:

no return value

Return type:

None

Example

To Edit load beam lb:

lb.Edit()
LoadBeam.Flagged(flag)

Checks if the load beam is flagged or not

Parameters:

flag (Flag) – Flag to test on the load beam

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if load beam lb has flag f set on it:

if lb.Flagged(f):
    do_something..
LoadBeam.GetComments()

Extracts the comments associated to a load beam

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 load beam lb:

comm_list = lb.GetComments()
LoadBeam.GetParameter(prop)

Checks if a LoadBeam 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 LoadBeam.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – load beam property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if LoadBeam property lb.example is a parameter:

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

To check if LoadBeam property lb.example is a parameter by using the GetParameter method:

if lb.ViewParameters().GetParameter(lb.example):
    do_something..
LoadBeam.Keyword()

Returns the keyword for this load beam (*LOAD_BEAM_xxxx). Note that a carriage return is not added. See also LoadBeam.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for load beam lb:

key = lb.Keyword()
LoadBeam.KeywordCards()

Returns the keyword cards for the load beam. Note that a carriage return is not added. See also LoadBeam.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for load beam lb:

cards = lb.KeywordCards()
LoadBeam.Next()

Returns the next load beam in the model

Returns:

LoadBeam object (or None if there are no more load beams in the model)

Return type:

LoadBeam

Example

To get the load beam in model m after load beam lb:

lb = lb.Next()
LoadBeam.Previous()

Returns the previous load beam in the model

Returns:

LoadBeam object (or None if there are no more load beams in the model)

Return type:

LoadBeam

Example

To get the load beam in model m before load beam lb:

lb = lb.Previous()
LoadBeam.SetFlag(flag)

Sets a flag on the load beam

Parameters:

flag (Flag) – Flag to set on the load beam

Returns:

No return value

Return type:

None

Example

To set flag f for load beam lb:

lb.SetFlag(f)
LoadBeam.Sketch(redraw=Oasys.gRPC.defaultArg)

Sketches the load beam. The load beam will be sketched until you either call LoadBeam.Unsketch(), LoadBeam.UnsketchAll(), Model.UnsketchAll(), or delete the model

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the load beam is sketched. If omitted redraw is true. If you want to sketch several load beams 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 load beam lb:

lb.Sketch()
LoadBeam.Unblank()

Unblanks the load beam

Returns:

No return value

Return type:

None

Example

To unblank load beam lb:

lb.Unblank()
LoadBeam.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the load beam

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the load beam is unsketched. If omitted redraw is true. If you want to unsketch several load beams 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 load beam lb:

lb.Unsketch()
LoadBeam.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:

LoadBeam object

Return type:

dict

Example

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

if lb.ViewParameters().GetParameter(lb.example):
    do_something..
LoadBeam.Xrefs()

Returns the cross references for this load beam

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for load beam lb:

xrefs = lb.Xrefs()