Oasys.PRIMER.History class¶
Constants¶
- History.ACOUSTIC¶
ACOUSTIC is *DATABASE_HISTORY_ACOUSTIC
- History.ALL_TYPES¶
All *DATABASE_HISTORY_ types
- History.BEAM¶
BEAM is *DATABASE_HISTORY_BEAM
- History.BEAM_SET¶
BEAM_SET is *DATABASE_HISTORY_BEAM_SET
- History.DISCRETE¶
DISCRETE is *DATABASE_HISTORY_DISCRETE
- History.DISCRETE_SET¶
DISCRETE_SET is *DATABASE_HISTORY_DISCRETE_SET
- History.NODE¶
NODE is *DATABASE_HISTORY_NODE
- History.NODE_SET¶
NODE_SET is *DATABASE_HISTORY_NODE_SET
- History.SEATBELT¶
SEATBELT is *DATABASE_HISTORY_SEATBELT
- History.SHELL¶
SHELL is *DATABASE_HISTORY_SHELL
- History.SHELL_SET¶
SHELL_SET is *DATABASE_HISTORY_SHELL_SET
- History.SOLID¶
SOLID is *DATABASE_HISTORY_SOLID
- History.SOLID_SET¶
SOLID_SET is *DATABASE_HISTORY_SOLID_SET
- History.SPH¶
SPH is *DATABASE_HISTORY_SPH
- History.SPH_SET¶
SPH_SET is *DATABASE_HISTORY_SPH_SET
- History.TSHELL¶
TSHELL is *DATABASE_HISTORY_TSHELL
- History.TSHELL_SET¶
TSHELL_SET is *DATABASE_HISTORY_TSHELL_SET
Properties¶
- property History.cid: integer¶
Coordinate system ID for _LOCAL
- property History.exists(read only): boolean¶
true if database history exists, false if referred to but not defined
- property History.heading: string¶
Optional heading
- property History.hfo: integer¶
High frequency flag for _LOCAL
- property History.id: integer¶
ID of the item
- property History.local: boolean¶
Turns _LOCAL on or off
- property History.ref: integer¶
Output reference for _LOCAL
- property History.type(read only): constant¶
The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
Constructor¶
- classmethod History(model, type, id, heading=Oasys.gRPC.defaultArg)¶
Create a new
History
object
- Parameters:
model (Model) –
Model
that database history will be created intype (constant) – Entity type
id (integer) – ID of the item
heading (string) – Optional. Optional heading
- Returns:
History object
- Return type:
dict
Example
To create a new Database history on NODE 500 called “test history”:
c = Oasys.PRIMER.History(m, Oasys.PRIMER.History.NODE, 500, "test history")
Static methods¶
- classmethod History.BlankAll(model, type=Oasys.gRPC.defaultArg, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the database histories in the model
- Parameters:
model (Model) –
Model
that all database histories will be blanked intype (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history typesredraw (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 database histories in model m:
Oasys.PRIMER.History.BlankAll(m)
- classmethod History.BlankFlagged(model, flag, type=Oasys.gRPC.defaultArg, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged database histories in the model
- Parameters:
model (Model) –
Model
that all the flagged database histories will be blanked inflag (Flag) – Flag set on the database histories that you want to blank
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history typesredraw (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 database histories in model m flagged with f:
Oasys.PRIMER.History.BlankFlagged(m, f)
- classmethod History.Create(model, type, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a database history
- Parameters:
model (Model) –
Model
that the database history will be created intype (constant) – The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
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:
History object (or None if not made)
- Return type:
dict
Example
To start creating a history in model m:
c = Oasys.PRIMER.History.Create(m)
- classmethod History.First(model, type=Oasys.gRPC.defaultArg)¶
Returns the first database history in the model
- Parameters:
model (Model) –
Model
to get first database history intype (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
History object (or None if there are no database histories in the model)
- Return type:
History
Example
To get the first database history in model m:
history = Oasys.PRIMER.History.First(m)
- classmethod History.FlagAll(model, flag, type=Oasys.gRPC.defaultArg)¶
Flags all of the database histories in the model with a defined flag
- Parameters:
model (Model) –
Model
that all database histories will be flagged inflag (Flag) – Flag to set on the database histories
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
No return value
- Return type:
None
Example
To flag all of the database histories with flag f in model m:
Oasys.PRIMER.History.FlagAll(m, f)
- classmethod History.GetAll(model, type=Oasys.gRPC.defaultArg)¶
Returns a list of History objects for all of the database histories in a models in PRIMER
- Parameters:
model (Model) –
Model
to get database histories fromtype (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
List of History objects
- Return type:
list
Example
To make a list of History objects for all of the database histories in model m
history = Oasys.PRIMER.History.GetAll(m)
- classmethod History.GetFromID(model, database_history_number)¶
Returns the History object for a database history ID
- Parameters:
model (Model) –
Model
to find the database history indatabase_history_number (integer) – number of the database history you want the History object for
- Returns:
History object (or None if database history does not exist)
- Return type:
History
Example
To get the History object for database history 100 in model m
history = Oasys.PRIMER.History.GetFromID(m, 100)
- classmethod History.Last(model, type=Oasys.gRPC.defaultArg)¶
Returns the last database history in the model
- Parameters:
model (Model) –
Model
to get last database history intype (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
History object (or None if there are no database histories in the model)
- Return type:
History
Example
To get the last database history in model m:
history = Oasys.PRIMER.History.Last(m)
- classmethod History.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to pick a database history
- 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 database histories from that model can be picked. If the argument is aFlag
then only database histories that are flagged with limit can be selected. If omitted, or None, any database histories 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
- Returns:
History object (or None if not picked)
- Return type:
dict
Example
To pick a database history from model m giving the prompt ‘Pick database history from screen’:
history = Oasys.PRIMER.History.Pick('Pick database history from screen', m)
- classmethod History.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select database histories using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting database histories
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only database histories from that model can be selected. If the argument is aFlag
then only database histories that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any database histories from any model can be selectedmodal (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 items selected or None if menu cancelled
- Return type:
int
Example
To select database histories from model m, flagging those selected which flag f, giving the prompt ‘Select database histories’:
Oasys.PRIMER.History.Select(f, 'Select database histories', m)
- classmethod History.SketchFlagged(model, flag, type=Oasys.gRPC.defaultArg, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged database histories in the model
- Parameters:
model (Model) –
Model
that all the flagged database histories will be sketched inflag (Flag) – Flag set on the database histories that you want to sketch
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history typesredraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is true. If you want to do several (un)sketches 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 sketch all of the database histories of type SHELL_SET in model m flagged with f:
Oasys.PRIMER.History.SketchFlagged(m, f, Oasys.PRIMER.History.SHELL_SET)
- classmethod History.UnblankAll(model, redraw=Oasys.gRPC.defaultArg, type=Oasys.gRPC.defaultArg)¶
Unblanks all of the database histories in the model
- Parameters:
model (Model) –
Model
that all database histories 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()
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
No return value
- Return type:
None
Example
To unblank all of the database histories in model m:
Oasys.PRIMER.History.UnblankAll(m)
- classmethod History.UnblankFlagged(model, flag, type=Oasys.gRPC.defaultArg, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged database histories in the model
- Parameters:
model (Model) –
Model
that the flagged database histories will be unblanked inflag (Flag) – Flag set on the database histories that you want to unblank
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history typesredraw (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 database histories in model m flagged with f:
Oasys.PRIMER.History.UnblankFlagged(m, f)
- classmethod History.UnflagAll(model, flag, type=Oasys.gRPC.defaultArg)¶
Unsets a defined flag on all of the database histories in the model
- Parameters:
model (Model) –
Model
that the defined flag for all database histories will be unset inflag (Flag) – Flag to unset on the database histories
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history types- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the database histories in model m:
Oasys.PRIMER.History.UnflagAll(m, f)
- classmethod History.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all database histories
- Parameters:
model (Model) –
Model
that all database histories will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the database histories 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 database histories in model m:
Oasys.PRIMER.History.UnsketchAll(m)
- classmethod History.UnsketchFlagged(model, flag, type=Oasys.gRPC.defaultArg, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged database histories
- Parameters:
model (Model) –
Model
that all database histories will be unblanked inflag (Flag) – Flag set on the database histories that you want to sketch
type (constant) – Optional. The database history type. Can be
History.ACOUSTIC
orHistory.BEAM
orHistory.BEAM_SET
orHistory.DISCRETE
orHistory.DISCRETE_SET
orHistory.NODE
orHistory.NODE_SET
orHistory.SEATBELT
orHistory.SHELL
orHistory.SHELL_SET
orHistory.SOLID
orHistory.SOLID_SET
orHistory.SPH
orHistory.SPH_SET
orHistory.TSHELL
orHistory.TSHELL_SET
orHistory.ALL_TYPES
. If omitted, applied to all database history typesredraw (boolean) – Optional. If model should be redrawn or not after the database histories 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 of the database histories in model m flagged with f:
Oasys.PRIMER.History.UnsketchFlagged(m, f)
Instance methods¶
- History.Blanked()¶
Checks if the database history is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if database history c is blanked:
c.Blanked() )
- History.ClearFlag(flag)¶
Clears a flag on the database history
- Parameters:
flag (Flag) – Flag to clear on the database history
- Returns:
No return value
- Return type:
None
Example
To clear flag f for database history c:
c.ClearFlag(f)
- History.Edit(modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to edit the database history
- 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 database history c:
c.Edit()
- History.Flagged(flag)¶
Checks if the database history is flagged or not
- Parameters:
flag (Flag) – Flag to clear on the database history
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if database history c has flag f set on it:
c.Flagged(f) )
- History.Keyword()¶
Returns the keyword for this database history (*DATABASE_HISTORY). Note that a carriage return is not added. See also
History.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for database history c:
key = c.Keyword()
- History.KeywordCards()¶
Returns the keyword cards for the database history. Note that a carriage return is not added. See also
History.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for database history c:
cards = c.KeywordCards()
- History.Next()¶
Returns the next database history in the model
- Returns:
History object (or None if there are no more database histories in the model)
- Return type:
History
Example
To get the database history in model m after database history c:
history = c.Next()
- History.Previous()¶
Returns the previous database history in the model
- Returns:
History object (or None if there are no more database histories in the model)
- Return type:
History
Example
To get the database history in model m before this one:
history = history.Previous()
- History.SetFlag(flag)¶
Sets a flag on the database history
- Parameters:
flag (Flag) – Flag to set on the database history
- Returns:
No return value
- Return type:
None
Example
To set flag f for database history c:
c.SetFlag(f)
- History.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the database history. The database history will be sketched until you either call
History.Unsketch()
,History.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the database history is sketched. If omitted redraw is true. If you want to sketch several database histories 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 database history c:
c.Sketch()
- History.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the database history
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the database history is unsketched. If omitted redraw is true. If you want to unsketch several database histories 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 database history c:
c.Unsketch()
- History.Xrefs()¶
Returns the cross references for this database history
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for this database history:
xrefs = c.Xrefs()