Oasys.PRIMER.HexSpotweldAssembly class¶
Properties¶
- property HexSpotweldAssembly.exists(read only): boolean¶
true if
*DEFINE_HEX_SPOTWELD_ASSEMBLYexists, false if referred to but not defined
- property HexSpotweldAssembly.id: integer¶
- property HexSpotweldAssembly.include: integer¶
The
Includefile number that the*DEFINE_HEX_SPOTWELD_ASSEMBLYis in
- property HexSpotweldAssembly.model(read only): integer¶
The
Modelnumber that the DEFINE_HEX_SPOTWELD_ASSEMBLY is in
- property HexSpotweldAssembly.opt: integer¶
- property HexSpotweldAssembly.title: string¶
Title (optional)
Constructor¶
- classmethod HexSpotweldAssembly(model, options)¶
Create a new
*DEFINE_HEX_SPOTWELD_ASSEMBLYobject
- Parameters:
model (Model) –
Modelthat Hex Spotweld Assembly will be created inoptions (dict) –
Options for creating the
HexSpotweldAssembly
- id:
(integer)
HexSpotweldAssemblyID- opt:
(integer) HexSpotweldAssembly option indicating the length of the solids list.
optcan be 4, 8 or 16- solids:
(array) List of
SolidIDs, at least 4 EIDs must be given- title (optional):
(string) Optional HexSpotweldAssembly title
- Returns:
HexSpotweldAssembly object
- Return type:
dict
Example
To create a new *DEFINE_HEX_SPOTWELD_ASSEMBLY with ID 100 in model m with 4 elements 50, 150, 250 and 350
h = Oasys.PRIMER.HexSpotweldAssembly(m, {'id': 100, 'opt': 4, 'solids': [50, 150, 250, 350]})To create a new *DEFINE_HEX_SPOTWELD_ASSEMBLY with ID 200 in model m with 8 elements 50, 150, 250, 350, 450, 550, 650 and 750
h = Oasys.PRIMER.HexSpotweldAssembly(m, {'id': 200, 'opt': 8, 'solids': [50, 150, 250, 350, 450, 550, 650, 750]})To create a new *DEFINE_HEX_SPOTWELD_ASSEMBLY with ID 300 in model m with 16 elements 50, 150, 250, 350, 450, 550, 650, 750, 850, 950, 1050, 1150, 1250, 1350, 1450 and 1550
h = Oasys.PRIMER.HexSpotweldAssembly(m, {'id': 300, 'opt': 16, 'solids': [50, 150, 250, 350, 450, 550, 650, 750, 850, 950, 1050, 1150, 1250, 1350, 1450, 1550]})
Static methods¶
- classmethod HexSpotweldAssembly.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a HexSpotweldAssembly
- Parameters:
model (Model) –
Modelthat the Hex Spotweld Assembly will be created inmodal (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:
HexSpotweldAssembly object (or None if not made)
- Return type:
dict
Example
To start creating a HexSpotweldAssem in model s:
s = Oasys.PRIMER.HexSpotweldAssembly.Create(m)
- classmethod HexSpotweldAssembly.First(model)¶
Returns the first DEFINE_HEX_SPOTWELD_ASSEMBLY in the model
- Parameters:
model (Model) –
Modelto get first DEFINE_HEX_SPOTWELD_ASSEMBLY in- Returns:
HexSpotweldAssembly object (or None if there are no DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model)
- Return type:
HexSpotweldAssembly
Example
To get the first DEFINE_HEX_SPOTWELD_ASSEMBLY in model m:
h = Oasys.PRIMER.HexSpotweldAssembly.First(m)
- classmethod HexSpotweldAssembly.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free DEFINE_HEX_SPOTWELD_ASSEMBLY label in the model. Also see
HexSpotweldAssembly.LastFreeLabel(),HexSpotweldAssembly.NextFreeLabel()andModel.FirstFreeItemLabel()
- Parameters:
model (Model) –
Modelto get first free DEFINE_HEX_SPOTWELD_ASSEMBLY label inlayer (Include number) – Optional.
Includefile (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:
HexSpotweldAssembly label
- Return type:
int
Example
To get the first free DEFINE_HEX_SPOTWELD_ASSEMBLY label in model m:
label = Oasys.PRIMER.HexSpotweldAssembly.FirstFreeLabel(m)
- classmethod HexSpotweldAssembly.FlagAll(model, flag)¶
Flags all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model with a defined flag
- Parameters:
model (Model) –
Modelthat all DEFINE_HEX_SPOTWELD_ASSEMBLYs will be flagged inflag (Flag) – Flag to set on the DEFINE_HEX_SPOTWELD_ASSEMBLYs
- Returns:
No return value
- Return type:
None
Example
To flag all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs with flag f in model m:
Oasys.PRIMER.HexSpotweldAssembly.FlagAll(m, f)
- classmethod HexSpotweldAssembly.GetAll(model)¶
Returns a list of HexSpotweldAssembly objects for all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in a model in PRIMER
- Parameters:
model (Model) –
Modelto get DEFINE_HEX_SPOTWELD_ASSEMBLYs from- Returns:
List of HexSpotweldAssembly objects
- Return type:
list
Example
To make a list of HexSpotweldAssembly objects for all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m
h = Oasys.PRIMER.HexSpotweldAssembly.GetAll(m)
- classmethod HexSpotweldAssembly.GetFlagged(model, flag)¶
Returns a list of HexSpotweldAssembly objects for all of the flagged DEFINE_HEX_SPOTWELD_ASSEMBLYs in a model in PRIMER
- Parameters:
model (Model) –
Modelto get DEFINE_HEX_SPOTWELD_ASSEMBLYs fromflag (Flag) – Flag set on the DEFINE_HEX_SPOTWELD_ASSEMBLYs that you want to retrieve
- Returns:
List of HexSpotweldAssembly objects
- Return type:
list
Example
To make a list of HexSpotweldAssembly objects for all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m flagged with f
h = Oasys.PRIMER.HexSpotweldAssembly.GetFlagged(m, f)
- classmethod HexSpotweldAssembly.GetFromID(model, number)¶
Returns the HexSpotweldAssembly object for a DEFINE_HEX_SPOTWELD_ASSEMBLY ID
- Parameters:
model (Model) –
Modelto find the DEFINE_HEX_SPOTWELD_ASSEMBLY innumber (integer) – number of the DEFINE_HEX_SPOTWELD_ASSEMBLY you want the HexSpotweldAssembly object for
- Returns:
HexSpotweldAssembly object (or None if DEFINE_HEX_SPOTWELD_ASSEMBLY does not exist)
- Return type:
HexSpotweldAssembly
Example
To get the HexSpotweldAssembly object for DEFINE_HEX_SPOTWELD_ASSEMBLY 100 in model m
h = Oasys.PRIMER.HexSpotweldAssembly.GetFromID(m, 100)
- classmethod HexSpotweldAssembly.Last(model)¶
Returns the last DEFINE_HEX_SPOTWELD_ASSEMBLY in the model
- Parameters:
model (Model) –
Modelto get last DEFINE_HEX_SPOTWELD_ASSEMBLY in- Returns:
HexSpotweldAssembly object (or None if there are no DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model)
- Return type:
HexSpotweldAssembly
Example
To get the last DEFINE_HEX_SPOTWELD_ASSEMBLY in model m:
h = Oasys.PRIMER.HexSpotweldAssembly.Last(m)
- classmethod HexSpotweldAssembly.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free DEFINE_HEX_SPOTWELD_ASSEMBLY label in the model. Also see
HexSpotweldAssembly.FirstFreeLabel(),HexSpotweldAssembly.NextFreeLabel()and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
HexSpotweldAssembly label
- Return type:
int
Example
To get the last free DEFINE_HEX_SPOTWELD_ASSEMBLY label in model m:
label = Oasys.PRIMER.HexSpotweldAssembly.LastFreeLabel(m)
- classmethod HexSpotweldAssembly.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) DEFINE_HEX_SPOTWELD_ASSEMBLY label in the model. Also see
HexSpotweldAssembly.FirstFreeLabel(),HexSpotweldAssembly.LastFreeLabel()andModel.NextFreeItemLabel()
- Parameters:
model (Model) –
Modelto get next free DEFINE_HEX_SPOTWELD_ASSEMBLY label inlayer (Include number) – Optional.
Includefile (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:
HexSpotweldAssembly label
- Return type:
int
Example
To get the next free DEFINE_HEX_SPOTWELD_ASSEMBLY label in model m:
label = Oasys.PRIMER.HexSpotweldAssembly.NextFreeLabel(m)
- classmethod HexSpotweldAssembly.RenumberAll(model, start)¶
Renumbers all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model
- Parameters:
model (Model) –
Modelthat all DEFINE_HEX_SPOTWELD_ASSEMBLYs will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m, from 1000000:
Oasys.PRIMER.HexSpotweldAssembly.RenumberAll(m, 1000000)
- classmethod HexSpotweldAssembly.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model
- Parameters:
model (Model) –
Modelthat all the flagged DEFINE_HEX_SPOTWELD_ASSEMBLYs will be renumbered inflag (Flag) – Flag set on the DEFINE_HEX_SPOTWELD_ASSEMBLYs that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m flagged with f, from 1000000:
Oasys.PRIMER.HexSpotweldAssembly.RenumberFlagged(m, f, 1000000)
- classmethod HexSpotweldAssembly.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select DEFINE_HEX_SPOTWELD_ASSEMBLYs using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting DEFINE_HEX_SPOTWELD_ASSEMBLYs
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Modelthen only DEFINE_HEX_SPOTWELD_ASSEMBLYs from that model can be selected. If the argument is aFlagthen only DEFINE_HEX_SPOTWELD_ASSEMBLYs that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any DEFINE_HEX_SPOTWELD_ASSEMBLYs 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 DEFINE_HEX_SPOTWELD_ASSEMBLYs selected or None if menu cancelled
- Return type:
int
Example
To select DEFINE_HEX_SPOTWELD_ASSEMBLYs from model m, flagging those selected with flag f, giving the prompt ‘Select DEFINE_HEX_SPOTWELD_ASSEMBLYs’:
Oasys.PRIMER.HexSpotweldAssembly.Select(f, 'Select DEFINE_HEX_SPOTWELD_ASSEMBLYs', m)To select DEFINE_HEX_SPOTWELD_ASSEMBLYs, flagging those selected with flag f but limiting selection to DEFINE_HEX_SPOTWELD_ASSEMBLYs flagged with flag l, giving the prompt ‘Select DEFINE_HEX_SPOTWELD_ASSEMBLYs’:
Oasys.PRIMER.HexSpotweldAssembly.Select(f, 'Select DEFINE_HEX_SPOTWELD_ASSEMBLYs', l)
- classmethod HexSpotweldAssembly.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model
- Parameters:
model (Model) –
Modelto get total forexists (boolean) – Optional. true if only existing DEFINE_HEX_SPOTWELD_ASSEMBLYs should be counted. If false or omitted referenced but undefined DEFINE_HEX_SPOTWELD_ASSEMBLYs will also be included in the total
- Returns:
number of DEFINE_HEX_SPOTWELD_ASSEMBLYs
- Return type:
int
Example
To get the total number of DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m:
total = Oasys.PRIMER.HexSpotweldAssembly.Total(m)
- classmethod HexSpotweldAssembly.UnflagAll(model, flag)¶
Unsets a defined flag on all of the DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model
- Parameters:
model (Model) –
Modelthat the defined flag for all DEFINE_HEX_SPOTWELD_ASSEMBLYs will be unset inflag (Flag) – Flag to unset on the DEFINE_HEX_SPOTWELD_ASSEMBLYs
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the DEFINE_HEX_SPOTWELD_ASSEMBLYs in model m:
Oasys.PRIMER.HexSpotweldAssembly.UnflagAll(m, f)
Instance methods¶
- HexSpotweldAssembly.AssociateComment(comment)¶
Associates a comment with a DEFINE_HEX_SPOTWELD_ASSEMBLY
- Parameters:
comment (Comment) –
Commentthat will be attached to the DEFINE_HEX_SPOTWELD_ASSEMBLY- Returns:
No return value
- Return type:
None
Example
To associate comment c to the DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.AssociateComment(c)
- HexSpotweldAssembly.Browse(modal=Oasys.gRPC.defaultArg)¶
Starts an edit panel in Browse mode
- 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 Browse DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.Browse()
- HexSpotweldAssembly.ClearFlag(flag)¶
Clears a flag on the DEFINE_HEX_SPOTWELD_ASSEMBLY
- Parameters:
flag (Flag) – Flag to clear on the DEFINE_HEX_SPOTWELD_ASSEMBLY
- Returns:
No return value
- Return type:
None
Example
To clear flag f for DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.ClearFlag(f)
- HexSpotweldAssembly.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the DEFINE_HEX_SPOTWELD_ASSEMBLY. The target include of the copied DEFINE_HEX_SPOTWELD_ASSEMBLY 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:
HexSpotweldAssembly object
- Return type:
HexSpotweldAssembly
Example
To copy DEFINE_HEX_SPOTWELD_ASSEMBLY h into DEFINE_HEX_SPOTWELD_ASSEMBLY z:
z = h.Copy()
- HexSpotweldAssembly.DetachComment(comment)¶
Detaches a comment from a DEFINE_HEX_SPOTWELD_ASSEMBLY
- Parameters:
comment (Comment) –
Commentthat will be detached from the DEFINE_HEX_SPOTWELD_ASSEMBLY- Returns:
No return value
- Return type:
None
Example
To detach comment c from the DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.DetachComment(c)
- HexSpotweldAssembly.Edit(modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel
- 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 DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.Edit()
- HexSpotweldAssembly.Flagged(flag)¶
Checks if the DEFINE_HEX_SPOTWELD_ASSEMBLY is flagged or not
- Parameters:
flag (Flag) – Flag to test on the DEFINE_HEX_SPOTWELD_ASSEMBLY
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if DEFINE_HEX_SPOTWELD_ASSEMBLY h has flag f set on it:
if h.Flagged(f): do_something..
- HexSpotweldAssembly.GetComments()¶
Extracts the comments associated to a DEFINE_HEX_SPOTWELD_ASSEMBLY
- 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 DEFINE_HEX_SPOTWELD_ASSEMBLY h:
comm_list = h.GetComments()
- HexSpotweldAssembly.GetParameter(prop)¶
Checks if a HexSpotweldAssembly 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_namesoption to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using theHexSpotweldAssembly.ViewParameters()method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – DEFINE_HEX_SPOTWELD_ASSEMBLY property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if HexSpotweldAssembly property h.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if h.GetParameter(h.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if HexSpotweldAssembly property h.example is a parameter by using the GetParameter method:
if h.ViewParameters().GetParameter(h.example): do_something..
- HexSpotweldAssembly.Keyword()¶
Returns the keyword for this HexSpotweldAssembly (*DEFINE_HEX_SPOTWELD_ASSEMBLY). Note that a carriage return is not added. See also
HexSpotweldAssembly.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for HexSpotweldAssem s:
key = s.Keyword()
- HexSpotweldAssembly.KeywordCards()¶
Returns the keyword cards for the HexSpotweldAssem. Note that a carriage return is not added. See also
HexSpotweldAssembly.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for HexSpotweldAssem s:
cards = s.KeywordCards()
- HexSpotweldAssembly.Next()¶
Returns the next DEFINE_HEX_SPOTWELD_ASSEMBLY in the model
- Returns:
HexSpotweldAssembly object (or None if there are no more DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model)
- Return type:
HexSpotweldAssembly
Example
To get the DEFINE_HEX_SPOTWELD_ASSEMBLY in model m after DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h = h.Next()
- HexSpotweldAssembly.Previous()¶
Returns the previous DEFINE_HEX_SPOTWELD_ASSEMBLY in the model
- Returns:
HexSpotweldAssembly object (or None if there are no more DEFINE_HEX_SPOTWELD_ASSEMBLYs in the model)
- Return type:
HexSpotweldAssembly
Example
To get the DEFINE_HEX_SPOTWELD_ASSEMBLY in model m before DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h = h.Previous()
- HexSpotweldAssembly.SetFlag(flag)¶
Sets a flag on the DEFINE_HEX_SPOTWELD_ASSEMBLY
- Parameters:
flag (Flag) – Flag to set on the DEFINE_HEX_SPOTWELD_ASSEMBLY
- Returns:
No return value
- Return type:
None
Example
To set flag f for DEFINE_HEX_SPOTWELD_ASSEMBLY h:
h.SetFlag(f)
- HexSpotweldAssembly.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:
HexSpotweldAssembly object
- Return type:
dict
Example
To check if HexSpotweldAssembly property h.example is a parameter by using the
HexSpotweldAssembly.GetParameter()method:if h.ViewParameters().GetParameter(h.example): do_something..
- HexSpotweldAssembly.Xrefs()¶
Returns the cross references for this DEFINE_HEX_SPOTWELD_ASSEMBLY
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for DEFINE_HEX_SPOTWELD_ASSEMBLY h:
xrefs = h.Xrefs()