Oasys.PRIMER.ConnectionProperties class

Properties

property ConnectionProperties.add: integer

To _ADD case’s parent definition

property ConnectionProperties.areaeq: integer

Area equation number

property ConnectionProperties.con_id: integer

*DEFINE_CONNECTION_PROPERTIES id

property ConnectionProperties.d_dg_pr: float

Default damage parameter

property ConnectionProperties.d_dg_prf: integer

Default damage parameter(function if proprul == 2)

property ConnectionProperties.d_etan: float

Default tangent modulus

property ConnectionProperties.d_etanf: integer

Default tangent modulus(function if proprul == 2)

property ConnectionProperties.d_exsb: float

Default bending stress exponent

property ConnectionProperties.d_exsbf: integer

Default bending stress exponent(function if proprul == 2)

property ConnectionProperties.d_exsn: float

Default normal stress exponent

property ConnectionProperties.d_exsnf: integer

Default normal stress exponent(function if proprul == 2)

property ConnectionProperties.d_exss: float

Default shear stress exponent

property ConnectionProperties.d_exssf: integer

Default shear stress exponent(function if proprul == 2)

property ConnectionProperties.d_gfad: float

Default fading energy

property ConnectionProperties.d_gfadf: integer

Default fading energy(function if proprul == 2)

property ConnectionProperties.d_lcsb: integer

Default LC of bending stress scale factor wrt strain rate

property ConnectionProperties.d_lcsn: integer

Default LC of normal stress scale factor wrt strain rate

property ConnectionProperties.d_lcss: integer

Default LC of shear stress scale factor wrt strain rate

property ConnectionProperties.d_rank: float

Default rank value

property ConnectionProperties.d_sb: float

Default bending strength

property ConnectionProperties.d_sbf: integer

Default bending strength(function if proprul == 2)

property ConnectionProperties.d_sclmrr: float

Default scaling factor for torsional moment in failure function

property ConnectionProperties.d_sigy: float

Default yield stress

property ConnectionProperties.d_sigyf: integer

Default yield stress(function if proprul == 2)

property ConnectionProperties.d_sn: float

Default normal strength

property ConnectionProperties.d_snf: integer

Default normal strength(function if proprul == 2)

property ConnectionProperties.d_ss: float

Default shear strength

property ConnectionProperties.d_ssf: integer

Default shear strength(function if proprul == 2)

property ConnectionProperties.dg_typ: integer

Damage type

property ConnectionProperties.exists(read only): boolean

true if *DEFINE_CONNECTION_PROPERTIES exists, false if referred to but not defined

property ConnectionProperties.heading: string

The title of the *DEFINE_CONNECTION_PROPERTIES or the empty string if _TITLE is not set

property ConnectionProperties.include: integer

The Include file number that the *DEFINE_CONNECTION_PROPERTIES is in

property ConnectionProperties.moarfl: integer

Modelled area flag

property ConnectionProperties.model(read only): integer

The Model number that the *DEFINE_CONNECTION_PROPERTIES is in

property ConnectionProperties.proprul: integer

Property rule number

Constructor

classmethod ConnectionProperties(model, con_id, heading=Oasys.gRPC.defaultArg)

Create a new :py:class:` *DEFINE_CONNECTION_PROPERTIES <ConnectionProperties>` object

Parameters:
  • model (Model) – Model that *DEFINE_CONNECTION_PROPERTIES will be created in

  • con_id (integer) – *DEFINE_CONNECTION_PROPERTIES id

  • heading (string) – Optional. Title for the *DEFINE_CONNECTION_PROPERTIES

Returns:

ConnectionProperties object

Return type:

dict

Example

To create a new *DEFINE_CONNECTION_PROPERTIES in model m with label 100:

c = Oasys.PRIMER.ConnectionProperties(m, 100)

Static methods

classmethod ConnectionProperties.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create a *DEFINE_CONNECTION_PROPERTIES

Parameters:
  • model (Model) – Model that the *DEFINE_CONNECTION_PROPERTIES will be created in

  • 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:

ConnectionProperties object (or None if not made)

Return type:

dict

Example

To start creating a *DEFINE_CONNECTION_PROPERTIES in model m:

c = Oasys.PRIMER.ConnectionProperties.Create(m)
classmethod ConnectionProperties.First(model)

Returns the first *DEFINE_CONNECTION_PROPERTIES in the model

Parameters:

model (Model) – Model to get first *DEFINE_CONNECTION_PROPERTIES in

Returns:

ConnectionProperties object (or None if there are no *DEFINE_CONNECTION_PROPERTIESs in the model)

Return type:

ConnectionProperties

Example

To get the first *DEFINE_CONNECTION_PROPERTIES in model m:

c = Oasys.PRIMER.ConnectionProperties.First(m)
classmethod ConnectionProperties.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the first free *DEFINE_CONNECTION_PROPERTIES label in the model. Also see ConnectionProperties.LastFreeLabel(), ConnectionProperties.NextFreeLabel() and Model.FirstFreeItemLabel()

Parameters:
  • model (Model) – Model to get first free *DEFINE_CONNECTION_PROPERTIES 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:

ConnectionProperties label

Return type:

int

Example

To get the first free *DEFINE_CONNECTION_PROPERTIES label in model m:

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

Flags all of the *DEFINE_CONNECTION_PROPERTIESs in the model with a defined flag

Parameters:
  • model (Model) – Model that all *DEFINE_CONNECTION_PROPERTIESs will be flagged in

  • flag (Flag) – Flag to set on the *DEFINE_CONNECTION_PROPERTIESs

Returns:

No return value

Return type:

None

Example

To flag all of the *DEFINE_CONNECTION_PROPERTIESs with flag f in model m:

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

Returns a list of ConnectionProperties objects for all of the *DEFINE_CONNECTION_PROPERTIESs in a model in PRIMER

Parameters:

model (Model) – Model to get *DEFINE_CONNECTION_PROPERTIESs from

Returns:

List of ConnectionProperties objects

Return type:

list

Example

To make a list of ConnectionProperties objects for all of the *DEFINE_CONNECTION_PROPERTIESs in model m

c = Oasys.PRIMER.ConnectionProperties.GetAll(m)
classmethod ConnectionProperties.GetFlagged(model, flag)

Returns a list of ConnectionProperties objects for all of the flagged *DEFINE_CONNECTION_PROPERTIESs in a model in PRIMER

Parameters:
  • model (Model) – Model to get *DEFINE_CONNECTION_PROPERTIESs from

  • flag (Flag) – Flag set on the *DEFINE_CONNECTION_PROPERTIESs that you want to retrieve

Returns:

List of ConnectionProperties objects

Return type:

list

Example

To make a list of ConnectionProperties objects for all of the *DEFINE_CONNECTION_PROPERTIESs in model m flagged with f

c = Oasys.PRIMER.ConnectionProperties.GetFlagged(m, f)
classmethod ConnectionProperties.GetFromID(model, number)

Returns the ConnectionProperties object for a *DEFINE_CONNECTION_PROPERTIES ID

Parameters:
  • model (Model) – Model to find the *DEFINE_CONNECTION_PROPERTIES in

  • number (integer) – number of the *DEFINE_CONNECTION_PROPERTIES you want the ConnectionProperties object for

Returns:

ConnectionProperties object (or None if *DEFINE_CONNECTION_PROPERTIES does not exist)

Return type:

ConnectionProperties

Example

To get the ConnectionProperties object for *DEFINE_CONNECTION_PROPERTIES 100 in model m

c = Oasys.PRIMER.ConnectionProperties.GetFromID(m, 100)
classmethod ConnectionProperties.Last(model)

Returns the last *DEFINE_CONNECTION_PROPERTIES in the model

Parameters:

model (Model) – Model to get last *DEFINE_CONNECTION_PROPERTIES in

Returns:

ConnectionProperties object (or None if there are no *DEFINE_CONNECTION_PROPERTIESs in the model)

Return type:

ConnectionProperties

Example

To get the last *DEFINE_CONNECTION_PROPERTIES in model m:

c = Oasys.PRIMER.ConnectionProperties.Last(m)
classmethod ConnectionProperties.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the last free *DEFINE_CONNECTION_PROPERTIES label in the model. Also see ConnectionProperties.FirstFreeLabel(), ConnectionProperties.NextFreeLabel() and see Model.LastFreeItemLabel()

Parameters:
  • model (Model) – Model to get last free *DEFINE_CONNECTION_PROPERTIES 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:

ConnectionProperties label

Return type:

int

Example

To get the last free *DEFINE_CONNECTION_PROPERTIES label in model m:

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

Returns the next free (highest+1) *DEFINE_CONNECTION_PROPERTIES label in the model. Also see ConnectionProperties.FirstFreeLabel(), ConnectionProperties.LastFreeLabel() and Model.NextFreeItemLabel()

Parameters:
  • model (Model) – Model to get next free *DEFINE_CONNECTION_PROPERTIES 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:

ConnectionProperties label

Return type:

int

Example

To get the next free *DEFINE_CONNECTION_PROPERTIES label in model m:

label = Oasys.PRIMER.ConnectionProperties.NextFreeLabel(m)
classmethod ConnectionProperties.RenumberAll(model, start)

Renumbers all of the *DEFINE_CONNECTION_PROPERTIESs in the model

Parameters:
  • model (Model) – Model that all *DEFINE_CONNECTION_PROPERTIESs will be renumbered in

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the *DEFINE_CONNECTION_PROPERTIESs in model m, from 1000000:

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

Renumbers all of the flagged *DEFINE_CONNECTION_PROPERTIESs in the model

Parameters:
  • model (Model) – Model that all the flagged *DEFINE_CONNECTION_PROPERTIESs will be renumbered in

  • flag (Flag) – Flag set on the *DEFINE_CONNECTION_PROPERTIESs 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_CONNECTION_PROPERTIESs in model m flagged with f, from 1000000:

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

Allows the user to select *DEFINE_CONNECTION_PROPERTIESs using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting *DEFINE_CONNECTION_PROPERTIESs

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

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

Return type:

int

Example

To select *DEFINE_CONNECTION_PROPERTIESs from model m, flagging those selected with flag f, giving the prompt ‘Select *DEFINE_CONNECTION_PROPERTIESs’:

Oasys.PRIMER.ConnectionProperties.Select(f, 'Select \*DEFINE_CONNECTION_PROPERTIESs', m)

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

Oasys.PRIMER.ConnectionProperties.Select(f, 'Select \*DEFINE_CONNECTION_PROPERTIESs', l)
classmethod ConnectionProperties.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of *DEFINE_CONNECTION_PROPERTIESs in the model

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

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

Returns:

number of *DEFINE_CONNECTION_PROPERTIESs

Return type:

int

Example

To get the total number of *DEFINE_CONNECTION_PROPERTIESs in model m:

total = Oasys.PRIMER.ConnectionProperties.Total(m)
classmethod ConnectionProperties.UnflagAll(model, flag)

Unsets a defined flag on all of the *DEFINE_CONNECTION_PROPERTIESs in the model

Parameters:
  • model (Model) – Model that the defined flag for all *DEFINE_CONNECTION_PROPERTIESs will be unset in

  • flag (Flag) – Flag to unset on the *DEFINE_CONNECTION_PROPERTIESs

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the *DEFINE_CONNECTION_PROPERTIESs in model m:

Oasys.PRIMER.ConnectionProperties.UnflagAll(m, f)

Instance methods

ConnectionProperties.AddMaterialDataLine()

Allows user to add material data line in *DEFINE_CONNECTION_PROPERTIES

Returns:

No return value

Return type:

None

Example

To Add Material data line in *DEFINE_CONNECTION_PROPERTIES c:

c.AddMaterialDataLine()
ConnectionProperties.AssociateComment(comment)

Associates a comment with a *DEFINE_CONNECTION_PROPERTIES

Parameters:

comment (Comment) – Comment that will be attached to the *DEFINE_CONNECTION_PROPERTIES

Returns:

No return value

Return type:

None

Example

To associate comment c to the *DEFINE_CONNECTION_PROPERTIES c:

c.AssociateComment(c)
ConnectionProperties.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_CONNECTION_PROPERTIES c:

c.Browse()
ConnectionProperties.ClearFlag(flag)

Clears a flag on the *DEFINE_CONNECTION_PROPERTIES

Parameters:

flag (Flag) – Flag to clear on the *DEFINE_CONNECTION_PROPERTIES

Returns:

No return value

Return type:

None

Example

To clear flag f for *DEFINE_CONNECTION_PROPERTIES c:

c.ClearFlag(f)
ConnectionProperties.Copy(range=Oasys.gRPC.defaultArg)

Copies the *DEFINE_CONNECTION_PROPERTIES. The target include of the copied *DEFINE_CONNECTION_PROPERTIES 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:

ConnectionProperties object

Return type:

ConnectionProperties

Example

To copy *DEFINE_CONNECTION_PROPERTIES c into *DEFINE_CONNECTION_PROPERTIES z:

z = c.Copy()
ConnectionProperties.DetachComment(comment)

Detaches a comment from a *DEFINE_CONNECTION_PROPERTIES

Parameters:

comment (Comment) – Comment that will be detached from the *DEFINE_CONNECTION_PROPERTIES

Returns:

No return value

Return type:

None

Example

To detach comment c from the *DEFINE_CONNECTION_PROPERTIES c:

c.DetachComment(c)
ConnectionProperties.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_CONNECTION_PROPERTIES c:

c.Edit()
ConnectionProperties.Flagged(flag)

Checks if the *DEFINE_CONNECTION_PROPERTIES is flagged or not

Parameters:

flag (Flag) – Flag to test on the *DEFINE_CONNECTION_PROPERTIES

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if *DEFINE_CONNECTION_PROPERTIES c has flag f set on it:

if c.Flagged(f):
    do_something..
ConnectionProperties.GetComments()

Extracts the comments associated to a *DEFINE_CONNECTION_PROPERTIES

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_CONNECTION_PROPERTIES c:

comm_list = c.GetComments()
ConnectionProperties.GetMaterialDataLine(row)

Returns the material data at given row in *DEFINE_CONNECTION_PROPERTIES

Parameters:

row (integer) – Material data row number, eg. for first material data, row = 0

Returns:

List of numbers containing the material id, sigy, e_tan etc.

Return type:

int

Example

To get material data at first row, row = 0 in *DEFINE_CONNECTION_PROPERTIES c:

c.GetMaterialData(0)
ConnectionProperties.GetParameter(prop)

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

Parameters:

prop (string) – *DEFINE_CONNECTION_PROPERTIES property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if ConnectionProperties property c.example is a parameter:

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

To check if ConnectionProperties property c.example is a parameter by using the GetParameter method:

if c.ViewParameters().GetParameter(c.example):
    do_something..
ConnectionProperties.Keyword()

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

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for ConnectionProperties c:

key = c.Keyword()
ConnectionProperties.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for connection_properties c:

cards = c.KeywordCards()
ConnectionProperties.Next()

Returns the next *DEFINE_CONNECTION_PROPERTIES in the model

Returns:

ConnectionProperties object (or None if there are no more *DEFINE_CONNECTION_PROPERTIESs in the model)

Return type:

ConnectionProperties

Example

To get the *DEFINE_CONNECTION_PROPERTIES in model m after *DEFINE_CONNECTION_PROPERTIES c:

c = c.Next()
ConnectionProperties.Previous()

Returns the previous *DEFINE_CONNECTION_PROPERTIES in the model

Returns:

ConnectionProperties object (or None if there are no more *DEFINE_CONNECTION_PROPERTIESs in the model)

Return type:

ConnectionProperties

Example

To get the *DEFINE_CONNECTION_PROPERTIES in model m before *DEFINE_CONNECTION_PROPERTIES c:

c = c.Previous()
ConnectionProperties.RemoveMaterialDataLine(row)

Allows user to remove material data line in *DEFINE_CONNECTION_PROPERTIES

Parameters:

row (integer) – Material data row number, eg. for first material data, row = 0

Returns:

No return value

Return type:

None

Example

To remove first material data line in *DEFINE_CONNECTION_PROPERTIES c:

c.RemoveMaterialDataLine(0)
ConnectionProperties.SetFlag(flag)

Sets a flag on the *DEFINE_CONNECTION_PROPERTIES

Parameters:

flag (Flag) – Flag to set on the *DEFINE_CONNECTION_PROPERTIES

Returns:

No return value

Return type:

None

Example

To set flag f for *DEFINE_CONNECTION_PROPERTIES c:

c.SetFlag(f)
ConnectionProperties.SetMaterialDataLine(row, mid, sigy=Oasys.gRPC.defaultArg, etan=Oasys.gRPC.defaultArg, dg_pr=Oasys.gRPC.defaultArg, rank=Oasys.gRPC.defaultArg, sn=Oasys.gRPC.defaultArg, sb=Oasys.gRPC.defaultArg, ss=Oasys.gRPC.defaultArg, exsn=Oasys.gRPC.defaultArg, exsb=Oasys.gRPC.defaultArg, exss=Oasys.gRPC.defaultArg, lcsn=Oasys.gRPC.defaultArg, lcsb=Oasys.gRPC.defaultArg, lcss=Oasys.gRPC.defaultArg, gfad=Oasys.gRPC.defaultArg, sclmrr=Oasys.gRPC.defaultArg)

Allows user to set fields for material data line at given row in *DEFINE_CONNECTION_PROPERTIES

Parameters:
  • row (integer) – Material data row number, eg. for first material data, row = 0

  • mid (integer) – Material ID

  • sigy (real) – Optional. Default yield stress

  • etan (real) – Optional. Default tangent modulus

  • dg_pr (real) – Optional. Default damage parameter

  • rank (real) – Optional. Default rank value

  • sn (real) – Optional. Default normal strength

  • sb (real) – Optional. Default bending strength

  • ss (real) – Optional. Default shear strength

  • exsn (real) – Optional. Default normal stress exponent

  • exsb (real) – Optional. Default bending stress exponent

  • exss (real) – Optional. Default shear stress exponent

  • lcsn (integer) – Optional. Default LC of normal stress scale factor wrt strain rate

  • lcsb (integer) – Optional. Default LC of bending stress scale factor wrt strain rate

  • lcss (integer) – Optional. Default LC of shear stress scale factor wrt strain rate

  • gfad (real) – Optional. Default fading energy

  • sclmrr (real) – Optional. Default scaling factor for torsional moment in failure function

Returns:

No return value

Return type:

None

Example

To set material data at first row ( row = 0) to mat 111 in *DEFINE_CONNECTION_PROPERTIES c:

c.SetMaterialData(0,111)
ConnectionProperties.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:

ConnectionProperties object

Return type:

dict

Example

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

if c.ViewParameters().GetParameter(c.example):
    do_something..
ConnectionProperties.Xrefs()

Returns the cross references for this *DEFINE_CONNECTION_PROPERTIES

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for *DEFINE_CONNECTION_PROPERTIES c:

xrefs = c.Xrefs()