Seatbelt2D class

The Seatbelt2D class gives you access to 4 noded (2D) element seatbelt 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

Seatbelt2D properties

Name Type Description
colour Colour The colour of the seatbelt
eid integer Seatbelt2D number. Also see the label property which is an alternative name for this.
exists (read only) logical true if seatbelt exists, false if referred to but not defined.
include integer The Include file number that the seatbelt is in.
label integer Seatbelt2D number. Also see the eid property which is an alternative name for this.
model (read only) integer The Model number that the seatbelt is in.
n1 integer Node 1 ID
n2 integer Node 2 ID
n3 integer Node 3 ID
n4 integer Node 4 ID
pid integer Part ID
sbrid integer Retractor ID
slen real Initial slack length
transparency integer The transparency of the seatbelt (0-100) 0% is opaque, 100% is transparent.

Detailed Description

The Seatbelt2D class allows you to create, modify, edit and manipulate 4 noded element seatbelt cards. See the documentation below for more details.

Constructor

new Seatbelt2D(Model[Model], eid[integer], pid[integer], n1[integer], n2[integer], n3[integer], n4[integer])

Description

Create a new Seatbelt2D object.

Arguments

  • Model (Model)

    Model that seatbelt will be created in

  • eid (integer)

    Seatbelt ID.

  • pid (integer)

    Part number.

  • n1 (integer)

    Node 1 ID

  • n2 (integer)

    Node 2 ID

  • n3 (integer)

    Node 3 ID

  • n4 (integer)

    Node 4 ID

    Returns

    Seatbelt2D object

    Return type

    Seatbelt2D

    Example

    To create a new 4 noded element seatbelt in model m with label 100, part 10 and nodes 20, 21, 22, 23:

    var a = new Seatbelt2D(m, 100, 10, 20, 21, 22, 23);

    Details of functions

    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a seatbelt.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the seatbelt

    Returns

    No return value

    Example

    To associate comment c to the seatbelt s:

    s.AssociateComment(c);


    Blank()

    Description

    Blanks the seatbelt

    Arguments

    No arguments

    Returns

    No return value

    Example

    To blank seatbelt s:

    s.Blank();


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

    Description

    Blanks all of the seatbelts in the model.

    Arguments

  • Model (Model)

    Model that all seatbelts 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 seatbelts in model m:

    Seatbelt2D.BlankAll(m);


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

    Description

    Blanks all of the flagged seatbelts in the model.

    Arguments

  • Model (Model)

    Model that all the flagged seatbelts will be blanked in

  • flag (Flag)

    Flag set on the seatbelts 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 seatbelts in model m flagged with f:

    Seatbelt2D.BlankFlagged(m, f);


    Blanked()

    Description

    Checks if the seatbelt is blanked or not.

    Arguments

    No arguments

    Returns

    true if blanked, false if not.

    Return type

    Boolean

    Example

    To check if seatbelt s is blanked:

    if (s.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 seatbelt s:

    s.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the seatbelt.

    Arguments

  • flag (Flag)

    Flag to clear on the seatbelt

    Returns

    No return value

    Example

    To clear flag f for seatbelt s:

    s.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

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

    Seatbelt2D object

    Return type

    Seatbelt2D

    Example

    To copy seatbelt s into seatbelt z:

    var z = s.Copy();


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

    Description

    Starts an interactive editing panel to create a seatbelt

    Arguments

  • Model (Model)

    Model that the seatbelt 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

    Seatbelt2D object (or null if not made).

    Return type

    Seatbelt2D

    Example

    To start creating a seatbelt in model m:

    var s = Seatbelt2D.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a seatbelt.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the seatbelt

    Returns

    No return value

    Example

    To detach comment c from the seatbelt s:

    s.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 seatbelt s:

    s.Edit();


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

    Description

    Adds an error for seatbelt. 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 seatbelt s:

    s.Error("My custom error");


    ExtractColour()

    Description

    Extracts the actual colour used for seatbelt.
    By default in PRIMER many entities such as elements get their colour automatically from the part that they are in. PRIMER cycles through 13 default colours based on the label of the entity. In this case the seatbelt colour property will return the value Colour.PART instead of the actual colour. This method will return the actual colour which is used for drawing the seatbelt.

    Arguments

    No arguments

    Returns

    colour value (integer)

    Return type

    Number

    Example

    To return the colour used for drawing seatbelt s:

    var colour = s.ExtractColour();


    First(Model[Model]) [static]

    Description

    Returns the first seatbelt in the model.

    Arguments

  • Model (Model)

    Model to get first seatbelt in

    Returns

    Seatbelt2D object (or null if there are no seatbelts in the model).

    Return type

    Seatbelt2D

    Example

    To get the first seatbelt in model m:

    var s = Seatbelt2D.First(m);


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

    Description

    Returns the first free seatbelt label in the model. Also see Seatbelt2D.LastFreeLabel(), Seatbelt2D.NextFreeLabel() and Model.FirstFreeItemLabel().

    Arguments

  • Model (Model)

    Model to get first free seatbelt 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

    Seatbelt2D label.

    Return type

    Number

    Example

    To get the first free seatbelt label in model m:

    var label = Seatbelt2D.FirstFreeLabel(m);


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

    Description

    Flags all of the seatbelts in the model with a defined flag.

    Arguments

  • Model (Model)

    Model that all seatbelts will be flagged in

  • flag (Flag)

    Flag to set on the seatbelts

    Returns

    No return value

    Example

    To flag all of the seatbelts with flag f in model m:

    Seatbelt2D.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the seatbelt is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the seatbelt

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if seatbelt s has flag f set on it:

    if (s.Flagged(f) ) do_something...


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

    Description

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

    Arguments

  • Model (Model)

    Model that all seatbelts are in

  • func (function)

    Function to call for each seatbelt

  • 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 seatbelts in model m:

    Seatbelt2D.ForEach(m, test);
    function test(s)
    {
    // s is Seatbelt2D object
    }

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

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


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

    Description

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

    Arguments

  • Model (Model)

    Model to get seatbelts from

  • property (optional) (string)

    Name for property to get for all seatbelts in the model

    Returns

    Array of Seatbelt2D objects or properties

    Return type

    Array

    Example

    To make an array of Seatbelt2D objects for all of the seatbelts in model m:

    var a = Seatbelt2D.GetAll(m);

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

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


    GetComments()

    Description

    Extracts the comments associated to a seatbelt.

    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 seatbelt s:

    var comm_array = s.GetComments();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get seatbelts from

  • flag (Flag)

    Flag set on the seatbelts that you want to retrieve

  • property (optional) (string)

    Name for property to get for all flagged seatbelts in the model

    Returns

    Array of Seatbelt2D objects or properties

    Return type

    Array

    Example

    To make an array of Seatbelt2D objects for all of the seatbelts in model m flagged with f:

    var s = Seatbelt2D.GetFlagged(m, f);

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

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


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

    Description

    Returns the Seatbelt2D object for a seatbelt ID.

    Arguments

  • Model (Model)

    Model to find the seatbelt in

  • number (integer)

    number of the seatbelt you want the Seatbelt2D object for

    Returns

    Seatbelt2D object (or null if seatbelt does not exist).

    Return type

    Seatbelt2D

    Example

    To get the Seatbelt2D object for seatbelt 100 in model m

    var s = Seatbelt2D.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

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

    Arguments

  • prop (string)

    seatbelt property to get parameter for

    Returns

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

    Return type

    Parameter

    Example

    To check if Seatbelt2D property s.example is a parameter:

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

    To check if Seatbelt2D property s.example is a parameter by using the GetParameter method:

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


    Keyword()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for seatbelt s:

    var key = s.Keyword();


    KeywordCards()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for seatbelt s:

    var cards = s.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last seatbelt in the model.

    Arguments

  • Model (Model)

    Model to get last seatbelt in

    Returns

    Seatbelt2D object (or null if there are no seatbelts in the model).

    Return type

    Seatbelt2D

    Example

    To get the last seatbelt in model m:

    var s = Seatbelt2D.Last(m);


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

    Description

    Returns the last free seatbelt label in the model. Also see Seatbelt2D.FirstFreeLabel(), Seatbelt2D.NextFreeLabel() and see Model.LastFreeItemLabel()

    Arguments

  • Model (Model)

    Model to get last free seatbelt 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

    Seatbelt2D label.

    Return type

    Number

    Example

    To get the last free seatbelt label in model m:

    var label = Seatbelt2D.LastFreeLabel(m);


    Next()

    Description

    Returns the next seatbelt in the model.

    Arguments

    No arguments

    Returns

    Seatbelt2D object (or null if there are no more seatbelts in the model).

    Return type

    Seatbelt2D

    Example

    To get the seatbelt in model m after seatbelt s:

    var s = s.Next();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get next free seatbelt 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

    Seatbelt2D label.

    Return type

    Number

    Example

    To get the next free seatbelt label in model m:

    var label = Seatbelt2D.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 seatbelt.

    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 seatbelts from that model can be picked. If the argument is a Flag then only seatbelts that are flagged with limit can be selected. If omitted, or null, any seatbelts 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

    Seatbelt2D object (or null if not picked)

    Return type

    Seatbelt2D

    Example

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

    var s = Seatbelt2D.Pick('Pick seatbelt from screen', m);


    Previous()

    Description

    Returns the previous seatbelt in the model.

    Arguments

    No arguments

    Returns

    Seatbelt2D object (or null if there are no more seatbelts in the model).

    Return type

    Seatbelt2D

    Example

    To get the seatbelt in model m before seatbelt s:

    var s = s.Previous();


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

    Description

    Allows the user to select seatbelts using standard PRIMER object menus.

    Arguments

  • flag (Flag)

    Flag to use when selecting seatbelts

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

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

    Return type

    Number

    Example

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

    Seatbelt2D.Select(f, 'Select seatbelts', m);

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

    Seatbelt2D.Select(f, 'Select seatbelts', l);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the seatbelt.

    Arguments

  • flag (Flag)

    Flag to set on the seatbelt

    Returns

    No return value

    Example

    To set flag f for seatbelt s:

    s.SetFlag(f);


    Sketch(redraw (optional)[boolean])

    Description

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

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To sketch seatbelt s:

    s.Sketch();


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

    Description

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

    Arguments

  • Model (Model)

    Model that all the flagged seatbelts will be sketched in

  • flag (Flag)

    Flag set on the seatbelts that you want to sketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the seatbelts are sketched. If omitted redraw is true. If you want to sketch flagged seatbelts 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 seatbelts flagged with flag in model m:

    Seatbelt2D.SketchFlagged(m, flag);


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

    Description

    Returns the total number of seatbelts in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

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

    Returns

    number of seatbelts

    Return type

    Number

    Example

    To get the total number of seatbelts in model m:

    var total = Seatbelt2D.Total(m);


    Unblank()

    Description

    Unblanks the seatbelt

    Arguments

    No arguments

    Returns

    No return value

    Example

    To unblank seatbelt s:

    s.Unblank();


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

    Description

    Unblanks all of the seatbelts in the model.

    Arguments

  • Model (Model)

    Model that all seatbelts 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 seatbelts in model m:

    Seatbelt2D.UnblankAll(m);


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

    Description

    Unblanks all of the flagged seatbelts in the model.

    Arguments

  • Model (Model)

    Model that the flagged seatbelts will be unblanked in

  • flag (Flag)

    Flag set on the seatbelts 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 seatbelts in model m flagged with f:

    Seatbelt2D.UnblankFlagged(m, f);


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

    Description

    Unsets a defined flag on all of the seatbelts in the model.

    Arguments

  • Model (Model)

    Model that the defined flag for all seatbelts will be unset in

  • flag (Flag)

    Flag to unset on the seatbelts

    Returns

    No return value

    Example

    To unset the flag f on all the seatbelts in model m:

    Seatbelt2D.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the seatbelt.

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To unsketch seatbelt s:

    s.Unsketch();


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

    Description

    Unsketches all seatbelts.

    Arguments

  • Model (Model)

    Model that all seatbelts will be unblanked in

  • redraw (optional) (boolean)

    If model should be redrawn or not after the seatbelts 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 seatbelts in model m:

    Seatbelt2D.UnsketchAll(m);


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

    Description

    Unsketches all flagged seatbelts in the model.

    Arguments

  • Model (Model)

    Model that all seatbelts will be unsketched in

  • flag (Flag)

    Flag set on the seatbelts that you want to unsketch

  • redraw (optional) (boolean)

    If model should be redrawn or not after the seatbelts 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 seatbelts flagged with flag in model m:

    Seatbelt2D.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

    Seatbelt2D object.

    Return type

    Seatbelt2D

    Example

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

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


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

    Description

    Adds a warning for seatbelt. 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 seatbelt s:

    s.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this seatbelt.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for seatbelt s:

    var xrefs = s.Xrefs();


    toString()

    Description

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

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for seatbelt s in keyword format

    var str = s.toString();