Airbag class

The Airbag class gives you access to airbag 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

Airbag constants

Name Description
Airbag.ADIABATIC_GAS_MODEL Airbag adiabatic gas model type
Airbag.ADVANCED_ALE Airbag advanced ALE type
Airbag.ALE Airbag ALE type
Airbag.HYBRID Airbag hybrid type
Airbag.HYBRID_CHEMKIN Airbag hybrid chemkin type
Airbag.HYBRID_JETTING Airbag hybrid jetting type
Airbag.LINEAR_FLUID Airbag linear fluid type
Airbag.LOAD_CURVE Airbag load curve type
Airbag.PARTICLE Airbag particle type
Airbag.SIMPLE_AIRBAG_MODEL Airbag simple airbag model type
Airbag.SIMPLE_PRESSURE_VOLUME Airbag simple pressure volume type
Airbag.WANG_NEFSKE Airbag Wang Nefske type
Airbag.WANG_NEFSKE_JETTING Airbag Wang Nefske jetting type
Airbag.WANG_NEFSKE_MULTIPLE_JETTING Airbag Wang Nefske multiple jetting type

Airbag properties

Name Type Description
abid integer Airbag number. Also see the label property which is an alternative name for this.
colour Colour The colour of the airbag
cols (read only) real The number of columns of data the airbag has
exists (read only) logical true if airbag exists, false if referred to but not defined.
id logical Turns _ID on or OFF
include integer The Include file number that the airbag is in.
label integer Airbag number. Also see the abid property which is an alternative name for this.
model (read only) integer The Model number that the airbag is in.
properties integer The total number of properties that the airbag has
rows (read only) integer The number of rows of data the airbag has. This includes the _ID card if it is set.
title string Airbag title
type constant Airbag type. Can be Airbag.SIMPLE_PRESSURE_VOLUME, Airbag.SIMPLE_AIRBAG_MODEL, Airbag.ADIABATIC_GAS_MODEL, Airbag.WANG_NEFSKE, Airbag.WANG_NEFSKE_JETTING, Airbag.WANG_NEFSKE_MULTIPLE_JETTING, Airbag.LOAD_CURVE, Airbag.LINEAR_FLUID, Airbag.HYBRID, Airbag.HYBRID_JETTING, Airbag.HYBRID_CHEMKIN, Airbag.ALE, Airbag.ADVANCED_ALE or Airbag.PARTICLE

Detailed Description

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

Constructor

new Airbag(Model[Model], type[string], sid[integer], sidtyp (optional)[integer], abid (optional)[integer], heading (optional)[string])

Description

Create a new Airbag object.

Arguments

  • Model (Model)

    Model that airbag will be created in

  • type (string)

    Airbag type. Can be Airbag.SIMPLE_PRESSURE_VOLUME, Airbag.SIMPLE_AIRBAG_MODEL, Airbag.ADIABATIC_GAS_MODEL, Airbag.WANG_NEFSKE, Airbag.WANG_NEFSKE_JETTING, Airbag.WANG_NEFSKE_MULTIPLE_JETTING, Airbag.LOAD_CURVE, Airbag.LINEAR_FLUID, Airbag.HYBRID, Airbag.HYBRID_JETTING, Airbag.HYBRID_CHEMKIN, Airbag.ALE, Airbag.ADVANCED_ALE or Airbag.PARTICLE

  • sid (integer)

    Set ID

  • sidtyp (optional) (integer)

    Set type: segment/part set ID

  • abid (optional) (integer)

    Airbag number

  • heading (optional) (string)

    Airbag title

    Returns

    Airbag object

    Return type

    Airbag

    Example

    To create a new AIRBAG_SIMPLE_PRESSURE_VOLUME in model m with set ID 10 and segment set type

    var a = new Airbag(m, Airbag.SIMPLE_PRESSURE_VOLUME, 10);

    or

    var a = new Airbag(m, Airbag.SIMPLE_PRESSURE_VOLUME, 10, 0);

    Details of functions

    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a airbag.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the airbag

    Returns

    No return value

    Example

    To associate comment c to the airbag a:

    a.AssociateComment(c);


    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 airbag a:

    a.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the airbag.

    Arguments

  • flag (Flag)

    Flag to clear on the airbag

    Returns

    No return value

    Example

    To clear flag f for airbag a:

    a.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

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

    Airbag object

    Return type

    Airbag

    Example

    To copy airbag a into airbag z:

    var z = a.Copy();


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

    Description

    Starts an interactive editing panel to create a airbag

    Arguments

  • Model (Model)

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

    Airbag object (or null if not made).

    Return type

    Airbag

    Example

    To start creating a airbag in model m:

    var a = Airbag.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a airbag.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the airbag

    Returns

    No return value

    Example

    To detach comment c from the airbag a:

    a.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 airbag a:

    a.Edit();


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

    Description

    Adds an error for airbag. 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 airbag a:

    a.Error("My custom error");


    ExtractColour()

    Description

    Extracts the actual colour used for airbag.
    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 airbag 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 airbag.

    Arguments

    No arguments

    Returns

    colour value (integer)

    Return type

    Number

    Example

    To return the colour used for drawing airbag a:

    var colour = a.ExtractColour();


    First(Model[Model]) [static]

    Description

    Returns the first airbag in the model.

    Arguments

  • Model (Model)

    Model to get first airbag in

    Returns

    Airbag object (or null if there are no airbags in the model).

    Return type

    Airbag

    Example

    To get the first airbag in model m:

    var a = Airbag.First(m);


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

    Description

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

    Arguments

  • Model (Model)

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

    Airbag label.

    Return type

    Number

    Example

    To get the first free airbag label in model m:

    var label = Airbag.FirstFreeLabel(m);


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

    Description

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

    Arguments

  • Model (Model)

    Model that all airbags will be flagged in

  • flag (Flag)

    Flag to set on the airbags

    Returns

    No return value

    Example

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

    Airbag.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the airbag is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the airbag

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

    To check if airbag a has flag f set on it:

    if (a.Flagged(f) ) do_something...


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

    Description

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

    Arguments

  • Model (Model)

    Model that all airbags are in

  • func (function)

    Function to call for each airbag

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

    Airbag.ForEach(m, test);
    function test(a)
    {
    // a is Airbag object
    }

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

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


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

    Description

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

    Arguments

  • Model (Model)

    Model to get airbags from

  • property (optional) (string)

    Name for property to get for all airbags in the model

    Returns

    Array of Airbag objects or properties

    Return type

    Array

    Example

    To make an array of Airbag objects for all of the airbags in model m:

    var a = Airbag.GetAll(m);

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

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


    GetComments()

    Description

    Extracts the comments associated to a airbag.

    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 airbag a:

    var comm_array = a.GetComments();


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

    Description

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

    Arguments

  • Model (Model)

    Model to get airbags from

  • flag (Flag)

    Flag set on the airbags that you want to retrieve

  • property (optional) (string)

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

    Returns

    Array of Airbag objects or properties

    Return type

    Array

    Example

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

    var a = Airbag.GetFlagged(m, f);

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

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


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

    Description

    Returns the Airbag object for a airbag ID.

    Arguments

  • Model (Model)

    Model to find the airbag in

  • number (integer)

    number of the airbag you want the Airbag object for

    Returns

    Airbag object (or null if airbag does not exist).

    Return type

    Airbag

    Example

    To get the Airbag object for airbag 100 in model m

    var a = Airbag.GetFromID(m, 100);


    GetParameter(prop[string])

    Description

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

    Arguments

  • prop (string)

    airbag property to get parameter for

    Returns

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

    Return type

    Parameter

    Example

    To check if Airbag property a.example is a parameter:

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

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

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


    GetPropertyByIndex(index[integer])

    Description

    Returns the value of property at index index for this Airbag object or null if no property exists.

    Arguments

  • index (integer)

    The index of the property value to retrieve. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for an airbag may not have adjacent indices.

    Returns

    Property value (real/integer)

    Return type

    Number

    Example

    To return the property at index 3, for airbag a:

    var prop = a.GetPropertyByIndex(3);
    


    GetPropertyByName(acronym[string])

    Description

    Returns the value of property string acronym for this Airbag object or null if no property exists.

    Arguments

  • acronym (string)

    The acronym of the property value to retrieve

    Returns

    Property value (real/integer)

    Return type

    Number

    Example

    To return the value of HCONV for airbag a:

    var hconv = a.GetPropertyByName("HCONV");


    GetPropertyByRowCol(row[integer], col[integer])

    Description

    Returns the value of the property for row and col for this Airbag object or null if no property exists. Note that columns start at 0. Rows start at 1 if the _ID option is set, at 0 otherwise.

    Arguments

  • row (integer)

    The row of the property value to retrieve

  • col (integer)

    The column of the property value to retrieve

    Returns

    Property value (real/integer)

    Return type

    Number

    Example

    To return the value of the property at row 0, column 3 for airbag a:

    var prop = a.GetPropertyByRowCol(0, 3);


    GetPropertyNameForIndex(index[integer])

    Description

    Returns the name of the property at index index for this Airbag object or null if there is no property.

    Arguments

  • index (integer)

    The index of the property name to retrieve. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for an airbag may not have adjacent indices.

    Returns

    Property name (string)

    Return type

    String

    Example

    To return the name of the property at index 3, for airbag a:

    var name = a.GetPropertyNameForIndex(3);
    


    GetPropertyNameForRowCol(row[integer], col[integer])

    Description

    Returns the name of the property at row and col for this Airbag object or null if there is no property. Note that columns start at 0. Rows start at 1 if the _ID option is set, at 0 otherwise.

    Arguments

  • row (integer)

    The row of the property name to retrieve

  • col (integer)

    The column of the property name to retrieve

    Returns

    Property name (string)

    Return type

    String

    Example

    To return the name of the property at row 0, column 1 for airbag a:

    var name = a.GetPropertyNameForRowCol(0, 1);
    


    Keyword()

    Description

    Returns the keyword for this airbag (e.g. *AIRBAG_SIMPLE_PRESSURE_VOLUME, *AIRBAG_SIMPLE_AIRBAG_MODEL etc). Note that a carriage return is not added. See also Airbag.KeywordCards()

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for airbag a:

    var key = a.Keyword();


    KeywordCards()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for airbag a:

    var cards = a.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last airbag in the model.

    Arguments

  • Model (Model)

    Model to get last airbag in

    Returns

    Airbag object (or null if there are no airbags in the model).

    Return type

    Airbag

    Example

    To get the last airbag in model m:

    var a = Airbag.Last(m);


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

    Description

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

    Arguments

  • Model (Model)

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

    Airbag label.

    Return type

    Number

    Example

    To get the last free airbag label in model m:

    var label = Airbag.LastFreeLabel(m);


    Next()

    Description

    Returns the next airbag in the model.

    Arguments

    No arguments

    Returns

    Airbag object (or null if there are no more airbags in the model).

    Return type

    Airbag

    Example

    To get the airbag in model m after airbag a:

    var a = a.Next();


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

    Description

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

    Arguments

  • Model (Model)

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

    Airbag label.

    Return type

    Number

    Example

    To get the next free airbag label in model m:

    var label = Airbag.NextFreeLabel(m);


    Previous()

    Description

    Returns the previous airbag in the model.

    Arguments

    No arguments

    Returns

    Airbag object (or null if there are no more airbags in the model).

    Return type

    Airbag

    Example

    To get the airbag in model m before airbag a:

    var a = a.Previous();


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

    Description

    Renumbers all of the airbags in the model.

    Arguments

  • Model (Model)

    Model that all airbags will be renumbered in

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Airbag.RenumberAll(m, 1000000);


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

    Description

    Renumbers all of the flagged airbags in the model.

    Arguments

  • Model (Model)

    Model that all the flagged airbags will be renumbered in

  • flag (Flag)

    Flag set on the airbags that you want to renumber

  • start (integer)

    Start point for renumbering

    Returns

    No return value

    Example

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

    Airbag.RenumberFlagged(m, f, 1000000);


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

    Description

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

    Arguments

  • flag (Flag)

    Flag to use when selecting airbags

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

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

    Return type

    Number

    Example

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

    Airbag.Select(f, 'Select airbags', m);

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

    Airbag.Select(f, 'Select airbags', l);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the airbag.

    Arguments

  • flag (Flag)

    Flag to set on the airbag

    Returns

    No return value

    Example

    To set flag f for airbag a:

    a.SetFlag(f);


    SetPropertyByIndex(index[integer], value[integer/real for numeric properties, string for character properties])

    Description

    Sets the value of property at index index for this Airbag object

    Arguments

  • index (integer)

    The index of the property value to set. (the number of properties can be found from properties) Note that indices start at 0. There is no link between indices and rows/columns so adjacent fields on a line for an airbag may not have adjacent indices.

  • value (integer/real for numeric properties, string for character properties)

    The value of the property to set.

    Returns

    No return value

    Example

    To set the property at index 3, for airbag a to be 1.234:

    a.SetPropertyByIndex(3, 1.234);
    


    SetPropertyByName(acronym[string], value[integer/real for numeric properties, string for character properties])

    Description

    Sets the value of property string acronym for this Airbag object

    Arguments

  • acronym (string)

    The acronym of the property value to set

  • value (integer/real for numeric properties, string for character properties)

    The value of the property to set.

    Returns

    No return value

    Example

    To set the value of HCONV for airbag a to be 1.23:

    a.SetPropertyByName("HCONV", 1.23);
    


    SetPropertyByRowCol(row[integer], col[integer], value[integer/real for numeric properties, string for character properties])

    Description

    Sets the value of the property for row and col for this Airbag object. Note that columns start at 0. Rows start at 1 if the _ID option is set, at 0 otherwise.

    Arguments

  • row (integer)

    The row of the property value to set

  • col (integer)

    The column of the property value to set

  • value (integer/real for numeric properties, string for character properties)

    The value of the property to set.

    Returns

    No return value

    Example

    To set the value of the property at row 0, column 3 for airbag a to be 0.5:

    a.SetPropertyByRowCol(0, 3, 0.5);


    Sketch(redraw (optional)[boolean])

    Description

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

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To sketch airbag a:

    a.Sketch();


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

    Description

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

    Arguments

  • Model (Model)

    Model that all the flagged airbags will be sketched in

  • flag (Flag)

    Flag set on the airbags that you want to sketch

  • redraw (optional) (boolean)

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

    Airbag.SketchFlagged(m, flag);


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

    Description

    Returns the total number of airbags in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

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

    Returns

    number of airbags

    Return type

    Number

    Example

    To get the total number of airbags in model m:

    var total = Airbag.Total(m);


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

    Description

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

    Arguments

  • Model (Model)

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

  • flag (Flag)

    Flag to unset on the airbags

    Returns

    No return value

    Example

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

    Airbag.UnflagAll(m, f);


    Unsketch(redraw (optional)[boolean])

    Description

    Unsketches the airbag.

    Arguments

  • redraw (optional) (boolean)

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

    Returns

    No return value

    Example

    To unsketch airbag a:

    a.Unsketch();


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

    Description

    Unsketches all airbags.

    Arguments

  • Model (Model)

    Model that all airbags will be unblanked in

  • redraw (optional) (boolean)

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

    Airbag.UnsketchAll(m);


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

    Description

    Unsketches all flagged airbags in the model.

    Arguments

  • Model (Model)

    Model that all airbags will be unsketched in

  • flag (Flag)

    Flag set on the airbags that you want to unsketch

  • redraw (optional) (boolean)

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

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

    Airbag object.

    Return type

    Airbag

    Example

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

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


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

    Description

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

    a.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this airbag.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for airbag a:

    var xrefs = a.Xrefs();


    toString()

    Description

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

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for airbag a in keyword format

    var s = a.toString();