Oasys.PRIMER.LoadNode class

Constants

LoadNode.POINT

Load is *LOAD_NODE_POINT

LoadNode.SET

LOAD is *LOAD_NODE_SET

LoadNode.SET_ONCE

LOAD is *LOAD_NODE_SET_ONCE

Properties

property LoadNode.cid: integer

Coordinate system ID

property LoadNode.dof: integer

Applicable degrees-of-freedom

property LoadNode.exists(read only): boolean

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

property LoadNode.include: integer

The Include file number that the load node is in

property LoadNode.lcid: integer

Curve ID

property LoadNode.m1: integer

Node 1 ID

property LoadNode.m2: integer

Node 2 ID

property LoadNode.m3: integer

Node 3 ID

property LoadNode.model(read only): integer

The Model number that the load node is in

property LoadNode.nid: integer

Node ID or node set ID

property LoadNode.sf: float

Curve scale factor

property LoadNode.type: constant

The Load Node type. Can be LoadNode.POINT or LoadNode.SET. LoadNode.SET_ONCE

Constructor

classmethod LoadNode(model, type, nid, dof, lcid, sf=Oasys.gRPC.defaultArg, cid=Oasys.gRPC.defaultArg, m1=Oasys.gRPC.defaultArg, m2=Oasys.gRPC.defaultArg, m3=Oasys.gRPC.defaultArg, lcidsf=Oasys.gRPC.defaultArg)

Create a new LoadNode object

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

  • type (constant) – Specify the type of load node (Can be LoadNode.POINT or LoadNode.SET) LoadNode.SET_ONCE)

  • nid (integer) – Node ID or node set ID

  • dof (integer) – Applicable degrees-of-freedom

  • lcid (integer) – Curve ID

  • sf (float) – Optional. Curve scale factor

  • cid (integer) – Optional. Coordinate system ID

  • m1 (integer) – Optional. Node 1 ID

  • m2 (integer) – Optional. Node 2 ID

  • m3 (integer) – Optional. Node 3 ID

  • lcidsf (integer) – Optional. Curve ID

Returns:

LoadNode object

Return type:

dict

Example

To create a new load node in model m, of type SET, with loadcurve 9 and a scale factor of 0.5

b = Oasys.PRIMER.LoadNode(m, Oasys.PRIMER.LoadNode.SET, 100, 2, 9, 0.5)

Static methods

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

Blanks all of the load nodes in the model

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

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

Blanks all of the flagged load nodes in the model

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

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

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

Returns the first load node in the model

Parameters:

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

Returns:

LoadNode object (or None if there are no load nodes in the model)

Return type:

LoadNode

Example

To get the first load node in model m:

ln = Oasys.PRIMER.LoadNode.First(m)
classmethod LoadNode.FlagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Returns a list of LoadNode objects for all of the load nodes in a model in PRIMER

Parameters:

model (Model) – Model to get load nodes from

Returns:

List of LoadNode objects

Return type:

list

Example

To make a list of LoadNode objects for all of the load nodes in model m

ln = Oasys.PRIMER.LoadNode.GetAll(m)
classmethod LoadNode.GetFlagged(model, flag)

Returns a list of LoadNode objects for all of the flagged load nodes in a model in PRIMER

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

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

Returns:

List of LoadNode objects

Return type:

list

Example

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

ln = Oasys.PRIMER.LoadNode.GetFlagged(m, f)
classmethod LoadNode.GetFromID(model, number)

Returns the LoadNode object for a load node ID

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

  • number (integer) – number of the load node you want the LoadNode object for

Returns:

LoadNode object (or None if load node does not exist)

Return type:

LoadNode

Example

To get the LoadNode object for load node 100 in model m

ln = Oasys.PRIMER.LoadNode.GetFromID(m, 100)
classmethod LoadNode.Last(model)

Returns the last load node in the model

Parameters:

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

Returns:

LoadNode object (or None if there are no load nodes in the model)

Return type:

LoadNode

Example

To get the last load node in model m:

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

Allows the user to pick a load node

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

LoadNode object (or None if not picked)

Return type:

dict

Example

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

ln = Oasys.PRIMER.LoadNode.Pick('Pick load node from screen', m)
classmethod LoadNode.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

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

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

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

Return type:

int

Example

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

Oasys.PRIMER.LoadNode.Select(f, 'Select load nodes', m)

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

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

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

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

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

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

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

Returns the total number of load nodes in the model

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

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

Returns:

number of load nodes

Return type:

int

Example

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

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

Unblanks all of the load nodes in the model

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

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

Unblanks all of the flagged load nodes in the model

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

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Unsketches all load nodes

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

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

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

Unsketches all flagged load nodes in the model

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

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

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

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

Instance methods

LoadNode.AssociateComment(comment)

Associates a comment with a load node

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the load node ln:

ln.AssociateComment(c)
LoadNode.Blank()

Blanks the load node

Returns:

No return value

Return type:

None

Example

To blank load node ln:

ln.Blank()
LoadNode.Blanked()

Checks if the load node is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if load node ln is blanked:

if ln.Blanked():
    do_something..
LoadNode.ClearFlag(flag)

Clears a flag on the load node

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f for load node ln:

ln.ClearFlag(f)
LoadNode.Copy(range=Oasys.gRPC.defaultArg)

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

LoadNode object

Return type:

LoadNode

Example

To copy load node ln into load node z:

z = ln.Copy()
LoadNode.DetachComment(comment)

Detaches a comment from a load node

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the load node ln:

ln.DetachComment(c)
LoadNode.Flagged(flag)

Checks if the load node is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if load node ln has flag f set on it:

if ln.Flagged(f):
    do_something..
LoadNode.GetComments()

Extracts the comments associated to a load node

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 node ln:

comm_list = ln.GetComments()
LoadNode.GetParameter(prop)

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

Parameters:

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

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if LoadNode property ln.example is a parameter:

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

To check if LoadNode property ln.example is a parameter by using the GetParameter method:

if ln.ViewParameters().GetParameter(ln.example):
    do_something..
LoadNode.Keyword()

Returns the keyword for this load node (*LOAD_NODE_xxxx). Note that a carriage return is not added. See also LoadNode.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for load node m:

key = m.Keyword()
LoadNode.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for load node l:

cards = l.KeywordCards()
LoadNode.Next()

Returns the next load node in the model

Returns:

LoadNode object (or None if there are no more load nodes in the model)

Return type:

LoadNode

Example

To get the load node in model m after load node ln:

ln = ln.Next()
LoadNode.Previous()

Returns the previous load node in the model

Returns:

LoadNode object (or None if there are no more load nodes in the model)

Return type:

LoadNode

Example

To get the load node in model m before load node ln:

ln = ln.Previous()
LoadNode.SetFlag(flag)

Sets a flag on the load node

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f for load node ln:

ln.SetFlag(f)
LoadNode.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

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

ln.Sketch()
LoadNode.Unblank()

Unblanks the load node

Returns:

No return value

Return type:

None

Example

To unblank load node ln:

ln.Unblank()
LoadNode.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the load node

Parameters:

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

ln.Unsketch()
LoadNode.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:

LoadNode object

Return type:

dict

Example

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

if ln.ViewParameters().GetParameter(ln.example):
    do_something..
LoadNode.Xrefs()

Returns the cross references for this load node

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for load node ln:

xrefs = ln.Xrefs()