Oasys.PRIMER.LoadRemovePart class¶
Constants¶
Properties¶
- property LoadRemovePart.exists(read only): boolean¶
true if LoadRemovePart exists, false if referred to but not defined
- property LoadRemovePart.stgr: integer¶
Construction Stages
ID at which part is removed
- property LoadRemovePart.time0: float¶
Time at which stress reduction starts
- property LoadRemovePart.time1: float¶
Time at which stresses become zero and elements are deleted
- property LoadRemovePart.type: constant¶
The Load RemovePart type. Can be
LoadRemovePart.PART
orLoadRemovePart.SET_PART
Constructor¶
- classmethod LoadRemovePart(model, type, pid, time0=Oasys.gRPC.defaultArg, time1=Oasys.gRPC.defaultArg, stgr=Oasys.gRPC.defaultArg)¶
Create a new
LoadRemovePart
object
- Parameters:
model (Model) –
Model
that LoadRemovePart will be created intype (constant) – Specify the type of LoadRemovePart (Can be
LoadRemovePart.PART
orLoadRemovePart.SET_PART
time0 (float) – Optional. Time at which stress reduction starts
time1 (float) – Optional. Time at which stresses become zero and elements are deleted
stgr (integer) – Optional.
Construction Stage
ID at which part is removed- Returns:
LoadRemovePart object
- Return type:
dict
Example
To create a new load remove_part in model m, of type PART, with pid 100, time0 2.5 and time1 4.5
l_r_p = Oasys.PRIMER.LoadRemovePart(m, Oasys.PRIMER.LoadRemovePart.PART, 100, 2.5, 4.5)
Static methods¶
- classmethod LoadRemovePart.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the load remove_parts in the model
- Parameters:
model (Model) –
Model
that all load remove_parts will be blanked inredraw (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 remove_parts in model m:
Oasys.PRIMER.LoadRemovePart.BlankAll(m)
- classmethod LoadRemovePart.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged load remove_parts in the model
- Parameters:
model (Model) –
Model
that all the flagged load remove_parts will be blanked inflag (Flag) – Flag set on the load remove_parts 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 remove_parts in model m flagged with f:
Oasys.PRIMER.LoadRemovePart.BlankFlagged(m, f)
- classmethod LoadRemovePart.First(model)¶
Returns the first load remove_part in the model
- Parameters:
model (Model) –
Model
to get first load remove_part in- Returns:
LoadRemovePart object (or None if there are no load remove_parts in the model)
- Return type:
LoadRemovePart
Example
To get the first load remove_part in model m:
l_r_p = Oasys.PRIMER.LoadRemovePart.First(m)
- classmethod LoadRemovePart.FlagAll(model, flag)¶
Flags all of the load remove_parts in the model with a defined flag
- Parameters:
model (Model) –
Model
that all load remove_parts will be flagged inflag (Flag) – Flag to set on the load remove_parts
- Returns:
No return value
- Return type:
None
Example
To flag all of the load remove_parts with flag f in model m:
Oasys.PRIMER.LoadRemovePart.FlagAll(m, f)
- classmethod LoadRemovePart.GetAll(model)¶
Returns a list of LoadRemovePart objects for all of the load remove_parts in a model in PRIMER
- Parameters:
model (Model) –
Model
to get load remove_parts from- Returns:
List of LoadRemovePart objects
- Return type:
list
Example
To make a list of LoadRemovePart objects for all of the load remove_parts in model m
l_r_p = Oasys.PRIMER.LoadRemovePart.GetAll(m)
- classmethod LoadRemovePart.GetFlagged(model, flag)¶
Returns a list of LoadRemovePart objects for all of the flagged load remove_parts in a model in PRIMER
- Parameters:
model (Model) –
Model
to get load remove_parts fromflag (Flag) – Flag set on the load remove_parts that you want to retrieve
- Returns:
List of LoadRemovePart objects
- Return type:
list
Example
To make a list of LoadRemovePart objects for all of the load remove_parts in model m flagged with f
l_r_p = Oasys.PRIMER.LoadRemovePart.GetFlagged(m, f)
- classmethod LoadRemovePart.GetFromID(model, number)¶
Returns the LoadRemovePart object for a load remove_part ID
- Parameters:
model (Model) –
Model
to find the load remove_part innumber (integer) – number of the load remove_part you want the LoadRemovePart object for
- Returns:
LoadRemovePart object (or None if load remove_part does not exist)
- Return type:
LoadRemovePart
Example
To get the LoadRemovePart object for load remove_part 100 in model m
l_r_p = Oasys.PRIMER.LoadRemovePart.GetFromID(m, 100)
- classmethod LoadRemovePart.Last(model)¶
Returns the last load remove_part in the model
- Parameters:
model (Model) –
Model
to get last load remove_part in- Returns:
LoadRemovePart object (or None if there are no load remove_parts in the model)
- Return type:
LoadRemovePart
Example
To get the last load remove_part in model m:
l_r_p = Oasys.PRIMER.LoadRemovePart.Last(m)
- classmethod LoadRemovePart.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a load remove_part
- 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 remove_parts from that model can be picked. If the argument is aFlag
then only load remove_parts that are flagged with limit can be selected. If omitted, or None, any load remove_parts from any model can be selected. from any modelmodal (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:
LoadRemovePart object (or None if not picked)
- Return type:
dict
Example
To pick a load remove_part from model m giving the prompt ‘Pick load remove_part from screen’:
l_r_p = Oasys.PRIMER.LoadRemovePart.Pick('Pick load remove_part from screen', m)
- classmethod LoadRemovePart.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select load remove_parts using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting load remove_parts
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 remove_parts from that model can be selected. If the argument is aFlag
then only load remove_parts that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any load remove_parts 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 load remove_parts selected or None if menu cancelled
- Return type:
int
Example
To select load remove_parts from model m, flagging those selected with flag f, giving the prompt ‘Select load remove_parts’:
Oasys.PRIMER.LoadRemovePart.Select(f, 'Select load remove_parts', m)To select load remove_parts, flagging those selected with flag f but limiting selection to load remove_parts flagged with flag l, giving the prompt ‘Select load remove_parts’:
Oasys.PRIMER.LoadRemovePart.Select(f, 'Select load remove_parts', l)
- classmethod LoadRemovePart.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged load remove_parts in the model. The load remove_parts will be sketched until you either call
LoadRemovePart.Unsketch()
,LoadRemovePart.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged load remove_parts will be sketched inflag (Flag) – Flag set on the load remove_parts that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the load remove_parts are sketched. If omitted redraw is true. If you want to sketch flagged load remove_parts 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 remove_parts flagged with flag in model m:
Oasys.PRIMER.LoadRemovePart.SketchFlagged(m, flag)
- classmethod LoadRemovePart.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of load remove_parts in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing load remove_parts should be counted. If false or omitted referenced but undefined load remove_parts will also be included in the total
- Returns:
number of load remove_parts
- Return type:
int
Example
To get the total number of load remove_parts in model m:
total = Oasys.PRIMER.LoadRemovePart.Total(m)
- classmethod LoadRemovePart.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the load remove_parts in the model
- Parameters:
model (Model) –
Model
that all load remove_parts will be unblanked inredraw (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 remove_parts in model m:
Oasys.PRIMER.LoadRemovePart.UnblankAll(m)
- classmethod LoadRemovePart.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged load remove_parts in the model
- Parameters:
model (Model) –
Model
that the flagged load remove_parts will be unblanked inflag (Flag) – Flag set on the load remove_parts 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 remove_parts in model m flagged with f:
Oasys.PRIMER.LoadRemovePart.UnblankFlagged(m, f)
- classmethod LoadRemovePart.UnflagAll(model, flag)¶
Unsets a defined flag on all of the load remove_parts in the model
- Parameters:
model (Model) –
Model
that the defined flag for all load remove_parts will be unset inflag (Flag) – Flag to unset on the load remove_parts
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the load remove_parts in model m:
Oasys.PRIMER.LoadRemovePart.UnflagAll(m, f)
- classmethod LoadRemovePart.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all load remove_parts
- Parameters:
model (Model) –
Model
that all load remove_parts will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the load remove_parts 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 remove_parts in model m:
Oasys.PRIMER.LoadRemovePart.UnsketchAll(m)
- classmethod LoadRemovePart.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged load remove_parts in the model
- Parameters:
model (Model) –
Model
that all load remove_parts will be unsketched inflag (Flag) – Flag set on the load remove_parts that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the load remove_parts 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 remove_parts flagged with flag in model m:
Oasys.PRIMER.LoadRemovePart.UnsketchAll(m, flag)
Instance methods¶
- LoadRemovePart.AssociateComment(comment)¶
Associates a comment with a load remove_part
- Parameters:
comment (Comment) –
Comment
that will be attached to the load remove_part- Returns:
No return value
- Return type:
None
Example
To associate comment c to the load remove_part l_r_p:
l_r_p.AssociateComment(c)
- LoadRemovePart.Blank()¶
Blanks the load remove_part
- Returns:
No return value
- Return type:
None
Example
To blank load remove_part l_r_p:
l_r_p.Blank()
- LoadRemovePart.Blanked()¶
Checks if the load remove_part is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if load remove_part l_r_p is blanked:
if l_r_p.Blanked(): do_something..
- LoadRemovePart.ClearFlag(flag)¶
Clears a flag on the load remove_part
- Parameters:
flag (Flag) – Flag to clear on the load remove_part
- Returns:
No return value
- Return type:
None
Example
To clear flag f for load remove_part l_r_p:
l_r_p.ClearFlag(f)
- LoadRemovePart.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the load remove_part. The target include of the copied load remove_part 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:
LoadRemovePart object
- Return type:
LoadRemovePart
Example
To copy load remove_part l_r_p into load remove_part z:
z = l_r_p.Copy()
- LoadRemovePart.DetachComment(comment)¶
Detaches a comment from a load remove_part
- Parameters:
comment (Comment) –
Comment
that will be detached from the load remove_part- Returns:
No return value
- Return type:
None
Example
To detach comment c from the load remove_part l_r_p:
l_r_p.DetachComment(c)
- LoadRemovePart.Flagged(flag)¶
Checks if the load remove_part is flagged or not
- Parameters:
flag (Flag) – Flag to test on the load remove_part
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if load remove_part l_r_p has flag f set on it:
if l_r_p.Flagged(f): do_something..
- LoadRemovePart.GetComments()¶
Extracts the comments associated to a load remove_part
- 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 remove_part l_r_p:
comm_list = l_r_p.GetComments()
- LoadRemovePart.GetParameter(prop)¶
Checks if a LoadRemovePart 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 theLoadRemovePart.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – load remove_part property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if LoadRemovePart property l_r_p.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if l_r_p.GetParameter(l_r_p.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if LoadRemovePart property l_r_p.example is a parameter by using the GetParameter method:
if l_r_p.ViewParameters().GetParameter(l_r_p.example): do_something..
- LoadRemovePart.Keyword()¶
Returns the keyword for this LoadRemovePart (*LOAD_REMOVE_PART). Note that a carriage return is not added. See also
LoadRemovePart.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for LoadRemovePart l_r_p:
key = l_r_p.Keyword()
- LoadRemovePart.KeywordCards()¶
Returns the keyword cards for the LoadRemovePart. Note that a carriage return is not added. See also
LoadRemovePart.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for LoadRemovePart l_r_p:
cards = l_r_p.KeywordCards()
- LoadRemovePart.Next()¶
Returns the next load remove_part in the model
- Returns:
LoadRemovePart object (or None if there are no more load remove_parts in the model)
- Return type:
LoadRemovePart
Example
To get the load remove_part in model m after load remove_part l_r_p:
l_r_p = l_r_p.Next()
- LoadRemovePart.Previous()¶
Returns the previous load remove_part in the model
- Returns:
LoadRemovePart object (or None if there are no more load remove_parts in the model)
- Return type:
LoadRemovePart
Example
To get the load remove_part in model m before load remove_part l_r_p:
l_r_p = l_r_p.Previous()
- LoadRemovePart.SetFlag(flag)¶
Sets a flag on the load remove_part
- Parameters:
flag (Flag) – Flag to set on the load remove_part
- Returns:
No return value
- Return type:
None
Example
To set flag f for load remove_part l_r_p:
l_r_p.SetFlag(f)
- LoadRemovePart.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the load remove_part. The load remove_part will be sketched until you either call
LoadRemovePart.Unsketch()
,LoadRemovePart.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the load remove_part is sketched. If omitted redraw is true. If you want to sketch several load remove_parts 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 remove_part l_r_p:
l_r_p.Sketch()
- LoadRemovePart.Unblank()¶
Unblanks the load remove_part
- Returns:
No return value
- Return type:
None
Example
To unblank load remove_part l_r_p:
l_r_p.Unblank()
- LoadRemovePart.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the load remove_part
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the load remove_part is unsketched. If omitted redraw is true. If you want to unsketch several load remove_parts 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 remove_part l_r_p:
l_r_p.Unsketch()
- LoadRemovePart.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:
LoadRemovePart object
- Return type:
dict
Example
To check if LoadRemovePart property l_r_p.example is a parameter by using the
LoadRemovePart.GetParameter()
method:if l_r_p.ViewParameters().GetParameter(l_r_p.example): do_something..
- LoadRemovePart.Xrefs()¶
Returns the cross references for this load remove_part
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for load remove_part l_r_p:
xrefs = l_r_p.Xrefs()