Oasys.PRIMER.AxialForceBeam class¶
Properties¶
- property AxialForceBeam.exists(read only): boolean¶
true if axial force beam exists, false if referred to but not defined
- property AxialForceBeam.id(read only): integer¶
ID of the axial force beam. Only used in PRIMER
- property AxialForceBeam.kbend: integer¶
Bending stiffness flag
- property AxialForceBeam.scale: float¶
Scale factor on loadcurve
Constructor¶
- classmethod AxialForceBeam(model, bsid, lcid, scale=Oasys.gRPC.defaultArg)¶
Create a new
AxialForceBeam
object
- Parameters:
- Returns:
AxialForceBeam object
- Return type:
dict
Example
To create a new axial force beam in model m using beam set 10, load curve 100:
afb = Oasys.PRIMER.AxialForceBeam(m, 10, 100)
Static methods¶
- classmethod AxialForceBeam.First(model)¶
Returns the first axial force beam in the model
- Parameters:
model (Model) –
Model
to get first axial force beam in- Returns:
AxialForceBeam object (or None if there are no axial force beams in the model)
- Return type:
AxialForceBeam
Example
To get the first axial force beam in model m:
afb = Oasys.PRIMER.AxialForceBeam.First(m)
- classmethod AxialForceBeam.FlagAll(model, flag)¶
Flags all of the axial force beams in the model with a defined flag
- Parameters:
model (Model) –
Model
that all axial force beams will be flagged inflag (Flag) – Flag to set on the axial force beams
- Returns:
No return value
- Return type:
None
Example
To flag all of the axial force beams with flag f in model m:
Oasys.PRIMER.AxialForceBeam.FlagAll(m, f)
- classmethod AxialForceBeam.GetAll(model)¶
Returns a list of AxialForceBeam objects for all of the axial force beams in a model in PRIMER
- Parameters:
model (Model) –
Model
to get axial force beams from- Returns:
List of AxialForceBeam objects
- Return type:
list
Example
To make a list of AxialForceBeam objects for all of the axial force beams in model m
afb = Oasys.PRIMER.AxialForceBeam.GetAll(m)
- classmethod AxialForceBeam.GetFlagged(model, flag)¶
Returns a list of AxialForceBeam objects for all of the flagged axial force beams in a model in PRIMER
- Parameters:
model (Model) –
Model
to get axial force beams fromflag (Flag) – Flag set on the axial force beams that you want to retrieve
- Returns:
List of AxialForceBeam objects
- Return type:
list
Example
To make a list of AxialForceBeam objects for all of the axial force beams in model m flagged with f
afb = Oasys.PRIMER.AxialForceBeam.GetFlagged(m, f)
- classmethod AxialForceBeam.GetFromID(model, number)¶
Returns the AxialForceBeam object for a axial force beam ID
- Parameters:
model (Model) –
Model
to find the axial force beam innumber (integer) – number of the axial force beam you want the AxialForceBeam object for
- Returns:
AxialForceBeam object (or None if axial force beam does not exist)
- Return type:
AxialForceBeam
Example
To get the AxialForceBeam object for axial force beam 100 in model m
afb = Oasys.PRIMER.AxialForceBeam.GetFromID(m, 100)
- classmethod AxialForceBeam.Last(model)¶
Returns the last axial force beam in the model
- Parameters:
model (Model) –
Model
to get last axial force beam in- Returns:
AxialForceBeam object (or None if there are no axial force beams in the model)
- Return type:
AxialForceBeam
Example
To get the last axial force beam in model m:
afb = Oasys.PRIMER.AxialForceBeam.Last(m)
- classmethod AxialForceBeam.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select axial force beams using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting axial force 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 axial force beams from that model can be selected. If the argument is aFlag
then only axial force beams that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any axial force beams can be selected. from any modelmodal (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 axial force beams selected or None if menu cancelled
- Return type:
int
Example
To select axial force beams from model m, flagging those selected with flag f, giving the prompt ‘Select axial force beams’:
Oasys.PRIMER.AxialForceBeam.Select(f, 'Select axial force beams', m)To select axial force beams, flagging those selected with flag f but limiting selection to axial force beams flagged with flag l, giving the prompt ‘Select axial force beams’:
Oasys.PRIMER.AxialForceBeam.Select(f, 'Select axial force beams', l)
- classmethod AxialForceBeam.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged axial force beams in the model. The axial force beams will be sketched until you either call
AxialForceBeam.Unsketch()
,AxialForceBeam.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged axial force beams will be sketched inflag (Flag) – Flag set on the axial force beams that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the axial force beams are sketched. If omitted redraw is true. If you want to sketch flagged axial force 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 axial force beams flagged with flag in model m:
Oasys.PRIMER.AxialForceBeam.SketchFlagged(m, flag)
- classmethod AxialForceBeam.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of axial force beams in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing axial force beams should be counted. If false or omitted referenced but undefined axial force beams will also be included in the total
- Returns:
number of axial force beams
- Return type:
int
Example
To get the total number of axial force beams in model m:
total = Oasys.PRIMER.AxialForceBeam.Total(m)
- classmethod AxialForceBeam.UnflagAll(model, flag)¶
Unsets a defined flag on all of the axial force beams in the model
- Parameters:
model (Model) –
Model
that the defined flag for all axial force beams will be unset inflag (Flag) – Flag to unset on the axial force beams
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the axial force beams in model m:
Oasys.PRIMER.AxialForceBeam.UnflagAll(m, f)
- classmethod AxialForceBeam.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all axial force beams
- Parameters:
model (Model) –
Model
that all axial force beams will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the axial force 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 axial force beams in model m:
Oasys.PRIMER.AxialForceBeam.UnsketchAll(m)
- classmethod AxialForceBeam.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged axial force beams in the model
- Parameters:
model (Model) –
Model
that all axial force beams will be unsketched inflag (Flag) – Flag set on the axial force beams that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the axial force 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 axial force beams flagged with flag in model m:
Oasys.PRIMER.AxialForceBeam.UnsketchAll(m, flag)
Instance methods¶
- AxialForceBeam.AssociateComment(comment)¶
Associates a comment with a axial force beam
- Parameters:
comment (Comment) –
Comment
that will be attached to the axial force beam- Returns:
No return value
- Return type:
None
Example
To associate comment c to the axial force beam afb:
afb.AssociateComment(c)
- AxialForceBeam.ClearFlag(flag)¶
Clears a flag on the axial force beam
- Parameters:
flag (Flag) – Flag to clear on the axial force beam
- Returns:
No return value
- Return type:
None
Example
To clear flag f for axial force beam afb:
afb.ClearFlag(f)
- AxialForceBeam.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the axial force beam. The target include of the copied axial force 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:
AxialForceBeam object
- Return type:
AxialForceBeam
Example
To copy axial force beam afb into axial force beam z:
z = afb.Copy()
- AxialForceBeam.DetachComment(comment)¶
Detaches a comment from a axial force beam
- Parameters:
comment (Comment) –
Comment
that will be detached from the axial force beam- Returns:
No return value
- Return type:
None
Example
To detach comment c from the axial force beam afb:
afb.DetachComment(c)
- AxialForceBeam.Flagged(flag)¶
Checks if the axial force beam is flagged or not
- Parameters:
flag (Flag) – Flag to test on the axial force beam
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if axial force beam afb has flag f set on it:
if afb.Flagged(f): do_something..
- AxialForceBeam.GetComments()¶
Extracts the comments associated to a axial force 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 axial force beam afb:
comm_list = afb.GetComments()
- AxialForceBeam.GetParameter(prop)¶
Checks if a AxialForceBeam 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 theAxialForceBeam.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – axial force beam property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if AxialForceBeam property afb.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if afb.GetParameter(afb.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if AxialForceBeam property afb.example is a parameter by using the GetParameter method:
if afb.ViewParameters().GetParameter(afb.example): do_something..
- AxialForceBeam.Keyword()¶
Returns the keyword for this axial force beam (*INITIAL_AXIAL_FORCE_BEAM). Note that a carriage return is not added. See also
AxialForceBeam.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for axial force beam afb:
key = afb.Keyword()
- AxialForceBeam.KeywordCards()¶
Returns the keyword cards for the axial force beam. Note that a carriage return is not added. See also
AxialForceBeam.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for axial force beam afb:
cards = afb.KeywordCards()
- AxialForceBeam.Next()¶
Returns the next axial force beam in the model
- Returns:
AxialForceBeam object (or None if there are no more axial force beams in the model)
- Return type:
AxialForceBeam
Example
To get the axial force beam in model m after axial force beam afb:
afb = afb.Next()
- AxialForceBeam.Previous()¶
Returns the previous axial force beam in the model
- Returns:
AxialForceBeam object (or None if there are no more axial force beams in the model)
- Return type:
AxialForceBeam
Example
To get the axial force beam in model m before axial force beam afb:
afb = afb.Previous()
- AxialForceBeam.SetFlag(flag)¶
Sets a flag on the axial force beam
- Parameters:
flag (Flag) – Flag to set on the axial force beam
- Returns:
No return value
- Return type:
None
Example
To set flag f for axial force beam afb:
afb.SetFlag(f)
- AxialForceBeam.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the axial force beam. The axial force beam will be sketched until you either call
AxialForceBeam.Unsketch()
,AxialForceBeam.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the axial force beam is sketched. If omitted redraw is true. If you want to sketch several axial force 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 axial force beam afb:
afb.Sketch()
- AxialForceBeam.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the axial force beam
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the axial force beam is unsketched. If omitted redraw is true. If you want to unsketch several axial force 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 axial force beam afb:
afb.Unsketch()
- AxialForceBeam.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:
AxialForceBeam object
- Return type:
dict
Example
To check if AxialForceBeam property afb.example is a parameter by using the
AxialForceBeam.GetParameter()
method:if afb.ViewParameters().GetParameter(afb.example): do_something..
- AxialForceBeam.Xrefs()¶
Returns the cross references for this axial force beam
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for axial force beam afb:
xrefs = afb.Xrefs()