JointStiffness (Jstf) class

The JointStiffness class gives you access to constrained joint stiffness cards in PRIMER. More...

The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:

Class functions

Member functions

JointStiffness constants

Name Description
JointStiffness.CYLINDRICAL JointStiffness is *CONSTRAINED_JOINT_STIFFNESS_CYLINDRICAL.
JointStiffness.FLEXION_TORSION JointStiffness is *CONSTRAINED_JOINT_STIFFNESS_FLEXION-TORSION.
JointStiffness.GENERALIZED JointStiffness is *CONSTRAINED_JOINT_STIFFNESS_GENERALIZED.
JointStiffness.TRANSLATIONAL JointStiffness is *CONSTRAINED_JOINT_STIFFNESS_TRANSLATIONAL.

JointStiffness properties

Name Type Description
cida integer Coordinate System ID #A.
cidb integer Coordinate System ID #B.
dlcidal integer LC: Alpha damping moment vs Rotl vel.
dlcidbt integer LC: Beta damping moment vs Rotl vel.
dlcidg integer LC: Gamma damping factor vs factor on Alpha damping moment.
dlcidp integer LC: P damping vs P rel velocity.
dlcidph integer LC: Phi damping moment vs rotation vel.
dlcidps integer LC: Psi damping moment vs rotation vel.
dlcidr integer LC: R damping vs R rel velocity.
dlcidt integer LC: Theta damping moment vs rotation vel.
dlcidx integer LC: X damping vs X rel velocity.
dlcidy integer LC: Y damping vs Y rel velocity.
dlcidz integer LC: Z damping vs Z rel velocity.
esal real Stiffness/angle in Alpha direction.
esbt real Stiffness/angle in Beta direction.
esph real Stiffness/angle in Phi direction.
esps real Stiffness/angle in Psi direction.
esr real Elastic stiffness for R stop and friction.
est real Stiffness/angle in Theta direction.
esx real Elastic stiffness for X stop and friction.
esy real Elastic stiffness for Y stop and friction.
esz real Elastic stiffness for Z stop and friction.
exists (read only) logical true if joint stiffness exists, false if referred to but not defined.
fd real Dynamic friction coefficient.
ffr integer LC: Lim R force, or yield force vs R translation.
ffx integer LC: Lim X force, or yield force vs X translation.
ffy integer LC: Lim Y force, or yield force vs Y translation.
ffz integer LC: Lim Z force, or yield force vs Z translation.
fmal integer LC: Alpha Frictional moment vs rotation.
fmbt integer LC: Beta Frictional moment vs rotation.
fmph integer LC: Psi frictional moment vs rotation.
fmps integer LC: Psi frictional moment vs rotation.
fmt integer LC: Theta frictional moment vs rotation.
fs real Static friction coefficient.
heading string This property is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.
JointStiffness heading. Use the title property instead  [deprecated]
include integer The Include file number that the joint stiffness is in.
jid integer Joint for restraint/table uses.
jsid integer ID of the JointStiffness. Also see the label property which is an alternative name for this
label integer Label of the JointStiffness
lcidal integer LC: Alpha moment vs Rotation.
lcidbt integer LC: Beta moment vs Rotation.
lcidg integer LC: Gamma angle vs factor on Alpha blending.
lcidph integer LC: Phi moment vs rotation.
lcidps integer LC: Psi moment vs rotation.
lcidr integer LC: R force vs R rel displ.
lcidt integer LC: Theta moment vs rotation.
lcidx integer LC: X force vs X rel displ.
lcidy integer LC: Y force vs Y rel displ.
lcidz integer LC: Z force vs Z rel displ.
model (read only) integer The Model number that the joint stiffness is in.
nsabt real Stop angle for -ve Beta rotation.
nsaph real Stop angle for -ve Phi rotation.
nsaps real Stop angle for -ve Psi rotation.
nsat real Stop angle for -ve Theta rotation.
nsdx real Limiting -ve X translation.
nsdy real Limiting -ve Y translation.
nsdz real Limiting -ve Z translation.
option constant JointStiffness type. Can be JointStiffness.GENERALIZED, JointStiffness.FLEXION_TORSION, JointStiffness.TRANSLATIONAL or JointStiffness.CYLINDRICAL
pida integer Part ID #A.
pidb integer Part ID #B.
psabt real Stop angle for +ve Beta rotation.
psaph real Stop angle for +ve Phi rotation.
psaps real Stop angle for +ve Psi rotation.
psat real Stop angle for +ve Theta rotation.
psdr real Limiting R translation.
psdx real Limiting +ve X translation.
psdy real Limiting +ve Y translation.
psdz real Limiting +ve Z translation.
rad1 real Radius of pin.
rad2 real Radius of hole.
rps real Relative penalty stiffness.
saal real Stop angle for Alpha rotation.
title string JointStiffness title

Detailed Description

The JointStiffness class allows you to create, modify, edit and manipulate joint stiffness cards. See the documentation below for more details.

For convenience "Jstf" can also be used as the class name instead of "JointStiffness".

Constructor

new JointStiffness(Model[Model], options [object])

Description

Create a new JointStiffness object. The fields on card 1 of the joint stiffness can be set in the constructor using the option argument. To set any other values use properties.

Arguments

  • Model (Model)

    Model that the joint stiffness will be created in

  • options (object)

    Options for creating the joint stiffness

    Object has the following properties:

    Name Type Description
    cida (optional) integer Coordinate System ID #A
    cidb (optional) integer Coordinate System ID #B
    id integer Joint stiffness ID
    jid (optional) integer Joint for restraint/table uses
    option constant Constrained joint stiffness option. Can be JointStiffness.GENERALIZED, JointStiffness.FLEXION_TORSION, JointStiffness.TRANSLATIONAL or JointStiffness.CYLINDRICAL
    pida (optional) integer Part ID #A
    pidb (optional) integer Part ID #B
    rps (optional) real Relative penalty stiffness (for JointStiffness.TRANSLATIONAL or JointStiffness.CYLINDRICAL)
    title (optional) string Joint stiffness title

    Returns

    JointStiffness object

    Return type

    JointStiffness

    Example

    To create a new joint stiffness 500 with title "test" of type GENERALIZED in model m with rigid body parts 50 and 150 and lcidph 10

    var j = new JointStiffness(m, { type: JointStiffness.GENERALIZED, id: 500, pida: 50, pidb: 50, title: "test" } );
    j.lcidph = 10;

    new JointStiffness(Model[Model], option[constant], label[integer], pida[integer], pidb[integer], cida[integer], cidb[integer], jid[integer], lcidph[integer], lcidt[integer], lcidps[integer], dlcidph[integer], dlcidt[integer], dlcidps[integer], esph[real], fmph[integer], est[real], fmt[integer], esps[real], fmps[integer], nsaph[real], psaph[real], nsat[real], psat[real], nsaps[real], psaps[real])   [deprecated]

    This function is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.

    Description

    Create a new JointStiffness object for *CONSTRAINED_JOINT_STIFFNESS_GENERALIZED.

    Arguments

  • Model (Model)

    Model that jstf will be created in

  • option (constant)

    Must be JointStiffness.GENERALIZED.

  • label (integer)

    JointStiffness ID of the JSTF. Also see the label argument which is an alternative name for this.

  • pida (integer)

    Part ID #A.

  • pidb (integer)

    Part ID #B.

  • cida (integer)

    Coordinate System ID #A.

  • cidb (integer)

    Coordinate System ID #B.

  • jid (integer)

    Joint for restraint/table uses.

  • lcidph (integer)

    LC: Phi moment vs rotation.

  • lcidt (integer)

    LC: Theta moment vs rotation.

  • lcidps (integer)

    LC: Psi moment vs rotation.

  • dlcidph (integer)

    LC: Phi damping moment vs rotation vel.

  • dlcidt (integer)

    LC: Theta damping moment vs rotation vel.

  • dlcidps (integer)

    LC: Psi damping moment vs rotation vel.

  • esph (real)

    Stiffness/angle in Phi direction.

  • fmph (integer)

    LC: Psi frictional moment vs rotation.

  • est (real)

    Stiffness/angle in Theta direction.

  • fmt (integer)

    LC: Theta frictional moment vs rotation.

  • esps (real)

    Stiffness/angle in Psi direction.

  • fmps (integer)

    LC: Psi frictional moment vs rotation.

  • nsaph (real)

    Stop angle for -ve Phi rotation.

  • psaph (real)

    Stop angle for +ve Phi rotation.

  • nsat (real)

    Stop angle for -ve Theta rotation.

  • psat (real)

    Stop angle for +ve Theta rotation.

  • nsaps (real)

    Stop angle for -ve Psi rotation.

  • psaps (real)

    Stop angle for +ve Psi rotation.

    Returns

    JointStiffness object

    Return type

    JointStiffness

    Example

    To create a new jstf 1000 of type GENERALIZED in model m with the following specifiction: pida, pidb, cida, cidb, jid are 91, 92, 81, 82, 71 respectively; lcidph, lcidt, lcidps, dlcidph, dlcidt, dlcidps are 1, 2, 3, 4, 5, 6 respectively; esph, fmph, est, fmt, esps, fmps are 11.0, 11, 12.0, 12, 13.0, 13 respectively; nsaph, psaph, nsat, psat, nsaps, psaps are -20, 20, -30, 30, -40, 40 respectively.

    var j = new JointStiffness(m, JointStiffness.GENERALIZED, 1000, 91, 92, 81, 82, 71, 1, 2, 3, 4, 5, 6, 11.0, 11, 12.0, 12, 13.0, 13, -20, 20, -30, 30, -40, 40);

    new JointStiffness(Model[Model], option[constant], label[integer], pida[integer], pidb[integer], cida[integer], cidb[integer], jid[integer], lcidal[integer], lcidg[integer], lcidbt[integer], dlcidal[integer], dlcidg[integer], dlcidbt[integer], esal[real], fmal[integer], esbt[real], fmbt[integer], saal[real], nsabt[real], psabt[real])   [deprecated]

    This function is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.

    Description

    Create a new JointStiffness object for *CONSTRAINED_JOINT_STIFFNESS_FLEXION-TORSION.

    Arguments

  • Model (Model)

    Model that jstf will be created in

  • option (constant)

    Must be JointStiffness.FLEXION_TORSION.

  • label (integer)

    JointStiffness ID of the JSTF. Also see the label argument which is an alternative name for this.

  • pida (integer)

    Part ID #A.

  • pidb (integer)

    Part ID #B.

  • cida (integer)

    Coordinate System ID #A.

  • cidb (integer)

    Coordinate System ID #B.

  • jid (integer)

    Joint for restraint/table uses.

  • lcidal (integer)

    LC: Alpha moment vs Rotation.

  • lcidg (integer)

    LC: Gamma angle vs factor on Alpha blending.

  • lcidbt (integer)

    LC: Beta moment vs Rotation.

  • dlcidal (integer)

    LC: Alpha damping moment vs Rotl vel.

  • dlcidg (integer)

    LC: Gamma damping factor vs factor on Alpha damping moment.

  • dlcidbt (integer)

    LC: Beta damping moment vs Rotl vel.

  • esal (real)

    Stiffness/angle in Alpha direction.

  • fmal (integer)

    LC: Alpha Frictional moment vs rotation.

  • esbt (real)

    Stiffness/angle in Beta direction.

  • fmbt (integer)

    LC: Beta Frictional moment vs rotation.

  • saal (real)

    Stop angle for Alpha rotation.

  • nsabt (real)

    Stop angle for -ve Beta rotation.

  • psabt (real)

    Stop angle for +ve Beta rotation.

    Returns

    JointStiffness object

    Return type

    JointStiffness

    Example

    To create a new jstf 2000 of type GENERALIZED in model m with the following specifiction: pida, pidb, cida, cidb, jid are 81, 82, 71, 72, 61 respectively; lcidal, lcidg, lcidbt, dlcidal, dlcidg, dlcidbt are 1, 2, 3, 4, 5, 6 respectively; esal, fmal, esbt, fmbt are 11.5, 12, 12.5, 13 respectively; saal, nsabt, psabt are 22.5, 25.0, 27.5 respectively.

    var j = new JointStiffness(m, JointStiffness.FLEXION_TORSION, 2000, 81, 82, 71, 72, 61, 1, 2, 3, 4, 5, 6, 11.5, 12, 12.5, 13, 22.5, 25.0, 27.5);

    new JointStiffness(Model[Model], option[constant], label[integer], pida[integer], pidb[integer], cida[integer], cidb[integer], jid[integer], rps[real], lcidx[integer], lcidy[integer], lcidz[integer], dlcidx[integer], dlcidy[integer], dlcidz[integer], esx[real], ffx[integer], esy[real], ffy[integer], esz[real], ffz[integer], nsdx[real], psdx[real], nsdy[real], psdy[real], nsdz[real], psdz[real], fs[real], fd[real])   [deprecated]

    This function is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.

    Description

    Create a new JointStiffness object for *CONSTRAINED_JOINT_STIFFNESS_TRANSLATIONAL.

    Arguments

  • Model (Model)

    Model that jstf will be created in

  • option (constant)

    Must be JointStiffness.TRANSLATIONAL.

  • label (integer)

    JointStiffness ID of the JSTF. Also see the label argument which is an alternative name for this.

  • pida (integer)

    Part ID #A.

  • pidb (integer)

    Part ID #B.

  • cida (integer)

    Coordinate System ID #A.

  • cidb (integer)

    Coordinate System ID #B.

  • jid (integer)

    Joint for restraint/table uses.

  • rps (real)

    Relative penalty stiffness.

  • lcidx (integer)

    LC: X force vs X rel displ.

  • lcidy (integer)

    LC: Y force vs Y rel displ.

  • lcidz (integer)

    LC: Z force vs Z rel displ.

  • dlcidx (integer)

    LC: X damping vs X rel velocity.

  • dlcidy (integer)

    LC: Y damping vs Y rel velocity.

  • dlcidz (integer)

    LC: Z damping vs Z rel velocity.

  • esx (real)

    Elastic stiffness for X stop and friction.

  • ffx (integer)

    LC: Lim X force, or yield force vs X translation.

  • esy (real)

    Elastic stiffness for Y stop and friction.

  • ffy (integer)

    LC: Lim Y force, or yield force vs Y translation.

  • esz (real)

    Elastic stiffness for Z stop and friction.

  • ffz (integer)

    LC: Lim Z force, or yield force vs Z translation.

  • nsdx (real)

    Limiting -ve X translation.

  • psdx (real)

    Limiting +ve X translation.

  • nsdy (real)

    Limiting -ve Y translation.

  • psdy (real)

    Limiting +ve Y translation.

  • nsdz (real)

    Limiting -ve Z translation.

  • psdz (real)

    Limiting +ve Z translation.

  • fs (real)

    Static friction coefficient.

  • fd (real)

    Dynamic friction coefficient.

    Returns

    JointStiffness object

    Return type

    JointStiffness

    Example

    To create a new jstf 3000 of type TRANSLATIONAL in model m with the following specifiction: pida, pidb, cida, cidb, jid, rps are 71, 72, 61, 62, 51, 2 respectively; lcidx, lcidy, lcidz, dlcidx, dlcidy, dlcidz are 1, 2, 3, 4, 5, 6 respectively; esx, ffx, esy, ffy, esz, ffz are are 12.5, 13, 13.5, 14, 14.5, 15 respectively; nsdx, psdx, nsdy, psdy, nsdz, psdz, fs, fd are -30, 30, -40, 40, -50, 50, 0.2, 0.1 respectively.

    var j = new JointStiffness(m, JointStiffness.TRANSLATIONAL, 3000, 71, 72, 61, 62, 51, 2, 1, 2, 3, 4, 5, 6, 12.5, 13, 13.5, 14, 14.5, 15, -30, 30, -40, 40, -50, 50, 0.2, 0.1);

    new JointStiffness(Model[Model], option[constant], label[integer], pida[integer], pidb[integer], cida[integer], cidb[integer], jid[integer], rps[real], lcidr[integer], lcidz[integer], dlcidr[integer], dlcidp[integer], dlcidz[integer], lcidt[integer], dlcidt[integer], esr[real], ffr[integer], esz[real], ffz[integer], rad1[real], rad2[real], psdr[real], nsdz[real], psdz[real], fs[real], fd[real])   [deprecated]

    This function is deprecated in version 21.0. It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.

    Description

    Create a new JointStiffness object for *CONSTRAINED_JOINT_STIFFNESS_CYLINDRICAL.

    Arguments

  • Model (Model)

    Model that jstf will be created in

  • option (constant)

    Must be JointStiffness.CYLINDRICAL.

  • label (integer)

    JointStiffness ID of the JSTF. Also see the label argument which is an alternative name for this.

  • pida (integer)

    Part ID #A.

  • pidb (integer)

    Part ID #B.

  • cida (integer)

    Coordinate System ID #A.

  • cidb (integer)

    Coordinate System ID #B.

  • jid (integer)

    Joint for restraint/table uses.

  • rps (real)

    Relative penalty stiffness.

  • lcidr (integer)

    LC: R force vs R rel displ.

  • lcidz (integer)

    LC: Z force vs Z rel displ.

  • dlcidr (integer)

    LC: R damping vs R rel velocity.

  • dlcidp (integer)

    LC: P damping vs P rel velocity.

  • dlcidz (integer)

    LC: Z damping vs Z rel velocity.

  • lcidt (integer)

    LC: Theta moment vs rotation.

  • dlcidt (integer)

    LC: Theta damping moment vs rotation vel.

  • esr (real)

    Elastic stiffness for R stop and friction.

  • ffr (integer)

    LC: Lim R force, or yield force vs R translation.

  • esz (real)

    Elastic stiffness for Z stop and friction.

  • ffz (integer)

    LC: Lim Z force, or yield force vs Z translation.

  • rad1 (real)

    Radius of pin.

  • rad2 (real)

    Radius of hole.

  • psdr (real)

    Limiting R translation.

  • nsdz (real)

    Limiting -ve Z translation.

  • psdz (real)

    Limiting +ve Z translation.

  • fs (real)

    Static friction coefficient.

  • fd (real)

    Dynamic friction coefficient.

    Returns

    JointStiffness object

    Return type

    JointStiffness

    Example

    To create a new jstf 4000 of type CYLINDRICAL in model m with the following specifiction: pida, pidb, cida, cidb, jid, rps are 61, 62, 51, 52, 41, 2 respectively; lcidr, lcidz, dlcidr, dlcidp, dlcidz, lcidt, dlcidt are 1, 2, 3, 4, 5, 6, 7 respectively; esr, ffr, esz, ffz, rad1, rad2 are are 12.5, 13, 13.5, 14, 14.5, 15.5 respectively; psdr, nsdz, psdz, fs, fd are 30, -40, 50, 0.2, 0.1 respectively.

    var j = new JointStiffness(m, JointStiffness.CYLINDRICAL, 4000, 61, 62, 51, 52, 41, 2, 1, 2, 3, 4, 5, 6, 7, 12.5, 13, 13.5, 14, 14.5, 15.5, 30, -40, 50, 0.2, 0.1);

    Details of functions

    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a joint stiffness.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the joint stiffness

    Returns

    No return value

    Example

    To associate comment c to the joint stiffness js:

    js.AssociateComment(c);


    Blank()

    Description

    Blanks the joint stiffness

    Arguments

    No arguments

    Returns

    No return value

    Example

    To blank joint stiffness js:

    js.Blank();


    BlankAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Blanks all of the joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be blanked in

  • redraw (optional) (boolean)

    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

    Example

    To blank all of the joint stiffnesses in model m:

    JointStiffness.BlankAll(m);


    BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Blanks all of the flagged joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all the flagged joint stiffnesses will be blanked in

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to blank

  • redraw (optional) (boolean)

    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

    Example

    To blank all of the joint stiffnesses in model m flagged with f:

    JointStiffness.BlankFlagged(m, f);


    Blanked()

    Description

    Checks if the joint stiffness is blanked or not.

    Arguments

    No arguments

    Returns

    true if blanked, false if not.

    Return type

    Boolean

    Example

    To check if joint stiffness js is blanked:

    if (js.Blanked() ) do_something...


    Browse(modal (optional)[boolean])

    Description

    Starts an edit panel in Browse mode.

    Arguments

  • modal (optional) (boolean)

    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

    Example

    To Browse joint stiffness js:

    js.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the joint stiffness.

    Arguments

  • flag (Flag)

    Flag to clear on the joint stiffness

    Returns

    No return value

    Example

    To clear flag f for joint stiffness js:

    js.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

    Copies the joint stiffness. The target include of the copied joint stiffness can be set using Options.copy_target_include.

    Arguments

  • range (optional) (boolean)

    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

    JointStiffness object

    Return type

    JointStiffness

    Example

    To copy joint stiffness js into joint stiffness z:

    var z = js.Copy();


    Create(Model[Model], modal (optional)[boolean]) [static]

    Description

    Starts an interactive editing panel to create a joint stiffness

    Arguments

  • Model (Model)

    Model that the joint stiffness will be created in.

  • modal (optional) (boolean)

    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

    JointStiffness object (or null if not made).

    Return type

    JointStiffness

    Example

    To start creating a joint stiffness in model m:

    var js = JointStiffness.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a joint stiffness.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the joint stiffness

    Returns

    No return value

    Example

    To detach comment c from the joint stiffness js:

    js.DetachComment(c);


    Edit(modal (optional)[boolean])

    Description

    Starts an interactive editing panel.

    Arguments

  • modal (optional) (boolean)

    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

    Example

    To Edit joint stiffness js:

    js.Edit();


    Error(message[string], details (optional)[string])

    Description

    Adds an error for joint stiffness. For more details on checking see the Check class.

    Arguments

  • message (string)

    The error message to give

  • details (optional) (string)

    An optional detailed error message

    Returns

    No return value

    Example

    To add an error message "My custom error" for joint stiffness js:

    js.Error("My custom error");


    First(Model[Model]) [static]

    Description

    Returns the first joint stiffness in the model.

    Arguments

  • Model (Model)

    Model to get first joint stiffness in

    Returns

    JointStiffness object (or null if there are no joint stiffnesses in the model).

    Return type

    JointStiffness

    Example

    To get the first joint stiffness in model m:

    var js = JointStiffness.First(m);


    FirstFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the first free joint stiffness label in the model. Also see JointStiffness.LastFreeLabel(), JointStiffness.NextFreeLabel() and Model.FirstFreeItemLabel().

    Arguments

  • Model (Model)

    Model to get first free joint stiffness label in

  • layer (optional) (Include number)

    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

    JointStiffness label.

    Return type

    Number

    Example

    To get the first free joint stiffness label in model m:

    var label = JointStiffness.FirstFreeLabel(m);


    FlagAll(Model[Model], flag[Flag]) [static]

    Description

    Flags all of the joint stiffnesses in the model with a defined flag.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be flagged in

  • flag (Flag)

    Flag to set on the joint stiffnesses

    Returns

    No return value

    Example

    To flag all of the joint stiffnesses with flag f in model m:

    JointStiffness.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the joint stiffness is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the joint stiffness

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if joint stiffness js has flag f set on it:

    if (js.Flagged(f) ) do_something...


    ForEach(Model[Model], func[function], extra (optional)[any]) [static]

    Description

    Calls a function for each joint stiffness in the model.
    Note that ForEach has been designed to make looping over joint stiffnesses as fast as possible and so has some limitations.
    Firstly, a single temporary JointStiffness object is created and on each function call it is updated with the current joint stiffness data. This means that you should not try to store the JointStiffness object for later use (e.g. in an array) as it is temporary.
    Secondly, you cannot create new joint stiffnesses inside a ForEach loop.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses are in

  • func (function)

    Function to call for each joint stiffness

  • extra (optional) (any)

    An optional extra object/array/string etc that will appended to arguments when calling the function

    Returns

    No return value

    Example

    To call function test for all of the joint stiffnesses in model m:

    JointStiffness.ForEach(m, test);
    function test(js)
    {
    // js is JointStiffness object
    }

    To call function test for all of the joint stiffnesses in model m with optional object:

    var data = { x:0, y:0 };
    JointStiffness.ForEach(m, test, data);
    function test(js, extra)
    {
    // js is JointStiffness object
    // extra is data
    }


    GetAll(Model[Model], property (optional)[string]) [static]

    Description

    Returns an array of JointStiffness objects or properties for all of the joint stiffnesses in a model in PRIMER. If the optional property argument is not given then an array of JointStiffness objects is returned. If the property argument is given, that property value for each joint stiffness is returned in the array instead of a JointStiffness object

    Arguments

  • Model (Model)

    Model to get joint stiffnesses from

  • property (optional) (string)

    Name for property to get for all joint stiffnesses in the model

    Returns

    Array of JointStiffness objects or properties

    Return type

    Array

    Example

    To make an array of JointStiffness objects for all of the joint stiffnesses in model m:

    var a = JointStiffness.GetAll(m);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for each joint stiffness in model m:

    var a = JointStiffness.GetAll(m, 'foo');


    GetComments()

    Description

    Extracts the comments associated to a joint stiffness.

    Arguments

    No arguments

    Returns

    Array of Comment objects (or null if there are no comments associated to the node).

    Return type

    Array

    Example

    To get the array of comments associated to the joint stiffness js:

    var comm_array = js.GetComments();


    GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]

    Description

    Returns an array of JointStiffness objects for all of the flagged joint stiffnesses in a model in PRIMER If the optional property argument is not given then an array of JointStiffness objects is returned. If the property argument is given, then that property value for each joint stiffness is returned in the array instead of a JointStiffness object

    Arguments

  • Model (Model)

    Model to get joint stiffnesses from

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to retrieve

  • property (optional) (string)

    Name for property to get for all flagged joint stiffnesses in the model

    Returns

    Array of JointStiffness objects or properties

    Return type

    Array

    Example

    To make an array of JointStiffness objects for all of the joint stiffnesses in model m flagged with f:

    var js = JointStiffness.GetFlagged(m, f);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for all of the joint stiffnesses in model m flagged with f:

    var a = JointStiffness.GetFlagged(m, f, 'foo');


    GetFromID(Model[Model], number[integer]) [static]

    Description

    Returns the JointStiffness object for a joint stiffness ID.

    Arguments

  • Model (Model)

    Model to find the joint stiffness in

  • number (integer)

    number of the joint stiffness you want the JointStiffness object for

    Returns

    JointStiffness object (or null if joint stiffness does not exist).

    Return type

    JointStiffness

    Example

    To get the JointStiffness object for joint stiffness 100 in model m

    var js = JointStiffness.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

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

    Arguments

  • prop (string)

    joint stiffness property to get parameter for

    Returns

    Parameter object if property is a parameter, null if not.

    Return type

    Parameter

    Example

    To check if JointStiffness property js.example is a parameter:

    Options.property_parameter_names = true;
    if (js.GetParameter(js.example) ) do_something...
    Options.property_parameter_names = false;

    To check if JointStiffness property js.example is a parameter by using the GetParameter method:

    if (js.ViewParameters().GetParameter(js.example) ) do_something...


    Keyword()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for jstf n:

    var key = n.Keyword();


    KeywordCards()

    Description

    Returns the keyword cards for the jstf. Note that a carriage return is not added. See also JointStiffness.Keyword()

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for jstf n:

    var cards = n.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last joint stiffness in the model.

    Arguments

  • Model (Model)

    Model to get last joint stiffness in

    Returns

    JointStiffness object (or null if there are no joint stiffnesses in the model).

    Return type

    JointStiffness

    Example

    To get the last joint stiffness in model m:

    var js = JointStiffness.Last(m);


    LastFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the last free joint stiffness label in the model. Also see JointStiffness.FirstFreeLabel(), JointStiffness.NextFreeLabel() and see Model.LastFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get last free joint stiffness label in

  • layer (optional) (Include number)

    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

    JointStiffness label.

    Return type

    Number

    Example

    To get the last free joint stiffness label in model m:

    var label = JointStiffness.LastFreeLabel(m);


    Next()

    Description

    Returns the next joint stiffness in the model.

    Arguments

    No arguments

    Returns

    JointStiffness object (or null if there are no more joint stiffnesses in the model).

    Return type

    JointStiffness

    Example

    To get the joint stiffness in model m after joint stiffness js:

    var js = js.Next();


    NextFreeLabel(Model[Model], layer (optional)[Include number]) [static]

    Description

    Returns the next free (highest+1) joint stiffness label in the model. Also see JointStiffness.FirstFreeLabel(), JointStiffness.LastFreeLabel() and Model.NextFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get next free joint stiffness label in

  • layer (optional) (Include number)

    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

    JointStiffness label.

    Return type

    Number

    Example

    To get the next free joint stiffness label in model m:

    var label = JointStiffness.NextFreeLabel(m);


    Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]

    Description

    Allows the user to pick a joint stiffness.

    Arguments

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only joint stiffnesses from that model can be picked. If the argument is a Flag then only joint stiffnesses that are flagged with limit can be selected. If omitted, or null, any joint stiffnesses from any model can be selected. from any model.

  • modal (optional) (boolean)

    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 (optional) (string)

    By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.

    Returns

    JointStiffness object (or null if not picked)

    Return type

    JointStiffness

    Example

    To pick a joint stiffness from model m giving the prompt 'Pick joint stiffness from screen':

    var js = JointStiffness.Pick('Pick joint stiffness from screen', m);


    Previous()

    Description

    Returns the previous joint stiffness in the model.

    Arguments

    No arguments

    Returns

    JointStiffness object (or null if there are no more joint stiffnesses in the model).

    Return type

    JointStiffness

    Example

    To get the joint stiffness in model m before joint stiffness js:

    var js = js.Previous();


    RenumberAll(Model[Model], start[integer]) [static]

    Description

    Renumbers all of the joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be renumbered in

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

    To renumber all of the joint stiffnesses in model m, from 1000000:

    JointStiffness.RenumberAll(m, 1000000);


    RenumberFlagged(Model[Model], flag[Flag], start[integer]) [static]

    Description

    Renumbers all of the flagged joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all the flagged joint stiffnesses will be renumbered in

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to renumber

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

    To renumber all of the joint stiffnesses in model m flagged with f, from 1000000:

    JointStiffness.RenumberFlagged(m, f, 1000000);


    Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]

    Description

    Allows the user to select joint stiffnesses using standard PRIMER object menus.

    Arguments

  • flag (Flag)

    Flag to use when selecting joint stiffnesses

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only joint stiffnesses from that model can be selected. If the argument is a Flag then only joint stiffnesses that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any joint stiffnesses can be selected. from any model.

  • modal (optional) (boolean)

    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 joint stiffnesses selected or null if menu cancelled

    Return type

    Number

    Example

    To select joint stiffnesses from model m, flagging those selected with flag f, giving the prompt 'Select joint stiffnesses':

    JointStiffness.Select(f, 'Select joint stiffnesses', m);

    To select joint stiffnesses, flagging those selected with flag f but limiting selection to joint stiffnesses flagged with flag l, giving the prompt 'Select joint stiffnesses':

    JointStiffness.Select(f, 'Select joint stiffnesses', l);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the joint stiffness.

    Arguments

  • flag (Flag)

    Flag to set on the joint stiffness

    Returns

    No return value

    Example

    To set flag f for joint stiffness js:

    js.SetFlag(f);


    Sketch(redraw (optional)[boolean])

    Description

    Sketches the joint stiffness. The joint stiffness will be sketched until you either call JointStiffness.Unsketch(), JointStiffness.UnsketchAll(), Model.UnsketchAll(), or delete the model

    Arguments

  • redraw (optional) (boolean)

    If model should be redrawn or not after the joint stiffness is sketched. If omitted redraw is true. If you want to sketch several joint stiffnesses and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To sketch joint stiffness js:

    js.Sketch();


    SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Sketches all of the flagged joint stiffnesses in the model. The joint stiffnesses will be sketched until you either call JointStiffness.Unsketch(), JointStiffness.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

    Arguments

  • Model (Model)

    Model that all the flagged joint stiffnesses will be sketched in

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to sketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the joint stiffnesses are sketched. If omitted redraw is true. If you want to sketch flagged joint stiffnesses several times and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To sketch all joint stiffnesses flagged with flag in model m:

    JointStiffness.SketchFlagged(m, flag);


    Total(Model[Model], exists (optional)[boolean]) [static]

    Description

    Returns the total number of joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

    true if only existing joint stiffnesses should be counted. If false or omitted referenced but undefined joint stiffnesses will also be included in the total.

    Returns

    number of joint stiffnesses

    Return type

    Number

    Example

    To get the total number of joint stiffnesses in model m:

    var total = JointStiffness.Total(m);


    Unblank()

    Description

    Unblanks the joint stiffness

    Arguments

    No arguments

    Returns

    No return value

    Example

    To unblank joint stiffness js:

    js.Unblank();


    UnblankAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Unblanks all of the joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be unblanked in

  • redraw (optional) (boolean)

    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

    Example

    To unblank all of the joint stiffnesses in model m:

    JointStiffness.UnblankAll(m);


    UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Unblanks all of the flagged joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that the flagged joint stiffnesses will be unblanked in

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to unblank

  • redraw (optional) (boolean)

    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

    Example

    To unblank all of the joint stiffnesses in model m flagged with f:

    JointStiffness.UnblankFlagged(m, f);


    UnflagAll(Model[Model], flag[Flag]) [static]

    Description

    Unsets a defined flag on all of the joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that the defined flag for all joint stiffnesses will be unset in

  • flag (Flag)

    Flag to unset on the joint stiffnesses

    Returns

    No return value

    Example

    To unset the flag f on all the joint stiffnesses in model m:

    JointStiffness.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the joint stiffness.

    Arguments

  • redraw (optional) (boolean)

    If model should be redrawn or not after the joint stiffness is unsketched. If omitted redraw is true. If you want to unsketch several joint stiffnesses and only redraw after the last one then use false for redraw and call View.Redraw().

    Returns

    No return value

    Example

    To unsketch joint stiffness js:

    js.Unsketch();


    UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]

    Description

    Unsketches all joint stiffnesses.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be unblanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not after the joint stiffnesses 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

    Example

    To unsketch all joint stiffnesses in model m:

    JointStiffness.UnsketchAll(m);


    UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]

    Description

    Unsketches all flagged joint stiffnesses in the model.

    Arguments

  • Model (Model)

    Model that all joint stiffnesses will be unsketched in

  • flag (Flag)

    Flag set on the joint stiffnesses that you want to unsketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the joint stiffnesses 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

    Example

    To unsketch all joint stiffnesses flagged with flag in model m:

    JointStiffness.UnsketchAll(m, flag);


    ViewParameters()

    Description

    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.

    Arguments

    No arguments

    Returns

    JointStiffness object.

    Return type

    JointStiffness

    Example

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

    if (js.ViewParameters().GetParameter(js.example) ) do_something...


    Warning(message[string], details (optional)[string])

    Description

    Adds a warning for joint stiffness. For more details on checking see the Check class.

    Arguments

  • message (string)

    The warning message to give

  • details (optional) (string)

    An optional detailed warning message

    Returns

    No return value

    Example

    To add a warning message "My custom warning" for joint stiffness js:

    js.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this joint stiffness.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for joint stiffness js:

    var xrefs = js.Xrefs();


    toString()

    Description

    Creates a string containing the jstf data in keyword format. Note that this contains the keyword header and the keyword cards. See also JointStiffness.Keyword() and JointStiffness.KeywordCards().

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for jstf n in keyword format

    var s = n.toString();