Oasys.PRIMER.PrescribedMotion class

Constants

PrescribedMotion.EDGE_UVW

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_EDGE_UVW

PrescribedMotion.FACE_XYZ

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_FACE_XYZ

PrescribedMotion.NODE

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_NODE

PrescribedMotion.NRBC

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_RIGID, with an NRB, not a part

PrescribedMotion.NRBC_LOCAL

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_RIGID_LOCAL, with an NRB, not a part

PrescribedMotion.POINT_UVW

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_POINT_UVW

PrescribedMotion.RIGID

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_RIGID

PrescribedMotion.RIGID_LOCAL

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_RIGID_LOCAL

PrescribedMotion.SET

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET

PrescribedMotion.SET_BOX

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_BOX

PrescribedMotion.SET_EDGE_UVW

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_EDGE_UVW

PrescribedMotion.SET_FACE_XYZ

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_FACE_XYZ

PrescribedMotion.SET_LINE

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_LINE

PrescribedMotion.SET_POINT_UVW

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_POINT_UVW

PrescribedMotion.SET_SEGMENT

Prescribed motion is *BOUNDARY_PRESCRIBED_MOTION_SET_SEGMENT

Properties

property PrescribedMotion.birth: float

Birth time

property PrescribedMotion.bndout2dynain: boolean

true if _BNDOUT2DYNAIN option is set, false if not

property PrescribedMotion.death: float

Death time

property PrescribedMotion.dof: integer

Degree of freedom

property PrescribedMotion.exists(read only): boolean

true if boundary prescribed motion exists, false if referred to but not defined

property PrescribedMotion.form: integer

Formulation type. Used for Card 6

property PrescribedMotion.heading: string

PrescribedMotion heading

property PrescribedMotion.id: boolean

true if _ID option is set, false if not

property PrescribedMotion.include: integer

The Include file number that the boundary prescribed motion is in

property PrescribedMotion.label: integer

PrescribedMotion number

property PrescribedMotion.lcid: integer

Load curve of motion vs. time

property PrescribedMotion.lrb: integer

Lead rigid body for measuring relative displacement

property PrescribedMotion.model(read only): integer

The Model number that the boundary prescribed motion is in

property PrescribedMotion.nbeg: integer

Node ID of a starting node. Used for PrescribedMotion.SET_LINE

property PrescribedMotion.nend: integer

Node ID of a ending node. Used for PrescribedMotion.SET_LINE

property PrescribedMotion.node1: integer

Optional orientation node for relative displacement

property PrescribedMotion.node2: integer

Optional orientation node for relative displacement

property PrescribedMotion.offset1: float

Offset 1 for types 9-11

property PrescribedMotion.offset2: float

Offset 2 for types 9-11

property PrescribedMotion.prmr: string

String representing the name of the parameter to be output to the dynain file. Used when PrescribedMotion.bndout2dynain is set to true

property PrescribedMotion.sf: float

Load curve scale factor

property PrescribedMotion.sfd: float

Scale factor for displacement penalty stiffness. Used for Card 6

property PrescribedMotion.type: constant

The Prescribed motion type. Can be PrescribedMotion.NODE, PrescribedMotion.SET, PrescribedMotion.RIGID, PrescribedMotion.RIGID_LOCAL, PrescribedMotion.NRBC, PrescribedMotion.NRBC_LOCAL, PrescribedMotion.SET_BOX, PrescribedMotion.SET_SEGMENT, PrescribedMotion.SET_LINE, PrescribedMotion.POINT_UVW, PrescribedMotion.EDGE_UVW, PrescribedMotion.FACE_XYZ, PrescribedMotion.SET_POINT_UVW, PrescribedMotion.SET_EDGE_UVW or PrescribedMotion.SET_FACE_XYZ

property PrescribedMotion.typeid: integer

Node ID, node set ID, part ID or NRB

property PrescribedMotion.vad: integer

Velocity/acceleration/displacement flag

property PrescribedMotion.vid: integer

Vector ID

Constructor

classmethod PrescribedMotion(model, typeid, dof, vad, lcid, type, label=Oasys.gRPC.defaultArg, heading=Oasys.gRPC.defaultArg)

Create a new PrescribedMotion object

Parameters:
Returns:

PrescribedMotion object

Return type:

dict

Example

To create a new displacement for node 100 in x using loadcurve 10 model m with label 200, of type SET

b = Oasys.PRIMER.PrescribedMotion(m, 100, 1, 2, 10, Oasys.PRIMER.PrescribedMotion.SET, 200)

Static methods

classmethod PrescribedMotion.AnimationBackward()

Moves backward one frame of a PrescribedMotion animation (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To move backward one frame of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationBackward()
classmethod PrescribedMotion.AnimationBegin(model, flag)

Begins a PrescribedMotion animation. This MUST be called before any of the other Animation methods. Also see the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Parameters:
  • model (Model) – Model that PrescribedMotions are in

  • flag (Flag) – Flag set on the PrescribedMotions that you want to animate

Returns:

Dict with properties

end:

(real) End time

frame:

(integer) Current frame

frames:

(integer) Number of frames

rate:

(integer) Animation speed in fps

repeat:

(integer) Animation repeat (0=off, 1=on)

start:

(real) Start time

time:

(real) Current time

timestep:

(real) Timestep

Return type:

dict

Example

To begin an animation of the PrescribedMotions in model m flagged with f:

aprops = Oasys.PRIMER.PrescribedMotion.AnimationBegin(m, f)
classmethod PrescribedMotion.AnimationFinish()

Finishes a PrescribedMotion animation. This MUST be called to finish animating. This will restore nodal coordinates but will not perform a graphics update. Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating

Returns:

No return value

Return type:

None

Example

To finish animating:

Oasys.PRIMER.PrescribedMotion.AnimationFinish()
classmethod PrescribedMotion.AnimationForward()

Moves forward one frame of a PrescribedMotion animation (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To move forward one frame of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationForward()
classmethod PrescribedMotion.AnimationGetData()

Returns the animation data (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

Dict with properties

end:

(real) End time

frame:

(integer) Current frame

frames:

(integer) Number of frames

rate:

(integer) Animation speed in fps

repeat:

(integer) Animation repeat (0=off, 1=on)

start:

(real) Start time

time:

(real) Current time

timestep:

(real) Timestep

Return type:

dict

Example

To get the current animation data:

Oasys.PRIMER.PrescribedMotion.AnimationGetData()
classmethod PrescribedMotion.AnimationPause()

Pauses playback of a PrescribedMotion animation. Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To pause playback of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationPause()
classmethod PrescribedMotion.AnimationPlay()

Starts playback of a PrescribedMotion animation. Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating.
This method should only be used from a script which implements a user interface so you can actually stop the animation! Don’t forget to add a pause/stop button that calls PrescribedMotion.AnimationPause()!

Returns:

No return value

Return type:

None

Example

To start playback of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationPlay()
classmethod PrescribedMotion.AnimationSetData(data)

Sets the current animation data (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Parameters:

data (dict) –

data returned from PrescribedMotion.AnimationBegin() or PrescribedMotion.AnimationGetData()

end:

(real) End time

frame:

(integer) Current frame

frames:

(integer) Number of frames

rate:

(integer) Animation speed in fps

repeat:

(integer) Animation repeat (0=off, 1=on)

start:

(real) Start time

time:

(real) Current time

timestep:

(real) Timestep

Returns:

No return value

Return type:

None

Example

To set the animation frame rate to 10 frames/sec:

data = Oasys.PRIMER.PrescribedMotion.AnimationGetData()
data["rate"] = 10
Oasys.PRIMER.PrescribedMotion.AnimationSetData(data)
classmethod PrescribedMotion.AnimationToEnd()

Moves to the end of a PrescribedMotion animation (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To move to the end of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationToEnd()
classmethod PrescribedMotion.AnimationToStart()

Moves to the start of a PrescribedMotion animation (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To move to the start of an animation:

Oasys.PRIMER.PrescribedMotion.AnimationToStart()
classmethod PrescribedMotion.AnimationToTime()

Moves to a specific time in a PrescribedMotion animation (pausing animation first if required). Also see the PrescribedMotion.AnimationBegin() method which MUST be called before you start animating and the PrescribedMotion.AnimationFinish() method which MUST be called after you have finished animating

Returns:

No return value

Return type:

None

Example

To move to time 28.0 in an animation:

Oasys.PRIMER.PrescribedMotion.AnimationToTime(28.0)
classmethod PrescribedMotion.BlankAll(model, redraw=Oasys.gRPC.defaultArg)

Blanks all of the boundary prescribed motions in the model

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

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

Blanks all of the flagged boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that all the flagged boundary prescribed motions will be blanked in

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

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

Returns the first boundary prescribed motion in the model

Parameters:

model (Model) – Model to get first boundary prescribed motion in

Returns:

PrescribedMotion object (or None if there are no boundary prescribed motions in the model)

Return type:

PrescribedMotion

Example

To get the first boundary prescribed motion in model m:

b = Oasys.PRIMER.PrescribedMotion.First(m)
classmethod PrescribedMotion.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the first free boundary prescribed motion label in the model. Also see PrescribedMotion.LastFreeLabel(), PrescribedMotion.NextFreeLabel() and Model.FirstFreeItemLabel()

Parameters:
  • model (Model) – Model to get first free boundary prescribed motion label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels)

Returns:

PrescribedMotion label

Return type:

int

Example

To get the first free boundary prescribed motion label in model m:

label = Oasys.PRIMER.PrescribedMotion.FirstFreeLabel(m)
classmethod PrescribedMotion.FlagAll(model, flag)

Flags all of the boundary prescribed motions in the model with a defined flag

Parameters:
  • model (Model) – Model that all boundary prescribed motions will be flagged in

  • flag (Flag) – Flag to set on the boundary prescribed motions

Returns:

No return value

Return type:

None

Example

To flag all of the boundary prescribed motions with flag f in model m:

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

Returns a list of PrescribedMotion objects for all of the boundary prescribed motions in a model in PRIMER

Parameters:

model (Model) – Model to get boundary prescribed motions from

Returns:

List of PrescribedMotion objects

Return type:

list

Example

To make a list of PrescribedMotion objects for all of the boundary prescribed motions in model m

b = Oasys.PRIMER.PrescribedMotion.GetAll(m)
classmethod PrescribedMotion.GetFlagged(model, flag)

Returns a list of PrescribedMotion objects for all of the flagged boundary prescribed motions in a model in PRIMER

Parameters:
  • model (Model) – Model to get boundary prescribed motions from

  • flag (Flag) – Flag set on the boundary prescribed motions that you want to retrieve

Returns:

List of PrescribedMotion objects

Return type:

list

Example

To make a list of PrescribedMotion objects for all of the boundary prescribed motions in model m flagged with f

b = Oasys.PRIMER.PrescribedMotion.GetFlagged(m, f)
classmethod PrescribedMotion.GetFromID(model, number)

Returns the PrescribedMotion object for a boundary prescribed motion ID

Parameters:
  • model (Model) – Model to find the boundary prescribed motion in

  • number (integer) – number of the boundary prescribed motion you want the PrescribedMotion object for

Returns:

PrescribedMotion object (or None if boundary prescribed motion does not exist)

Return type:

PrescribedMotion

Example

To get the PrescribedMotion object for boundary prescribed motion 100 in model m

b = Oasys.PRIMER.PrescribedMotion.GetFromID(m, 100)
classmethod PrescribedMotion.Last(model)

Returns the last boundary prescribed motion in the model

Parameters:

model (Model) – Model to get last boundary prescribed motion in

Returns:

PrescribedMotion object (or None if there are no boundary prescribed motions in the model)

Return type:

PrescribedMotion

Example

To get the last boundary prescribed motion in model m:

b = Oasys.PRIMER.PrescribedMotion.Last(m)
classmethod PrescribedMotion.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the last free boundary prescribed motion label in the model. Also see PrescribedMotion.FirstFreeLabel(), PrescribedMotion.NextFreeLabel() and see Model.LastFreeItemLabel()

Parameters:
  • model (Model) – Model to get last free boundary prescribed motion label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used

Returns:

PrescribedMotion label

Return type:

int

Example

To get the last free boundary prescribed motion label in model m:

label = Oasys.PRIMER.PrescribedMotion.LastFreeLabel(m)
classmethod PrescribedMotion.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the next free (highest+1) boundary prescribed motion label in the model. Also see PrescribedMotion.FirstFreeLabel(), PrescribedMotion.LastFreeLabel() and Model.NextFreeItemLabel()

Parameters:
  • model (Model) – Model to get next free boundary prescribed motion label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels)

Returns:

PrescribedMotion label

Return type:

int

Example

To get the next free boundary prescribed motion label in model m:

label = Oasys.PRIMER.PrescribedMotion.NextFreeLabel(m)
classmethod PrescribedMotion.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)

Allows the user to pick a boundary prescribed motion

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

PrescribedMotion object (or None if not picked)

Return type:

dict

Example

To pick a boundary prescribed motion from model m giving the prompt ‘Pick boundary prescribed motion from screen’:

b = Oasys.PRIMER.PrescribedMotion.Pick('Pick boundary prescribed motion from screen', m)
classmethod PrescribedMotion.RenumberAll(model, start)

Renumbers all of the boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that all boundary prescribed motions will be renumbered in

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the boundary prescribed motions in model m, from 1000000:

Oasys.PRIMER.PrescribedMotion.RenumberAll(m, 1000000)
classmethod PrescribedMotion.RenumberFlagged(model, flag, start)

Renumbers all of the flagged boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that all the flagged boundary prescribed motions will be renumbered in

  • flag (Flag) – Flag set on the boundary prescribed motions that you want to renumber

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the boundary prescribed motions in model m flagged with f, from 1000000:

Oasys.PRIMER.PrescribedMotion.RenumberFlagged(m, f, 1000000)
classmethod PrescribedMotion.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select boundary prescribed motions using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting boundary prescribed motions

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

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

Return type:

int

Example

To select boundary prescribed motions from model m, flagging those selected with flag f, giving the prompt ‘Select boundary prescribed motions’:

Oasys.PRIMER.PrescribedMotion.Select(f, 'Select boundary prescribed motions', m)

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

Oasys.PRIMER.PrescribedMotion.Select(f, 'Select boundary prescribed motions', l)
classmethod PrescribedMotion.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Sketches all of the flagged boundary prescribed motions in the model. The boundary prescribed motions will be sketched until you either call PrescribedMotion.Unsketch(), PrescribedMotion.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

Parameters:
  • model (Model) – Model that all the flagged boundary prescribed motions will be sketched in

  • flag (Flag) – Flag set on the boundary prescribed motions that you want to sketch

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

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

Returns the total number of boundary prescribed motions in the model

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

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

Returns:

number of boundary prescribed motions

Return type:

int

Example

To get the total number of boundary prescribed motions in model m:

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

Unblanks all of the boundary prescribed motions in the model

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

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

Unblanks all of the flagged boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that the flagged boundary prescribed motions will be unblanked in

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

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

Unsets a defined flag on all of the boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that the defined flag for all boundary prescribed motions will be unset in

  • flag (Flag) – Flag to unset on the boundary prescribed motions

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the boundary prescribed motions in model m:

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

Unsketches all boundary prescribed motions

Parameters:
  • model (Model) – Model that all boundary prescribed motions will be unblanked in

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

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

Unsketches all flagged boundary prescribed motions in the model

Parameters:
  • model (Model) – Model that all boundary prescribed motions will be unsketched in

  • flag (Flag) – Flag set on the boundary prescribed motions that you want to unsketch

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

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

Instance methods

PrescribedMotion.AssociateComment(comment)

Associates a comment with a boundary prescribed motion

Parameters:

comment (Comment) – Comment that will be attached to the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To associate comment c to the boundary prescribed motion b:

b.AssociateComment(c)
PrescribedMotion.Blank()

Blanks the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To blank boundary prescribed motion b:

b.Blank()
PrescribedMotion.Blanked()

Checks if the boundary prescribed motion is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if boundary prescribed motion b is blanked:

if b.Blanked():
    do_something..
PrescribedMotion.ClearFlag(flag)

Clears a flag on the boundary prescribed motion

Parameters:

flag (Flag) – Flag to clear on the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To clear flag f for boundary prescribed motion b:

b.ClearFlag(f)
PrescribedMotion.Copy(range=Oasys.gRPC.defaultArg)

Copies the boundary prescribed motion. The target include of the copied boundary prescribed motion 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:

PrescribedMotion object

Return type:

PrescribedMotion

Example

To copy boundary prescribed motion b into boundary prescribed motion z:

z = b.Copy()
PrescribedMotion.DetachComment(comment)

Detaches a comment from a boundary prescribed motion

Parameters:

comment (Comment) – Comment that will be detached from the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To detach comment c from the boundary prescribed motion b:

b.DetachComment(c)
PrescribedMotion.Flagged(flag)

Checks if the boundary prescribed motion is flagged or not

Parameters:

flag (Flag) – Flag to test on the boundary prescribed motion

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if boundary prescribed motion b has flag f set on it:

if b.Flagged(f):
    do_something..
PrescribedMotion.GetComments()

Extracts the comments associated to a boundary prescribed motion

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 boundary prescribed motion b:

comm_list = b.GetComments()
PrescribedMotion.GetParameter(prop)

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

Parameters:

prop (string) – boundary prescribed motion property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if PrescribedMotion property b.example is a parameter:

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

To check if PrescribedMotion property b.example is a parameter by using the GetParameter method:

if b.ViewParameters().GetParameter(b.example):
    do_something..
PrescribedMotion.Keyword()

Returns the keyword for this PrescribedMotion (*BOUNDARY_PRESCRIBED_MOTION_xxxx). Note that a carriage return is not added. See also PrescribedMotion.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for PrescribedMotion pm:

key = pm.Keyword()
PrescribedMotion.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for PrescribedMotion pm:

cards = pm.KeywordCards()
PrescribedMotion.Next()

Returns the next boundary prescribed motion in the model

Returns:

PrescribedMotion object (or None if there are no more boundary prescribed motions in the model)

Return type:

PrescribedMotion

Example

To get the boundary prescribed motion in model m after boundary prescribed motion b:

b = b.Next()
PrescribedMotion.Previous()

Returns the previous boundary prescribed motion in the model

Returns:

PrescribedMotion object (or None if there are no more boundary prescribed motions in the model)

Return type:

PrescribedMotion

Example

To get the boundary prescribed motion in model m before boundary prescribed motion b:

b = b.Previous()
PrescribedMotion.SetFlag(flag)

Sets a flag on the boundary prescribed motion

Parameters:

flag (Flag) – Flag to set on the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To set flag f for boundary prescribed motion b:

b.SetFlag(f)
PrescribedMotion.Sketch(redraw=Oasys.gRPC.defaultArg)

Sketches the boundary prescribed motion. The boundary prescribed motion will be sketched until you either call PrescribedMotion.Unsketch(), PrescribedMotion.UnsketchAll(), Model.UnsketchAll(), or delete the model

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the boundary prescribed motion is sketched. If omitted redraw is true. If you want to sketch several boundary prescribed motions 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 boundary prescribed motion b:

b.Sketch()
PrescribedMotion.Unblank()

Unblanks the boundary prescribed motion

Returns:

No return value

Return type:

None

Example

To unblank boundary prescribed motion b:

b.Unblank()
PrescribedMotion.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the boundary prescribed motion

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the boundary prescribed motion is unsketched. If omitted redraw is true. If you want to unsketch several boundary prescribed motions 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 boundary prescribed motion b:

b.Unsketch()
PrescribedMotion.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:

PrescribedMotion object

Return type:

dict

Example

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

if b.ViewParameters().GetParameter(b.example):
    do_something..
PrescribedMotion.Xrefs()

Returns the cross references for this boundary prescribed motion

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for boundary prescribed motion b:

xrefs = b.Xrefs()